forked from hitmen047/Source-PlusPlus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIVehicle.h
47 lines (36 loc) · 1.49 KB
/
IVehicle.h
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
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
// $NoKeywords: $
//=============================================================================//
#ifndef IVEHICLE_H
#define IVEHICLE_H
#ifdef _WIN32
#pragma once
#endif
#include "baseplayer_shared.h"
class CUserCmd;
class IMoveHelper;
class CMoveData;
class CBaseCombatCharacter;
// This is used by the player to access vehicles. It's an interface so the
// vehicles are not restricted in what they can derive from.
abstract_class IVehicle
{
public:
// Get and set the current driver. Use PassengerRole_t enum in shareddefs.h for adding passengers
virtual CBaseCombatCharacter* GetPassenger( int nRole = VEHICLE_ROLE_DRIVER ) = 0;
virtual int GetPassengerRole( CBaseCombatCharacter *pPassenger ) = 0;
// Where is the passenger seeing from?
virtual void GetVehicleViewPosition( int nRole, Vector *pOrigin, QAngle *pAngles, float *pFOV = NULL ) = 0;
// Does the player use his normal weapons while in this mode?
virtual bool IsPassengerUsingStandardWeapons( int nRole = VEHICLE_ROLE_DRIVER ) = 0;
// Process movement
virtual void SetupMove( CBasePlayer *player, CUserCmd *ucmd, IMoveHelper *pHelper, CMoveData *move ) = 0;
virtual void ProcessMovement( CBasePlayer *pPlayer, CMoveData *pMoveData ) = 0;
virtual void FinishMove( CBasePlayer *player, CUserCmd *ucmd, CMoveData *move ) = 0;
// Process input
virtual void ItemPostFrame( CBasePlayer *pPlayer ) = 0;
};
#endif // IVEHICLE_H