Counter Strike : Global Offensive Source Code
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.

65 lines
1.5 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef PLAYERSTATE_H
  8. #define PLAYERSTATE_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include "edict.h"
  13. #include "networkvar.h"
  14. // Only care about this stuff in game/client .dlls
  15. #if defined( CLIENT_DLL )
  16. #include "predictable_entity.h"
  17. #endif
  18. class CPlayerState
  19. {
  20. public:
  21. DECLARE_CLASS_NOBASE( CPlayerState );
  22. DECLARE_EMBEDDED_NETWORKVAR();
  23. // This virtual method is necessary to generate a vtable in all cases
  24. // (DECLARE_PREDICTABLE will generate a vtable also)!
  25. virtual ~CPlayerState() {}
  26. // true if the player is dead
  27. CNetworkVar( bool, deadflag );
  28. // Viewing angle (player only)
  29. QAngle v_angle;
  30. // The client .dll only cares about deadflag
  31. // the game and engine .dlls need to worry about the rest of this data
  32. #if !defined( CLIENT_DLL )
  33. // Player's network name
  34. string_t netname;
  35. // 0:nothing, 1:force view angles, 2:add avelocity
  36. int fixangle;
  37. // delta angle for fixangle == FIXANGLE_RELATIVE
  38. QAngle anglechange;
  39. // flag to single the HLTV/Replay fake client, not transmitted
  40. bool hltv;
  41. bool replay;
  42. int frags;
  43. int assists;
  44. int deaths;
  45. int score;
  46. #endif
  47. // NOTE: Only care about this stuff in game/client dlls
  48. // Put at end in case it has any effect on size of structure
  49. #if defined( GAME_DLL )
  50. DECLARE_SIMPLE_DATADESC();
  51. #endif
  52. #if defined( CLIENT_DLL )
  53. DECLARE_PREDICTABLE();
  54. #endif
  55. };
  56. #endif // PLAYERSTATE_H