blob: d4c403a4cbd87f867abd6e91f7bf6833e52a2bb9 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
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
|