diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /game/server/tf2/tf_vehicle_battering_ram.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'game/server/tf2/tf_vehicle_battering_ram.h')
| -rw-r--r-- | game/server/tf2/tf_vehicle_battering_ram.h | 58 |
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 |