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.

107 lines
2.8 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //
  7. //=============================================================================//
  8. #ifndef MAPRULES_H
  9. #define MAPRULES_H
  10. class CRuleEntity : public CBaseEntity
  11. {
  12. public:
  13. DECLARE_CLASS( CRuleEntity, CBaseEntity );
  14. void Spawn( void );
  15. DECLARE_DATADESC();
  16. void SetMaster( string_t iszMaster ) { m_iszMaster = iszMaster; }
  17. protected:
  18. bool CanFireForActivator( CBaseEntity *pActivator );
  19. private:
  20. string_t m_iszMaster;
  21. };
  22. //
  23. // CRulePointEntity -- base class for all rule "point" entities (not brushes)
  24. //
  25. class CRulePointEntity : public CRuleEntity
  26. {
  27. public:
  28. DECLARE_DATADESC();
  29. DECLARE_CLASS( CRulePointEntity, CRuleEntity );
  30. int m_Score;
  31. void Spawn( void );
  32. };
  33. class CGameCoopMissionManager : public CRulePointEntity
  34. {
  35. public:
  36. DECLARE_CLASS( CGameCoopMissionManager, CRulePointEntity );
  37. DECLARE_ENT_SCRIPTDESC();
  38. DECLARE_DATADESC();
  39. void Spawn( void );
  40. bool KeyValue( const char *szKeyName, const char *szValue );
  41. int GetWaveNumber( void );
  42. void SetWaveCompleted( void );
  43. void SetRoundReset( void );
  44. void SetSpawnsReset( void ); // used for spawns
  45. void SetRoundLostKilled( void );
  46. void SetRoundLostTime( void );
  47. void SetMissionCompleted( void );
  48. //void InputGetWaveNumber( inputdata_t &inputdata );
  49. private:
  50. COutputEvent m_OnWaveCompleted;
  51. COutputEvent m_OnRoundReset;
  52. COutputEvent m_OnSpawnsReset;
  53. COutputEvent m_OnRoundLostKilled;
  54. COutputEvent m_OnRoundLostTime;
  55. COutputEvent m_OnMissionCompleted;
  56. };
  57. #define SF_PLAYEREQUIP_USEONLY 0x0001
  58. #define SF_PLAYEREQUIP_STRIPFIRST 0x0002
  59. #define SF_PLAYEREQUIP_ONLYSTRIPSAME 0x0004
  60. #define MAX_EQUIP 32
  61. class CGamePlayerEquip : public CRulePointEntity
  62. {
  63. DECLARE_DATADESC();
  64. public:
  65. DECLARE_CLASS( CGamePlayerEquip, CRulePointEntity );
  66. //inputs
  67. void InputTriggerForAllPlayers( inputdata_t &inputdata );
  68. void InputTriggerForActivatedPlayer( inputdata_t &inputdata );
  69. bool KeyValue( const char *szKeyName, const char *szValue );
  70. void TriggerForAllPlayers( void );
  71. void TriggerForActivatedPlayer( CBasePlayer *pPlayer, const char *szWeapon );
  72. void Touch( CBaseEntity *pOther );
  73. void Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value );
  74. inline bool UseOnly( void ) { return ( m_spawnflags & SF_PLAYEREQUIP_USEONLY ) ? true : false; }
  75. inline bool StripFirst( void ) { return ( m_spawnflags & SF_PLAYEREQUIP_STRIPFIRST ) ? true : false; }
  76. inline bool OnlyStripSameWeaponType( void ) { return ( m_spawnflags & SF_PLAYEREQUIP_ONLYSTRIPSAME ) ? true : false; }
  77. private:
  78. void EquipPlayer( CBaseEntity *pPlayer, const char *szWeapon = NULL );
  79. string_t m_weaponNames[MAX_EQUIP];
  80. int m_weaponCount[MAX_EQUIP];
  81. };
  82. #endif // MAPRULES_H