You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
57 lines
1.1 KiB
57 lines
1.1 KiB
![]()
4 years ago
|
//========= Copyright Valve Corporation, All rights reserved. ============//
|
||
|
//
|
||
|
// Purpose:
|
||
|
//
|
||
|
// $NoKeywords: $
|
||
|
//
|
||
|
//=============================================================================//
|
||
|
#include "cbase.h"
|
||
|
#include "../eventlog.h"
|
||
|
#include <KeyValues.h>
|
||
|
|
||
|
class CTF2EventLog : public CEventLog
|
||
|
{
|
||
|
private:
|
||
|
typedef CEventLog BaseClass;
|
||
|
|
||
|
public:
|
||
|
virtual ~CTF2EventLog() {};
|
||
|
|
||
|
public:
|
||
|
bool PrintEvent( KeyValues * event ) // override virtual function
|
||
|
{
|
||
|
if ( BaseClass::PrintEvent( event ) )
|
||
|
{
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
if ( Q_strcmp(event->GetName(), "tf2_") == 0 )
|
||
|
{
|
||
|
return PrintTF2Event( event );
|
||
|
}
|
||
|
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
protected:
|
||
|
|
||
|
bool PrintTF2Event( KeyValues * event ) // print Mod specific logs
|
||
|
{
|
||
|
// const char * name = event->GetName() + Q_strlen("tf2_"); // remove prefix
|
||
|
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
};
|
||
|
|
||
|
CTF2EventLog g_TF2EventLog;
|
||
|
|
||
|
//-----------------------------------------------------------------------------
|
||
|
// Singleton access
|
||
|
//-----------------------------------------------------------------------------
|
||
|
IGameSystem* GameLogSystem()
|
||
|
{
|
||
|
return &g_TF2EventLog;
|
||
|
}
|
||
|
|