summaryrefslogtreecommitdiff
path: root/game/server/tf2/tf_vehicle_siege_tower.h
diff options
context:
space:
mode:
Diffstat (limited to 'game/server/tf2/tf_vehicle_siege_tower.h')
-rw-r--r--game/server/tf2/tf_vehicle_siege_tower.h109
1 files changed, 109 insertions, 0 deletions
diff --git a/game/server/tf2/tf_vehicle_siege_tower.h b/game/server/tf2/tf_vehicle_siege_tower.h
new file mode 100644
index 0000000..6832adc
--- /dev/null
+++ b/game/server/tf2/tf_vehicle_siege_tower.h
@@ -0,0 +1,109 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose: Siege Tower Vehicle
+//
+//=============================================================================//
+
+#ifndef TF_VEHICLE_SIEGE_TOWER_H
+#define TF_VEHICLE_SIEGE_TOWER_H
+
+#ifdef _WIN32
+#pragma once
+#endif
+
+#include "tf_basefourwheelvehicle.h"
+#include "vphysics/vehicles.h"
+
+//=============================================================================
+//
+// Siege Ladder (Object)
+//
+class CObjectSiegeLadder : public CBaseAnimating
+{
+ DECLARE_CLASS( CObjectSiegeLadder, CBaseAnimating );
+
+public:
+
+ DECLARE_SERVERCLASS();
+
+ static CObjectSiegeLadder* Create( const Vector &vOrigin, const QAngle &vAngles, CBaseEntity *pParent );
+
+ CObjectSiegeLadder();
+
+ void Spawn();
+ void Precache();
+ virtual int OnTakeDamage( const CTakeDamageInfo &info );
+
+public:
+ EHANDLE m_hTower;
+};
+
+//=============================================================================
+//
+// Siege Platform (Object)
+//
+class CObjectSiegePlatform : public CBaseAnimating
+{
+ DECLARE_CLASS( CObjectSiegePlatform, CBaseAnimating );
+
+public:
+
+ DECLARE_SERVERCLASS();
+
+ static CObjectSiegePlatform* Create( const Vector &vOrigin, const QAngle &vAngles, CBaseEntity *pParent );
+
+ CObjectSiegePlatform();
+
+ void Spawn();
+ void Precache();
+ virtual int OnTakeDamage( const CTakeDamageInfo &info );
+
+public:
+ EHANDLE m_hTower;
+};
+
+//=============================================================================
+//
+// Siege Tower Vehicle
+//
+class CVehicleSiegeTower : public CBaseTFFourWheelVehicle
+{
+ DECLARE_CLASS( CVehicleSiegeTower, CBaseTFFourWheelVehicle );
+
+public:
+
+ DECLARE_SERVERCLASS();
+
+ static CVehicleSiegeTower* Create( const Vector &vOrigin, const QAngle &vAngles );
+
+ CVehicleSiegeTower();
+
+ void Spawn();
+ void Precache();
+ void Killed(void );
+ void GetControlPanelInfo( int nPanelIndex, const char *&pPanelName );
+ bool CanTakeEMPDamage( void ) { return true; }
+
+ // Vehicle overrides
+ bool IsPassengerVisible( int nRole ) { return true; }
+
+protected:
+
+ // Here's where we deal with weapons
+ void OnItemPostFrame( CBaseTFPlayer *pDriver );
+
+private:
+
+ // Deploy.
+ void InternalDeploy( void );
+ void InternalUnDeploy( void );
+ void CreateLadder( const Vector &vecOrigin, const QAngle &vecAngles );
+ void DestroyLadder( void );
+
+private:
+
+ CHandle<CObjectSiegeLadder> m_hLadder;
+ CHandle<CObjectSiegePlatform> m_hPlatform;
+};
+
+#endif // TF_VEHICLE_SIEGE_TOWER_H