IVehicle: Difference between revisions
Jump to navigation
Jump to search
JurgenKnops (talk | contribs) m (Spam revert.) |
m (minoro) |
||
| Line 1: | Line 1: | ||
This interface class is defined in <code>src\game_shared\IVehicle.h</code>. This class is the interface from which vehicles are derived. It is used by the player to access vehicles. | This interface class is defined in <code>src\game_shared\IVehicle.h</code>. This class is the interface from which vehicles are derived. It is used by the player to access vehicles. | ||
class IVehicle | class IVehicle | ||
{ | { | ||
| Line 21: | Line 22: | ||
virtual void [[ItemPostFrame]]( CBasePlayer *pPlayer ) = 0; | virtual void [[ItemPostFrame]]( CBasePlayer *pPlayer ) = 0; | ||
} | } | ||
==See | |||
== See also == | |||
* {{doxygen|_i_vehicle_8h-source.html IVehicle.h on HL2 SDK Doxygen}} | * {{doxygen|_i_vehicle_8h-source.html IVehicle.h on HL2 SDK Doxygen}} | ||
[[Category:Interfaces]] | [[Category:Interfaces]] | ||
Revision as of 06:16, 11 November 2007
This interface class is defined in src\game_shared\IVehicle.h. This class is the interface from which vehicles are derived. It is used by the player to access vehicles.
class IVehicle
{
public:
// Get and set the current driver. Use PassengerRole_t enum in shareddefs.h for adding passengers
virtual CBasePlayer* GetPassenger( int nRole = VEHICLE_DRIVER ) = 0;
virtual int GetPassengerRole( CBasePlayer *pPassenger ) = 0;
// Where is the passenger seeing from?
virtual void GetVehicleViewPosition( int nRole, Vector *pOrigin, QAngle *pAngles ) = 0;
// Does the player use his normal weapons while in this mode?
virtual bool IsPassengerUsingStandardWeapons( int nRole = VEHICLE_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;
}