mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2025-09-20 20:46:03 +08:00
Added most recent version of unmodified HL2 SDK for Episode 1 engine
This commit is contained in:
55
dlls/sdk/sdk_eventlog.cpp
Normal file
55
dlls/sdk/sdk_eventlog.cpp
Normal file
@ -0,0 +1,55 @@
|
||||
//========= Copyright <20> 1996-2005, Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//
|
||||
//=============================================================================//
|
||||
#include "cbase.h"
|
||||
#include "../EventLog.h"
|
||||
#include "KeyValues.h"
|
||||
|
||||
class CSDKEventLog : public CEventLog
|
||||
{
|
||||
private:
|
||||
typedef CEventLog BaseClass;
|
||||
|
||||
public:
|
||||
virtual ~CSDKEventLog() {};
|
||||
|
||||
public:
|
||||
bool PrintEvent( IGameEvent * event ) // override virtual function
|
||||
{
|
||||
if ( BaseClass::PrintEvent( event ) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if ( Q_strcmp(event->GetName(), "sdk_") == 0 )
|
||||
{
|
||||
return PrintSDKEvent( event );
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
bool PrintSDKEvent( IGameEvent * event ) // print Mod specific logs
|
||||
{
|
||||
//const char * name = event->GetName() + Q_strlen("sdk_"); // remove prefix
|
||||
return false;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
CSDKEventLog g_SDKEventLog;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Singleton access
|
||||
//-----------------------------------------------------------------------------
|
||||
IGameSystem* GameLogSystem()
|
||||
{
|
||||
return &g_SDKEventLog;
|
||||
}
|
||||
|
Reference in New Issue
Block a user