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.

66 lines
1.5 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef DOD_BASEROCKET_H
  8. #define DOD_BASEROCKET_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include "cbase.h"
  13. #include "baseanimating.h"
  14. #include "smoke_trail.h"
  15. #include "weapon_dodbase.h"
  16. class RocketTrail;
  17. //================================================
  18. // CDODBaseRocket
  19. //================================================
  20. class CDODBaseRocket : public CBaseAnimating
  21. {
  22. DECLARE_CLASS( CDODBaseRocket, CBaseAnimating );
  23. public:
  24. CDODBaseRocket();
  25. ~CDODBaseRocket();
  26. void Spawn( void );
  27. void Precache( void );
  28. void RocketTouch( CBaseEntity *pOther );
  29. void Explode( void );
  30. void Fire( void );
  31. virtual float GetDamage() { return m_flDamage; }
  32. virtual void SetDamage(float flDamage) { m_flDamage = flDamage; }
  33. unsigned int PhysicsSolidMaskForEntity( void ) const;
  34. static CDODBaseRocket *Create( const char *szClassname, const Vector &vecOrigin, const QAngle &vecAngles, CBaseEntity *pOwner );
  35. void SetupInitialTransmittedGrenadeVelocity( const Vector &velocity );
  36. virtual DODWeaponID GetEmitterWeaponID() { return WEAPON_NONE; Assert(0); }
  37. protected:
  38. virtual void DoExplosion( trace_t *pTrace );
  39. void FlyThink( void );
  40. float m_flDamage;
  41. CNetworkVector( m_vInitialVelocity );
  42. private:
  43. DECLARE_DATADESC();
  44. DECLARE_SERVERCLASS();
  45. float m_flCollideWithTeammatesTime;
  46. bool m_bCollideWithTeammates;
  47. };
  48. #endif // DOD_BASEROCKET_H