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.

84 lines
2.0 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #ifndef SENSORGRENADE_PROJECTILE_H
  7. #define SENSORGRENADE_PROJECTILE_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "basecsgrenade_projectile.h"
  12. #if defined( CLIENT_DLL )
  13. #include "c_props.h"
  14. #else // GAME_DLL
  15. #include "props.h"
  16. #endif
  17. #if defined( CLIENT_DLL )
  18. class C_SensorGrenadeProjectile : public C_BaseCSGrenadeProjectile//, public C_BreakableProp
  19. {
  20. public:
  21. DECLARE_CLASS( C_SensorGrenadeProjectile, C_BaseCSGrenadeProjectile );
  22. DECLARE_NETWORKCLASS();
  23. virtual bool Simulate( void );
  24. virtual void OnNewParticleEffect( const char *pszParticleName, CNewParticleEffect *pNewParticleEffect );
  25. virtual void OnParticleEffectDeleted( CNewParticleEffect *pParticleEffect );
  26. private:
  27. CUtlReference<CNewParticleEffect> m_sensorgrenadeParticleEffect;
  28. };
  29. #else // GAME_DLL
  30. struct SensorGrenadeWeaponProfile;
  31. class CSensorGrenadeProjectile : public CBaseCSGrenadeProjectile//, public CBreakableProp
  32. {
  33. public:
  34. DECLARE_CLASS( CSensorGrenadeProjectile, CBaseCSGrenadeProjectile );
  35. DECLARE_NETWORKCLASS();
  36. DECLARE_DATADESC();
  37. // Overrides.
  38. public:
  39. virtual void Spawn( void );
  40. virtual void Precache( void );
  41. virtual void Detonate( void );
  42. virtual void BounceTouch( CBaseEntity *other );
  43. virtual void BounceSound( void );
  44. virtual GrenadeType_t GetGrenadeType( void ) { return GRENADE_TYPE_SENSOR; }
  45. // Grenade stuff.
  46. static CSensorGrenadeProjectile* Create(
  47. const Vector &position,
  48. const QAngle &angles,
  49. const Vector &velocity,
  50. const AngularImpulse &angVelocity,
  51. CBaseCombatCharacter *pOwner,
  52. const CCSWeaponInfo& weaponInfo );
  53. private:
  54. void Think_Arm( void );
  55. void Think_Remove( void );
  56. void SensorThink( void );
  57. void SetTimer( float timer );
  58. void DoDetectWave( void );
  59. float m_fExpireTime;
  60. float m_fNextDetectPlayerSound;
  61. EHANDLE m_hDisplayGrenade;
  62. };
  63. #endif // GAME_DLL
  64. #endif // SENSORGRENADE_PROJECTILE_H