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.

78 lines
1.7 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #ifndef DOD_STATMGR_H
  7. #define DOD_STATMGR_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "GameEventListener.h"
  12. #include <igamesystem.h>
  13. // Structure that holds all information related to how a player related to a
  14. //
  15. typedef struct
  16. {
  17. // shots taken
  18. int m_iNumShotsTaken;
  19. // shots hit
  20. int m_iNumShotsHit;
  21. // total damage given
  22. int m_iTotalDamageGiven;
  23. // average distance of hit shots
  24. float m_flAverageHitDistance;
  25. // total kills
  26. int m_iNumKills;
  27. // times we hit each hitgroup
  28. int m_iBodygroupsHit[7];
  29. // times hit by this weapon
  30. int m_iNumHitsTaken;
  31. // total damage given to us
  32. int m_iTotalDamageTaken;
  33. // times killed by this weapon
  34. int m_iTimesKilled;
  35. // times we were hit in each hitgroup
  36. int m_iHitInBodygroups[8];
  37. } weaponstat_t;
  38. // Can be used to represent a victim and how many times we killed him,
  39. // or as an attacker, how many times we were killed by this person
  40. typedef struct
  41. {
  42. char m_szPlayerName[MAX_PLAYER_NAME_LENGTH]; // when we add this player, store the player name
  43. int m_iUserID; // player that did the killing
  44. int m_iKills; // number of kills
  45. int m_iTotalDamage; // amount of damage
  46. } playerstat_t;
  47. class CDODStatManager : public CGameEventListener, public CAutoGameSystem
  48. {
  49. private:
  50. typedef CBaseGameSystem BaseClass;
  51. public:
  52. CDODStatManager();
  53. public: // IGameEventListener Interface
  54. virtual void FireGameEvent( IGameEvent * event );
  55. public: // CBaseGameSystem overrides
  56. virtual bool Init();
  57. //virtual void Shutdown() {}
  58. };
  59. #endif // DOD_STATMGR_H