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.

76 lines
2.0 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: CS's custom C_PlayerResource
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef C_CS_PLAYERRESOURCE_H
  8. #define C_CS_PLAYERRESOURCE_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include "cs_shareddefs.h"
  13. #include "c_playerresource.h"
  14. class C_CS_PlayerResource : public C_PlayerResource
  15. {
  16. DECLARE_CLASS( C_CS_PlayerResource, C_PlayerResource );
  17. public:
  18. DECLARE_CLIENTCLASS();
  19. C_CS_PlayerResource();
  20. virtual ~C_CS_PlayerResource();
  21. bool IsVIP(int iIndex );
  22. bool HasC4(int iIndex );
  23. bool IsHostageAlive(int iIndex);
  24. bool IsHostageFollowingSomeone(int iIndex);
  25. const Vector GetHostagePosition( int index );
  26. int GetHostageEntityID(int iIndex);
  27. const Vector GetC4Postion();
  28. const Vector GetBombsiteAPosition();
  29. const Vector GetBombsiteBPosition();
  30. const Vector GetHostageRescuePosition( int index );
  31. int GetPlayerClass( int iIndex );
  32. bool IsBombSpotted( void ) const;
  33. bool IsPlayerSpotted( int iIndex );
  34. const char *GetClanTag( int index );
  35. int GetNumMVPs( int iIndex );
  36. bool HasDefuser( int iIndex );
  37. protected:
  38. int m_iPlayerC4; // entity index of C4 carrier or 0
  39. int m_iPlayerVIP; // entity index of VIP player or 0
  40. Vector m_vecC4; // position of C4
  41. Vector m_bombsiteCenterA;
  42. Vector m_bombsiteCenterB;
  43. bool m_bHostageAlive[MAX_HOSTAGES];
  44. bool m_isHostageFollowingSomeone[MAX_HOSTAGES];
  45. int m_iHostageEntityIDs[MAX_HOSTAGES];
  46. int m_iHostageX[MAX_HOSTAGES];
  47. int m_iHostageY[MAX_HOSTAGES];
  48. int m_iHostageZ[MAX_HOSTAGES];
  49. int m_hostageRescueX[MAX_HOSTAGE_RESCUES];
  50. int m_hostageRescueY[MAX_HOSTAGE_RESCUES];
  51. int m_hostageRescueZ[MAX_HOSTAGE_RESCUES];
  52. bool m_bBombSpotted;
  53. bool m_bPlayerSpotted[ MAX_PLAYERS + 1 ];
  54. int m_iPlayerClasses[ MAX_PLAYERS + 1 ];
  55. char m_szClan[MAX_PLAYERS+1][MAX_CLAN_TAG_LENGTH];
  56. int m_iMVPs[ MAX_PLAYERS + 1 ];
  57. bool m_bHasDefuser[ MAX_PLAYERS + 1 ];
  58. };
  59. #endif // C_CS_PLAYERRESOURCE_H