diff options
Diffstat (limited to 'game/server/hl1/hl1_eventlog.cpp')
| -rw-r--r-- | game/server/hl1/hl1_eventlog.cpp | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/game/server/hl1/hl1_eventlog.cpp b/game/server/hl1/hl1_eventlog.cpp new file mode 100644 index 0000000..4c33d64 --- /dev/null +++ b/game/server/hl1/hl1_eventlog.cpp @@ -0,0 +1,55 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +// $NoKeywords: $ +// +//=============================================================================// +#include "cbase.h" +#include "../EventLog.h" + +class CHL1EventLog : public CEventLog +{ +private: + typedef CEventLog BaseClass; + +public: + virtual ~CHL1EventLog() {}; + +public: + bool PrintEvent( IGameEvent * event ) // override virtual function + { + if ( BaseClass::PrintEvent( event ) ) + { + return true; + } + + if ( Q_strcmp(event->GetName(), "hl1_") == 0 ) + { + return PrintHL1Event( event ); + } + + return false; + } + +protected: + + bool PrintHL1Event( IGameEvent * event ) // print Mod specific logs + { + // const char * name = event->GetName() + Q_strlen("hl1_"); // remove prefix + + return false; + } + +}; + +CHL1EventLog g_HL1EventLog; + +//----------------------------------------------------------------------------- +// Singleton access +//----------------------------------------------------------------------------- +IGameSystem* GameLogSystem() +{ + return &g_HL1EventLog; +} + |