BVB Source Codes

CRYENGINE Show PersonalLog.cpp Source code

Return Download CRYENGINE: download PersonalLog.cpp Source code - Download CRYENGINE Source code - Type:.cpp
  1. // Copyright 2001-2016 Crytek GmbH / Crytek Group. All rights reserved.
  2.  
  3. #include "StdAfx.h"
  4. #include "PersonalLog.h"
  5.  
  6. void PersonalLog::AddMessage(const EntityId entityId, const char* message)
  7. {
  8.         if (m_messages.size() + 1 > 20)
  9.                 m_messages.pop_front();
  10.  
  11.         m_messages.push_back(message);
  12.  
  13.         if (gAIEnv.CVars.OutputPersonalLogToConsole)
  14.         {
  15.                 const char* name = "(null)";
  16.  
  17.                 if (IEntity* entity = gEnv->pEntitySystem->GetEntity(entityId))
  18.                         name = entity->GetName();
  19.  
  20.                 gEnv->pLog->Log("Personal Log [%s] %s", name, message);
  21.         }
  22.  
  23. #ifdef CRYAISYSTEM_DEBUG
  24.         if (IEntity* entity = gEnv->pEntitySystem->GetEntity(entityId))
  25.         {
  26.                 if (IAIObject* ai = entity->GetAI())
  27.                 {
  28.                         IAIRecordable::RecorderEventData recorderEventData(message);
  29.                         ai->RecordEvent(IAIRecordable::E_PERSONALLOG, &recorderEventData);
  30.                 }
  31.         }
  32. #endif
  33. }
  34.  
downloadPersonalLog.cpp 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