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. //
  4. //
  5. //=============================================================================
  6. #ifndef TF_OBJ_CATAPULT_H
  7. #define TF_OBJ_CATAPULT_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "tf_obj.h"
  12. class CTFPlayer;
  13. #define CATAPULT_MAX_HEALTH 150
  14. #ifdef STAGING_ONLY
  15. // ------------------------------------------------------------------------ //
  16. // Base catapult object
  17. // ------------------------------------------------------------------------ //
  18. class CObjectCatapult : public CBaseObject
  19. {
  20. DECLARE_CLASS( CObjectCatapult, CBaseObject );
  21. DECLARE_DATADESC();
  22. public:
  23. //DECLARE_SERVERCLASS();
  24. CObjectCatapult();
  25. virtual void Spawn();
  26. virtual void Precache();
  27. virtual bool IsPlacementPosValid( void );
  28. virtual void StartTouch( CBaseEntity *pOther );
  29. virtual void EndTouch( CBaseEntity *pOther );
  30. void CatapultThink();
  31. virtual void OnGoActive();
  32. // Wrench hits
  33. //virtual bool Command_Repair( CTFPlayer *pActivator, float flRepairMod );
  34. //virtual bool InputWrenchHit( CTFPlayer *pPlayer, CTFWrench *pWrench, Vector hitLoc );
  35. // Upgrading
  36. //virtual bool IsUpgrading( void ) const { return false; }
  37. //virtual bool CheckUpgradeOnHit( CTFPlayer *pPlayer );
  38. virtual int GetBaseHealth( void ) { return CATAPULT_MAX_HEALTH; }
  39. private:
  40. void Launch( CBaseEntity* pEnt );
  41. struct Jumper_t
  42. {
  43. CHandle< CBaseEntity > m_hJumper;
  44. float flTouchTime;
  45. };
  46. CUtlVector< Jumper_t > m_jumpers;
  47. };
  48. #endif // STAGING_ONLY
  49. #endif // TF_OBJ_CATAPULT_H