mirror of
https://github.com/nillerusr/source-engine.git
synced 2026-08-08 01:39:36 +00:00
1
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
//========= Copyright Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//
|
||||
//=============================================================================//
|
||||
#include "cbase.h"
|
||||
#include "../EventLog.h"
|
||||
#include "KeyValues.h"
|
||||
|
||||
// memdbgon must be the last include file in a .cpp file!!!
|
||||
#include "tier0/memdbgon.h"
|
||||
|
||||
class CHL2EventLog : public CEventLog
|
||||
{
|
||||
private:
|
||||
typedef CEventLog BaseClass;
|
||||
|
||||
public:
|
||||
virtual char const *Name() { return "CHL2EventLog"; }
|
||||
|
||||
virtual ~CHL2EventLog() {};
|
||||
|
||||
public:
|
||||
bool PrintEvent( IGameEvent * event ) // override virtual function
|
||||
{
|
||||
if ( BaseClass::PrintEvent( event ) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if ( Q_strcmp(event->GetName(), "hl2_") == 0 )
|
||||
{
|
||||
return PrintHL2Event( event );
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
bool PrintHL2Event( IGameEvent * event ) // print Mod specific logs
|
||||
{
|
||||
// const char * name = event->GetName() + Q_strlen("hl2_"); // remove prefix
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
static CHL2EventLog s_HL2EventLog;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Singleton access
|
||||
//-----------------------------------------------------------------------------
|
||||
IGameSystem* GameLogSystem()
|
||||
{
|
||||
return &s_HL2EventLog;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user