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.

75 lines
2.5 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: Bomb Target Area ent
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #include "cbase.h"
  8. #include "triggers.h"
  9. #include "cvisibilitymonitor.h"
  10. //#include "cs_player_resource.h"
  11. class CBombTarget : public CBaseTrigger
  12. {
  13. public:
  14. DECLARE_CLASS( CBombTarget, CBaseTrigger );
  15. DECLARE_DATADESC();
  16. CBombTarget();
  17. void Spawn();
  18. virtual void ReInitOnRoundStart( void );
  19. void EXPORT BombTargetTouch( CBaseEntity* pOther );
  20. void EXPORT BombTargetUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value );
  21. void OnBombExplode( inputdata_t &inputdata );
  22. void OnBombPlanted( inputdata_t &inputdata );
  23. void OnBombDefused( inputdata_t &inputdata );
  24. bool IsHeistBombTarget( void ) { return m_bIsHeistBombTarget; }
  25. const char *GetBombMountTarget( void ){ return STRING( m_szMountTarget ); }
  26. private:
  27. COutputEvent m_OnBombExplode; //Fired when the bomb explodes
  28. COutputEvent m_OnBombPlanted; //Fired when the bomb is planted
  29. COutputEvent m_OnBombDefused; //Fired when the bomb is defused
  30. bool m_bIsHeistBombTarget;
  31. bool m_bBombPlantedHere;
  32. string_t m_szMountTarget;
  33. EHANDLE m_hInstructorHint; // Hint that's used by the instructor system
  34. };
  35. //-----------------------------------------------------------------------------
  36. // Purpose: A generic target entity that gets replicated to the client for displaying a hint for the CS bomb targets
  37. //-----------------------------------------------------------------------------
  38. class CInfoInstructorHintBombTargetA : public CPointEntity
  39. {
  40. public:
  41. DECLARE_CLASS( CInfoInstructorHintBombTargetA, CPointEntity );
  42. void Spawn( void );
  43. virtual int UpdateTransmitState( void ) // set transmit filter to transmit always
  44. {
  45. return SetTransmitState( FL_EDICT_ALWAYS );
  46. }
  47. DECLARE_DATADESC();
  48. };
  49. //-----------------------------------------------------------------------------
  50. // Purpose: A generic target entity that gets replicated to the client for displaying a hint for the CS bomb targets
  51. //-----------------------------------------------------------------------------
  52. class CInfoInstructorHintBombTargetB : public CPointEntity
  53. {
  54. public:
  55. DECLARE_CLASS( CInfoInstructorHintBombTargetB, CPointEntity );
  56. void Spawn( void );
  57. virtual int UpdateTransmitState( void ) // set transmit filter to transmit always
  58. {
  59. return SetTransmitState( FL_EDICT_ALWAYS );
  60. }
  61. DECLARE_DATADESC();
  62. };