DIFF

class TransportSourceSource

Transport Pawn EntityAI Entity ObjectTyped Object IEntity Managed

Base class depends on build flags: PawnFEATURE_NETWORK_RECONCILIATION · EntityAI!FEATURE_NETWORK_RECONCILIATION

All members, including inherited

Constructors 1

Members 8

private static ref VehicleFlippedContext m_FlippedContext

Shared context across all vehicles for flipping

Referenced by GetFlipContext()
ref TIntArray m_SingleUseActions
ref TIntArray m_ContinuousActions
ref TIntArray m_InteractActions
protected bool m_EngineZoneReceivedHit
protected vector m_fuelPos
protected ref set<int> m_UnconsciousCrewMemberIndices
Referenced by Transport()
protected ref set<int> m_DeadCrewMemberIndices
Referenced by Transport()

Methods 76

override void EEHitBy(TotalDamageResult damageResult, int damageType, EntityAI source, int component, string dmgZone, string ammo, vector modelPos, float speedCoef)
override int GetMeleeTargetType()
protected override event typename GetOwnerStateType()
protected override event typename GetMoveType()
proto native void Synchronize()

Synchronizes car's state in case the simulation is not running.

proto native int CrewPositionIndex(int componentIdx)

Returns crew member index based on action component index. -1 is returned when no crew position corresponds to given component index.

proto native Human CrewMember(int posIdx)

Returns crew member based on position index. Null can be returned if no Human is present on the given position.

proto native Human CrewDriver()

Returns the driver Null can be returned if no Human is present.

proto void CrewEntry(int posIdx, out vector pos, out vector dir)

Reads entry point and direction into vehicle on given position in model space.

Referenced by IsAreaAtDoorFree()
proto void CrewEntryWS(int posIdx, out vector pos, out vector dir)

Reads entry point and direction into vehicle on given position in world space.

proto void CrewTransform(int posIdx, out vector mat[4])

Returns crew transformation indside vehicle in model space

proto void CrewTransformWS(int posIdx, out vector mat[4])

Returns crew transformation indside vehicle in world space

proto native void CrewGetIn(Human player, int posIdx)

Performs transfer of player from world into vehicle on given position.

proto native Human CrewGetOut(int posIdx)

Performs transfer of player from vehicle into world from given position.

proto native void CrewDeath(int posIdx)

Handles death of player in vehicle and awakes its physics if needed

void OnDriverEnter(Human player)

Is called when the crew member enters the driver seat

in player
The player that entered the driver seat
void OnDriverExit(Human player)

Is called when the crew member leaves the driver seat

in player
The player that left the driver seat
proto native bool LightIsOn()

Returns true when lights are on, false otherwise.

proto native void LightOn()

Signals for LightIsOn to return true

proto native void LightOff()

Signals for LightIsOn to return false

proto native void LightToggle()

Calls LightOn/LightOff depending on current light state

bool OnBeforeLightOn()

Is called by native every time the game wants to turn on the light

Returns: true if the light can turn on, false otherwise.

void OnUpdateLight()

Is called by native every time the game wants to update the light

References UpdateLights()
proto void ApplyForce(vector force)

Applies constant force on the physics body (at origin).

proto void ApplyTorque(vector force)

Applies constant torque on the physics body.

proto void ApplyForceAt(vector pos, vector force)

Applies constant force on the physics body at a position (world space coordinates).

proto void ApplyCentralImpulse(vector centralImpulse)

Applies impulse on the physics body (at origin).

proto void ApplyTorqueImpulse(vector torqueImpulse)

Applies impulse torque on the physics body.

proto void ApplyImpulseAt(vector pos, vector force)

Applies impulse on the physics body at a position (world space coordinates).

proto native int Random()

Random number in range of <0,0xffffffff> - !!! use this only during deterministic simulation (EOnSimulate/EOnPostSimulate)

Returns: int value in range of <0,0xffffffff>

proto native float RandomRange(int pRange)

Random number in range of <0,pRange-1> - !!! use this only during deterministic simulation (EOnSimulate/EOnPostSimulate)

pRange
upper bounds of random number

Returns: int value in range of <0,pRange-1>

proto native float Random01()

Random number in range of <0,1> - !!! use this only during deterministic simulation (EOnSimulate/EOnPostSimulate)

Returns: float value in range of <0,1>

Referenced by RandomFloat()
float RandomFloat(float min, float max)

Random number in range of <min,max> - !!! use this only during deterministic simulation (EOnSimulate/EOnPostSimulate)

Returns: float value in range of <min,max>

References Random01()
Referenced by CarScript.LeakFluid()
void OnContact(string zoneName, vector localPos, IEntity other, Contact data)

Is called every time when vehicle collides with other object.

in zoneName
configured vehicle's zone that was hit
in localPos
position where the vehicle was hit in vehicle's space
in other
object with which the vehicle is colliding
in data
contact properties
void OnInput(float dt)

Called after every input simulation step.

Note that the player character and other systems can always change the internal state. It is highly recommended to store state of custom inputs elsewhere and call Setters here.

in dt
delta time since last called in seconds
void OnUpdate(float dt)

Is called every game frame on client, fixed rate on server

in dt
delta time since last called in seconds
void UpdateLights(int new_gear = -1)
Referenced by OnUpdateLight()
override bool IsTransport()
override bool IsIgnoredByConstruction()
override bool IsHealthVisible()
override bool ShowZonesHealth()
override int GetHideIconMask()
string GetVehicleType()
string GetActionCompNameFuel()
protected bool DetectFlipped(VehicleFlippedContext ctx)

Override based on vehicle implementation (Car, Boat, modded, etc.)

Referenced by IsActionFlipped(), and IsFlipped()
bool IsFlipped()

Don't override, may change to native for caching 'DetectFlipped' in the future based on active-ness (i.e. only updated when vehicle changes active state)

bool IsActionFlipped(Man player)

Don't override, may change to native for caching 'DetectFlipped' in the future based on active-ness (i.e. only updated when vehicle changes active state)

bool IsAnyCrewPresent()
References CrewMember(), and CrewSize()
void MarkCrewMemberUnconscious(int crewMemberIndex)
void MarkCrewMemberDead(int crewMemberIndex)
int GetAnimInstance()
References Error()
int Get3rdPersonCameraType()
References Error()
bool CanReachSeatFromSeat(int currentSeat, int nextSeat)
bool CanReachSeatFromDoors(string pSeatSelection, vector pFromPos, float pDistance = 1.0)
bool CanReachDoorsFromSeat(string pDoorsSelection, int pCurrentSeat)
int GetSeatIndexFromDoor(string pDoorSelection)
void SetEngineZoneReceivedHit(bool pState)

Ignore any player that is currently in this vehicle

bool HasEngineZoneReceivedHit()
bool IsAreaAtDoorFree(int currentSeat, float maxAllowedObjHeight = 0.5, float horizontalExtents = 0.5, float playerHeight = 1.7)
Shape DebugFreeAreaAtDoor(int currentSeat, float maxAllowedObjHeight = 0.5, float horizontalExtents = 0.5, float playerHeight = 1.7)
References ARGB(), Debug.DrawBox(), IsAreaAtDoorFree()
Show 1 more, Shape.SetMatrix()