BVB Source Codes

CRYENGINE Show DebugBreakage.h Source code

Return Download CRYENGINE: download DebugBreakage.h Source code - Download CRYENGINE Source code - Type:.h
  1. // Copyright 2001-2016 Crytek GmbH / Crytek Group. All rights reserved.
  2.  
  3. #ifndef __DEBUG_NET_BREAKAGE__H__
  4. #define __DEBUG_NET_BREAKAGE__H__
  5.  
  6. #pragma once
  7.  
  8. // Enable logging of breakage events and breakage serialisation
  9. #define DEBUG_NET_BREAKAGE 0
  10.  
  11. #ifndef XYZ
  12.         #define XYZ(v) (v).x, (v).y, (v).z
  13. #endif
  14.  
  15. #if !defined(_RELEASE) && DEBUG_NET_BREAKAGE
  16.  
  17.         #include <CryString/StringUtils.h>
  18.  
  19.         #define LOGBREAK(...) CryLogAlways("brk: " __VA_ARGS__)
  20.  
  21. static void LOGBREAK_STATOBJ(IStatObj* pObj)
  22. {
  23.         if (pObj)
  24.         {
  25.                 unsigned int breakable = pObj->GetBreakableByGame();
  26.                 int idBreakable = pObj->GetIDMatBreakable();
  27.                 Vec3 bbmin = pObj->GetBoxMin();
  28.                 Vec3 bbmax = pObj->GetBoxMax();
  29.                 Vec3 vegCentre = pObj->GetVegCenter();
  30.                 const char* filePath = pObj->GetFilePath();
  31.                 const char* geoName = pObj->GetGeoName();
  32.                 int subObjCount = pObj->GetSubObjectCount();
  33.                 LOGBREAK("StatObj: bbmin = (%f, %f, %f) bbmax = (%f, %f, %f)", XYZ(bbmin), XYZ(bbmax));
  34.                 LOGBREAK("StatObj: vegCentre = (%f, %f, %f)", XYZ(vegCentre));
  35.                 LOGBREAK("StatObj: breakable = %d, idBreakable = %d, subObjCount = %d", breakable, idBreakable, subObjCount);
  36.                 LOGBREAK("StatObj: filePath = '%s', geoName = '%s'", filePath, geoName);
  37.                 LOGBREAK("StatObj: filePathHash = %d", CryStringUtils::CalculateHash(filePath));
  38.         }
  39. }
  40.  
  41. #else
  42.  
  43.         #define LOGBREAK(...)
  44.         #define LOGBREAK_STATOBJ(x)
  45.  
  46. #endif
  47.  
  48. #endif // __DEBUG_NET_BREAKAGE__H__
  49.  
downloadDebugBreakage.h Source code - Download CRYENGINE Source code
Related Source Codes/Software:
postal - 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10

 Back to top