Team Fortress 2 Source Code as on 22/4/2020
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.

55 lines
1.0 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //
  7. //=============================================================================//
  8. #include "cbase.h"
  9. #include "../EventLog.h"
  10. class CHL1EventLog : public CEventLog
  11. {
  12. private:
  13. typedef CEventLog BaseClass;
  14. public:
  15. virtual ~CHL1EventLog() {};
  16. public:
  17. bool PrintEvent( IGameEvent * event ) // override virtual function
  18. {
  19. if ( BaseClass::PrintEvent( event ) )
  20. {
  21. return true;
  22. }
  23. if ( Q_strcmp(event->GetName(), "hl1_") == 0 )
  24. {
  25. return PrintHL1Event( event );
  26. }
  27. return false;
  28. }
  29. protected:
  30. bool PrintHL1Event( IGameEvent * event ) // print Mod specific logs
  31. {
  32. // const char * name = event->GetName() + Q_strlen("hl1_"); // remove prefix
  33. return false;
  34. }
  35. };
  36. CHL1EventLog g_HL1EventLog;
  37. //-----------------------------------------------------------------------------
  38. // Singleton access
  39. //-----------------------------------------------------------------------------
  40. IGameSystem* GameLogSystem()
  41. {
  42. return &g_HL1EventLog;
  43. }