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.

87 lines
3.3 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: Entity that propagates general data needed by clients for every player.
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef C_TF_OBJECTIVE_RESOURCE_H
  8. #define C_TF_OBJECTIVE_RESOURCE_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include "tf_shareddefs.h"
  13. #include "const.h"
  14. #include "c_baseentity.h"
  15. #include <igameresources.h>
  16. #include "c_team_objectiveresource.h"
  17. class C_TFObjectiveResource : public C_BaseTeamObjectiveResource
  18. {
  19. DECLARE_CLASS( C_TFObjectiveResource, C_BaseTeamObjectiveResource );
  20. public:
  21. DECLARE_CLIENTCLASS();
  22. C_TFObjectiveResource();
  23. virtual ~C_TFObjectiveResource();
  24. const char *GetGameSpecificCPCappingSwipe( int index, int iCappingTeam );
  25. const char *GetGameSpecificCPBarFG( int index, int iOwningTeam );
  26. const char *GetGameSpecificCPBarBG( int index, int iCappingTeam );
  27. void SetCappingTeam( int index, int team );
  28. int GetMannVsMachineMaxWaveCount( void ) { return m_nMannVsMachineMaxWaveCount; }
  29. int GetMannVsMachineWaveCount( void ) { return m_nMannVsMachineWaveCount; }
  30. int GetMannVsMachineWaveEnemyCount( void ) { return m_nMannVsMachineWaveEnemyCount; }
  31. int GetMvMInWorldMoney( void ) { return m_nMvMWorldMoney; }
  32. float GetMannVsMachineNextWaveTime( void ) { return m_flMannVsMachineNextWaveTime; }
  33. bool GetMannVsMachineIsBetweenWaves( void ) { return m_bMannVsMachineBetweenWaves; }
  34. int GetMannVsMachineWaveClassCount( int nIndex );
  35. const char *GetMannVsMachineWaveClassName( int nIndex );
  36. unsigned int GetMannVsMachineWaveClassFlags( int nIndex );
  37. bool GetMannVsMachineWaveClassActive( int nIndex );
  38. int GetFlagCarrierUpgradeLevel( void ) { return m_nFlagCarrierUpgradeLevel; }
  39. float GetBaseMvMBombUpgradeTime( void ) { return m_flMvMBaseBombUpgradeTime; }
  40. float GetNextMvMBombUpgradeTime( void ) { return m_flMvMNextBombUpgradeTime; }
  41. int GetMvMChallengeIndex ( void ) { return m_iChallengeIndex; }
  42. char * GetMvMPopFileName ( void ) { return m_iszMvMPopfileName; }
  43. int GetMvMEventPopfileType( void ) { return m_nMvMEventPopfileType; }
  44. private:
  45. int m_nMannVsMachineMaxWaveCount;
  46. int m_nMannVsMachineWaveCount;
  47. int m_nMannVsMachineWaveEnemyCount;
  48. int m_nMvMWorldMoney;
  49. float m_flMannVsMachineNextWaveTime;
  50. bool m_bMannVsMachineBetweenWaves;
  51. int m_nFlagCarrierUpgradeLevel;
  52. float m_flMvMBaseBombUpgradeTime;
  53. float m_flMvMNextBombUpgradeTime;
  54. int m_nMvMEventPopfileType;
  55. int m_nMannVsMachineWaveClassCounts[ MVM_CLASS_TYPES_PER_WAVE_MAX ];
  56. int m_nMannVsMachineWaveClassCounts2[ MVM_CLASS_TYPES_PER_WAVE_MAX ];
  57. char m_iszMannVsMachineWaveClassNames[ MVM_CLASS_TYPES_PER_WAVE_MAX ][ 64 ];
  58. char m_iszMannVsMachineWaveClassNames2[ MVM_CLASS_TYPES_PER_WAVE_MAX ][ 64 ];
  59. int m_iChallengeIndex;
  60. char m_iszMvMPopfileName[ MAX_PATH ];
  61. unsigned int m_nMannVsMachineWaveClassFlags[ MVM_CLASS_TYPES_PER_WAVE_MAX ];
  62. unsigned int m_nMannVsMachineWaveClassFlags2[ MVM_CLASS_TYPES_PER_WAVE_MAX ];
  63. bool m_bMannVsMachineWaveClassActive[ MVM_CLASS_TYPES_PER_WAVE_MAX ];
  64. bool m_bMannVsMachineWaveClassActive2[ MVM_CLASS_TYPES_PER_WAVE_MAX ];
  65. };
  66. inline C_TFObjectiveResource *TFObjectiveResource()
  67. {
  68. return static_cast<C_TFObjectiveResource*>(g_pObjectiveResource);
  69. }
  70. #endif // C_TF_OBJECTIVE_RESOURCE_H