IVehicleClient

Handles game specific client/player tasks

C++
struct IVehicleClient {
};
File

IVehicleSystem.h

Description

The implementation of the vehicle client class is used to perform game specific tasks related to the client player. For example, it can be used to store the last view used by the player on specific vehicle class or to filter game specific action types into vehicle ActionIds.

Remarks

Should be implemented inside the Game DLL. The game should call the function IVehicleSystem::RegisterVehicleClient during intialization.

IVehicleClient::~IVehicleClient Destructor
C++
virtual ~IVehicleClient();
IVehicleClient::Init Method

Initializes the vehicle client implementation

C++
virtual bool Init() = 0;
Returns

A bool representing the success of the initialization

IVehicleClient::OnAction Method

Filters client actions Parameter pVehicle - vehicle instance used by the client actionId - ActionId sent activationMode - One of the different activation mode defined in EActionActivationMode value - value of the action

C++
virtual void OnAction(IVehicle* pVehicle, EntityId actorId, const ActionId& actionId, int activationMode, float value) = 0;
IVehicleClient::OnEnterVehicleSeat Method

Perform game specific tasks when the client enter a vehicle seat

C++
virtual void OnEnterVehicleSeat(IVehicleSeat* pSeat) = 0;
Parameters
Parameters
Description
IVehicleSeat* pSeat
instance of the new vehicle seat assigned to the client
Notes

Is also called when the client switch to a different seats inside the same vehicle

IVehicleClient::OnExitVehicleSeat Method

Perform game specific tasks when the client exit a vehicle seat

C++
virtual void OnExitVehicleSeat(IVehicleSeat* pSeat) = 0;
Parameters
Parameters
Description
IVehicleSeat* pSeat
instance of the new vehicle seat exited by the client
Notes

Is also called when the client switch to a different seats inside the same vehicle

IVehicleClient::Release Method

Releases the vehicle client implementation

C++
virtual void Release() = 0;
Notes

Should only be called when the game is shutdown

IVehicleClient::Reset Method
C++
virtual void Reset() = 0;