summaryrefslogtreecommitdiff
path: root/game/server/tf2/tf_vehicle_battering_ram.h
diff options
context:
space:
mode:
Diffstat (limited to 'game/server/tf2/tf_vehicle_battering_ram.h')
-rw-r--r--game/server/tf2/tf_vehicle_battering_ram.h58
1 files changed, 58 insertions, 0 deletions
diff --git a/game/server/tf2/tf_vehicle_battering_ram.h b/game/server/tf2/tf_vehicle_battering_ram.h
new file mode 100644
index 0000000..d4c403a
--- /dev/null
+++ b/game/server/tf2/tf_vehicle_battering_ram.h
@@ -0,0 +1,58 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose: A stationary gun that players can man
+//
+// $NoKeywords: $
+//=============================================================================//
+
+#ifndef TF_VEHICLE_BATTERING_RAM_H
+#define TF_VEHICLE_BATTERING_RAM_H
+
+#ifdef _WIN32
+#pragma once
+#endif
+
+#include "tf_basefourwheelvehicle.h"
+#include "vphysics/vehicles.h"
+
+
+// ------------------------------------------------------------------------ //
+// A stationary gun that players can man that's built by the player
+// ------------------------------------------------------------------------ //
+class CVehicleBatteringRam : public CBaseTFFourWheelVehicle
+{
+ DECLARE_CLASS( CVehicleBatteringRam, CBaseTFFourWheelVehicle );
+
+public:
+ DECLARE_SERVERCLASS();
+
+ static CVehicleBatteringRam* Create(const Vector &vOrigin, const QAngle &vAngles);
+
+ CVehicleBatteringRam();
+
+ virtual void Spawn();
+ virtual void Precache();
+ virtual void GetControlPanelInfo( int nPanelIndex, const char *&pPanelName );
+ virtual bool CanTakeEMPDamage( void ) { return true; }
+
+ void OnItemPostFrame( CBaseTFPlayer *pDriver );
+
+ // Can a given passenger take damage?
+ virtual bool IsPassengerDamagable( int nRole ) { return (nRole > 1); }
+
+ // Vehicle overrides
+ virtual bool IsPassengerVisible( int nRole ) { return true; }
+
+ // Does the player use his normal weapons while in this mode?
+ virtual bool IsPassengerUsingStandardWeapons( int nRole );
+
+ // Used to bash things it touches
+ virtual void VPhysicsCollision( int index, gamevcollisionevent_t *pEvent );
+
+private:
+
+ int m_nBarrelAttachment;
+ float m_flNextBashTime;
+};
+
+#endif // TF_VEHICLE_BATTERING_RAM_H