summaryrefslogtreecommitdiff
path: root/game/server/tf/tf_obj_catapult.h
diff options
context:
space:
mode:
Diffstat (limited to 'game/server/tf/tf_obj_catapult.h')
-rw-r--r--game/server/tf/tf_obj_catapult.h66
1 files changed, 66 insertions, 0 deletions
diff --git a/game/server/tf/tf_obj_catapult.h b/game/server/tf/tf_obj_catapult.h
new file mode 100644
index 0000000..54ab294
--- /dev/null
+++ b/game/server/tf/tf_obj_catapult.h
@@ -0,0 +1,66 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+//
+//
+//=============================================================================
+
+#ifndef TF_OBJ_CATAPULT_H
+#define TF_OBJ_CATAPULT_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+#include "tf_obj.h"
+
+class CTFPlayer;
+
+#define CATAPULT_MAX_HEALTH 150
+
+#ifdef STAGING_ONLY
+
+// ------------------------------------------------------------------------ //
+// Base catapult object
+// ------------------------------------------------------------------------ //
+class CObjectCatapult : public CBaseObject
+{
+ DECLARE_CLASS( CObjectCatapult, CBaseObject );
+ DECLARE_DATADESC();
+public:
+ //DECLARE_SERVERCLASS();
+
+ CObjectCatapult();
+
+ virtual void Spawn();
+ virtual void Precache();
+ virtual bool IsPlacementPosValid( void );
+
+ virtual void StartTouch( CBaseEntity *pOther );
+ virtual void EndTouch( CBaseEntity *pOther );
+
+ void CatapultThink();
+
+ virtual void OnGoActive();
+
+ // Wrench hits
+ //virtual bool Command_Repair( CTFPlayer *pActivator, float flRepairMod );
+ //virtual bool InputWrenchHit( CTFPlayer *pPlayer, CTFWrench *pWrench, Vector hitLoc );
+
+ // Upgrading
+ //virtual bool IsUpgrading( void ) const { return false; }
+ //virtual bool CheckUpgradeOnHit( CTFPlayer *pPlayer );
+
+ virtual int GetBaseHealth( void ) { return CATAPULT_MAX_HEALTH; }
+private:
+ void Launch( CBaseEntity* pEnt );
+
+ struct Jumper_t
+ {
+ CHandle< CBaseEntity > m_hJumper;
+ float flTouchTime;
+ };
+ CUtlVector< Jumper_t > m_jumpers;
+};
+
+#endif // STAGING_ONLY
+
+#endif // TF_OBJ_CATAPULT_H