Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
carscript.c File Reference

Go to the source code of this file.

Enumerations

enum  CarDoorState { DOORS_MISSING, DOORS_OPEN, DOORS_CLOSED }
 

Functions

void CarScript ()
 
override void EEInit ()
 
vector GetEnginePosWS ()
 
vector GetCoolantPtcPosWS ()
 
vector GetRefillPointPosWS ()
 
vector GetEnginePointPosWS ()
 
vector GetFrontPointPosWS ()
 
vector GetBackPointPosWS ()
 
vector Get_1_1PointPosWS ()
 
vector Get_1_2PointPosWS ()
 
vector Get_2_1PointPosWS ()
 
vector Get_2_2PointPosWS ()
 
override float GetLiquidThroughputCoef ()
 
override void EEHitBy (TotalDamageResult damageResult, int damageType, EntityAI source, int component, string dmgZone, string ammo, vector modelPos, float speedCoef)
 
override void EEDelete (EntityAI parent)
 
void ~CarScript ()
 
void CleanupEffects ()
 
void CleanupSound (EffectSound sound)
 
override void GetDebugActions (out TSelectableActionInfoArrayEx outputList)
 
override bool OnAction (int action_id, Man player, ParamsReadContext ctx)
 
override void OnVariablesSynchronized ()
 
void CreateCarDestroyedEffect ()
 
override void EEItemAttached (EntityAI item, string slot_name)
 
void UpdateHeadlightState ()
 
override void EEItemDetached (EntityAI item, string slot_name)
 
override void OnAttachmentRuined (EntityAI attachment)
 
override bool CanReceiveAttachment (EntityAI attachment, int slotId)
 
override bool CanReleaseAttachment (EntityAI attachment)
 
protected bool CanManipulateSpareWheel (string slotSelectionName)
 
override void EOnPostSimulate (IEntity other, float timeSlice)
 
void OnBrakesPressed ()
 
void OnBrakesReleased ()
 
override void OnUpdate (float dt)
 
override void EEKilled (Object killer)
 
override void OnContact (string zoneName, vector localPos, IEntity other, Contact data)
 WARNING: Can be called very frequently in one frame, use with caution. More...
 
void CheckContactCache ()
 Responsible for damaging the car according to contact events from OnContact. More...
 
void DamageCrew (float dmg)
 Responsible for damaging crew in a car crash. More...
 
override float OnSound (CarSoundCtrl ctrl, float oldValue)
 
override void OnAnimationPhaseStarted (string animSource, float phase)
 
protected void HandleDoorsSound (string animSource, float phase)
 
protected void HandleSeatAdjustmentSound (string animSource, float phase)
 
protected void HandleCarHornSound (ECarHornState pState)
 
void HandleEngineSound (CarEngineSoundState state)
 
override void MarkCrewMemberUnconscious (int crewMemberIndex)
 
override void MarkCrewMemberDead (int crewMemberIndex)
 
override void HandleByCrewMemberState (ECrewMemberState state)
 
float GetEnviroHeatComfortOverride ()
 DEPRECATED
More...
 
override void OnFluidChanged (CarFluid fluid, float newValue, float oldValue)
 
override bool OnBeforeEngineStart ()
 
override void OnGearChanged (int newGear, int oldGear)
 
override void OnEngineStart ()
 Gets called everytime the engine starts. More...
 
override void OnEngineStop ()
 Gets called everytime the engine stops. More...
 
bool OnBeforeSwitchLights (bool toOn)
 
bool IsScriptedLightsOn ()
 Propper way to get if light is swiched on. Use instead of IsLightsOn(). More...
 
void ToggleHeadlights ()
 Switches headlights on/off, including the illumination of the control panel and synchronizes this change to all clients. More...
 
void UpdateLights (int new_gear=-1)
 
void UpdateLightsClient (int newGear=-1)
 
void UpdateLightsServer (int newGear=-1)
 
protected void BrakesRearLight ()
 
protected void ReverseRearLight ()
 
protected void BrakeAndReverseRearLight ()
 
protected void NoRearLight ()
 
protected void LeftFrontLightShineOn ()
 
protected void RightFrontLightShineOn ()
 
protected void LeftFrontLightShineOff ()
 
protected void RightFrontLightShineOff ()
 
protected void ReverseLightsShineOn ()
 
protected void ReverseLightsShineOff ()
 
protected void BrakeLightsShineOn ()
 
protected void BrakeLightsShineOff ()
 
protected void TailLightsShineOn ()
 
protected void TailLightsShineOff ()
 
protected void DashboardShineOn ()
 
protected void DashboardShineOff ()
 
protected CarRearLightBase CreateRearLight ()
 
protected CarLightBase CreateFrontLight ()
 
protected void CheckVitalItem (bool isVital, string itemName)
 
protected void LeakFluid (CarFluid fluid)
 
protected void CarPartsHealthCheck ()
 
bool GetCrashLightSound ()
 
void SynchCrashLightSound (bool play)
 
void PlayCrashLightSound ()
 
bool GetCrashHeavySound ()
 
void SynchCrashHeavySound (bool play)
 
void PlayCrashHeavySound ()
 
void PlaySoundEx (string soundset, EffectSound sound, out bool soundbool)
 
void PlaySound (string soundset, ref EffectSound sound, out bool soundbool)
 
string GetAnimSourceFromSelection (string selection)
 
string GetDoorConditionPointFromSelection (string selection)
 
string GetDoorSelectionNameFromSeatPos (int posIdx)
 
string GetDoorInvSlotNameFromSeatPos (int posIdx)
 
int GetCrewIndex (string selection)
 
override bool CanReachSeatFromDoors (string pSeatSelection, vector pFromPos, float pDistance=1.0)
 
bool IsVitalCarBattery ()
 
bool IsVitalTruckBattery ()
 
bool IsVitalSparkPlug ()
 
bool IsVitalGlowPlug ()
 
bool IsVitalEngineBelt ()
 
bool IsVitalRadiator ()
 
bool IsVitalFuelTank ()
 
bool HasRadiator ()
 
EntityAI GetRadiator ()
 
bool IsMoving ()
 
bool IsHandbrakeActive ()
 
override int Get3rdPersonCameraType ()
 camera type More...
 
void SetEngineStarted (bool started)
 
int GetCarDoorsState (string slotType)
 
CarDoorState TranslateAnimationPhaseToCarDoorState (string animation)
 
string GetActionCompNameCoolant ()
 
float GetActionDistanceCoolant ()
 
string GetActionCompNameFuel ()
 
float GetActionDistanceFuel ()
 
string GetActionCompNameOil ()
 
float GetActionDistanceOil ()
 
string GetActionCompNameBrakes ()
 
float GetActionDistanceBrakes ()
 
void InitializeActions ()
 
override void GetActions (typename action_input_type, out array< ActionBase_Basic > actions)
 
void SetActions ()
 
void AddAction (typename actionName)
 
void RemoveAction (typename actionName)
 
override bool IsInventoryVisible ()
 
override void EEHealthLevelChanged (int oldLevel, int newLevel, string zone)
 
override void EEOnCECreate ()
 
void ForceUpdateLightsStart ()
 
void ForceUpdateLightsEnd ()
 
float GetBatteryConsumption ()
 
float GetBatteryRuntimeConsumption ()
 
float GetBatteryRechargeRate ()
 
ItemBase GetBattery ()
 
void SetCarHornState (int pState)
 
protected void GenerateCarHornAINoise (int pState)
 
override vector GetDefaultHitPosition ()
 
void SetEngineZoneReceivedHit (bool pState)
 
bool HasEngineZoneReceivedHit ()
 
float GetMomentum ()
 
float GetPushForceCoefficientMultiplier ()
 
protected void SpawnUniversalParts ()
 
protected void SpawnAdditionalItems ()
 
protected void FillUpCarFluids ()
 

Variables

enum CarDoorState NONE
 
enum CarDoorState LEFT
 
enum CarDoorState RIGHT
 
enum CarDoorState BRAKES_ONLY
 
enum CarDoorState REVERSE_ONLY
 
enum CarDoorState STARTING
 
enum CarDoorState START_OK
 
enum CarDoorState START_NO_FUEL
 
enum CarDoorState START_NO_BATTERY
 
enum CarDoorState START_NO_SPARKPLUG
 
enum CarDoorState STOP_OK
 
enum CarDoorState OFF = 0
 
enum CarDoorState SHORT = 1
 
enum CarDoorState LONG
 
enum CarDoorState typename
 
enum CarDoorState m_CarTypeActionsMap = new map<typename, ref TInputActionMap>
 
TInputActionMap m_InputActionMap
 
bool m_ActionsInitialize
 
protected float m_MomentumPrevTick
 
protected vector m_VelocityPrevTick
 
ref CarContactCache m_ContactCache
 
protected float m_Time
 
protected float m_FuelAmmount
 keeps ammount of each fluid More...
 
protected float m_CoolantAmmount
 
protected float m_OilAmmount
 
protected float m_BrakeAmmount
 
protected float m_dmgContactCoef = 0.058
 
protected float m_EnviroHeatComfortOverride
 
protected float m_DrownTime
 
protected float m_EngineHealth
 
protected float m_RadiatorHealth
 
protected float m_FuelTankHealth
 
protected float m_BatteryHealth
 
protected float m_PlugHealth
 
protected EntityAI m_Radiator
 
protected float m_BatteryConsume = 15
 
protected float m_BatteryContinuousConsume = 0.25
 
protected float m_BatteryRecharge = 0.15
 
private float m_BatteryTimer = 0
 
const private float BATTERY_UPDATE_DELAY = 100
 
protected float m_BatteryEnergyStartMin = 5.0
 
protected ref EffVehicleSmoke m_coolantFx
 Particles. More...
 
protected ref EffVehicleSmoke m_engineFx
 
protected ref EffVehicleSmoke m_exhaustFx
 
protected int m_enginePtcFx
 
protected int m_coolantPtcFx
 
protected int m_exhaustPtcFx
 
protected vector m_exhaustPtcPos
 
protected vector m_exhaustPtcDir
 
protected vector m_enginePtcPos
 
protected vector m_coolantPtcPos
 
protected vector m_fuelPos
 
protected vector m_enginePos
 
protected vector m_frontPos
 
protected vector m_backPos
 
protected vector m_side_1_1Pos
 
protected vector m_side_1_2Pos
 
protected vector m_side_2_1Pos
 
protected vector m_side_2_2Pos
 
string m_EngineStartOK = ""
 Sounds. More...
 
string m_EngineStartBattery = ""
 
string m_EngineStartPlug = ""
 
string m_EngineStartFuel = ""
 
string m_EngineStopFuel = ""
 
string m_CarDoorOpenSound = ""
 
string m_CarDoorCloseSound = ""
 
string m_CarSeatShiftInSound = ""
 
string m_CarSeatShiftOutSound = ""
 
string m_CarHornShortSoundName = ""
 
string m_CarHornLongSoundName = ""
 
ref EffectSound m_CrashSoundLight
 
ref EffectSound m_CrashSoundHeavy
 
ref EffectSound m_WindowSmall
 
ref EffectSound m_WindowLarge
 
private ref EffectSound m_PreStartSound
 
protected ref EffectSound m_CarHornSoundEffect
 
protected ref NoiseParams m_NoisePar
 
protected NoiseSystem m_NoiseSystem
 
protected bool m_PlayCrashSoundLight
 
protected bool m_PlayCrashSoundHeavy
 
protected bool m_HeadlightsOn
 
protected bool m_HeadlightsState
 
protected bool m_BrakesArePressed
 
protected bool m_RearLightType
 
protected bool m_ForceUpdateLights
 
protected bool m_EngineStarted
 
protected bool m_EngineDestroyed
 
protected int m_CarHornState
 
CarLightBase m_Headlight
 
CarRearLightBase m_RearLight
 
protected bool m_EngineBeforeStart
 
protected bool m_EngineStartDoOnce
 
protected bool m_EngineZoneReceivedHit
 
protected ref set< intm_UnconsciousCrewMemberIndices
 
protected ref set< intm_DeadCrewMemberIndices
 

Enumeration Type Documentation

◆ CarDoorState

Enumerator
DOORS_MISSING 
DOORS_OPEN 
DOORS_CLOSED 

Definition at line 1 of file carscript.c.

Function Documentation

◆ AddAction()

void AddAction ( typename actionName  )

Definition at line 2422 of file carscript.c.

◆ BrakeAndReverseRearLight()

protected void BrakeAndReverseRearLight ( )

Definition at line 1914 of file carscript.c.

◆ BrakeLightsShineOff()

protected void BrakeLightsShineOff ( )

Definition at line 1999 of file carscript.c.

◆ BrakeLightsShineOn()

protected void BrakeLightsShineOn ( )

Definition at line 1988 of file carscript.c.

◆ BrakesRearLight()

protected void BrakesRearLight ( )

Definition at line 1904 of file carscript.c.

◆ CanManipulateSpareWheel()

protected bool CanManipulateSpareWheel ( string  slotSelectionName)

Definition at line 843 of file carscript.c.

◆ CanReachSeatFromDoors()

override bool CanReachSeatFromDoors ( string  pSeatSelection,
vector  pFromPos,
float  pDistance = 1.0 
)

skip the height for now

Definition at line 2240 of file carscript.c.

◆ CanReceiveAttachment()

override bool CanReceiveAttachment ( EntityAI  attachment,
int  slotId 
)

Definition at line 782 of file carscript.c.

◆ CanReleaseAttachment()

override bool CanReleaseAttachment ( EntityAI  attachment)

Definition at line 811 of file carscript.c.

◆ CarPartsHealthCheck()

protected void CarPartsHealthCheck ( )

Definition at line 2114 of file carscript.c.

◆ CarScript()

void CarScript ( )

Definition at line 284 of file carscript.c.

◆ CheckContactCache()

void CheckContactCache ( )

Responsible for damaging the car according to contact events from OnContact.

Definition at line 1139 of file carscript.c.

◆ CheckVitalItem()

protected void CheckVitalItem ( bool  isVital,
string  itemName 
)

Definition at line 2078 of file carscript.c.

◆ CleanupEffects()

void CleanupEffects ( )

Definition at line 516 of file carscript.c.

◆ CleanupSound()

void CleanupSound ( EffectSound  sound)

Definition at line 535 of file carscript.c.

◆ CreateCarDestroyedEffect()

void CreateCarDestroyedEffect ( )

Definition at line 638 of file carscript.c.

◆ CreateFrontLight()

protected CarLightBase CreateFrontLight ( )

Definition at line 2073 of file carscript.c.

◆ CreateRearLight()

protected CarRearLightBase CreateRearLight ( )

Definition at line 2067 of file carscript.c.

◆ DamageCrew()

void DamageCrew ( float  dmg)

Responsible for damaging crew in a car crash.

Definition at line 1239 of file carscript.c.

◆ DashboardShineOff()

protected void DashboardShineOff ( )

Definition at line 2056 of file carscript.c.

◆ DashboardShineOn()

protected void DashboardShineOn ( )

Definition at line 2046 of file carscript.c.

◆ EEDelete()

override void EEDelete ( EntityAI  parent)

Definition at line 502 of file carscript.c.

◆ EEHealthLevelChanged()

override void EEHealthLevelChanged ( int  oldLevel,
int  newLevel,
string  zone 
)

Definition at line 2471 of file carscript.c.

◆ EEHitBy()

override void EEHitBy ( TotalDamageResult  damageResult,
int  damageType,
EntityAI  source,
int  component,
string  dmgZone,
string  ammo,
vector  modelPos,
float  speedCoef 
)

Definition at line 492 of file carscript.c.

◆ EEInit()

override void EEInit ( )

Definition at line 401 of file carscript.c.

◆ EEItemAttached()

override void EEItemAttached ( EntityAI  item,
string  slot_name 
)

Definition at line 648 of file carscript.c.

◆ EEItemDetached()

override void EEItemDetached ( EntityAI  item,
string  slot_name 
)

Definition at line 723 of file carscript.c.

◆ EEKilled()

override void EEKilled ( Object  killer)

Definition at line 1103 of file carscript.c.

◆ EEOnCECreate()

override void EEOnCECreate ( )

Definition at line 2507 of file carscript.c.

◆ EOnPostSimulate()

override void EOnPostSimulate ( IEntity  other,
float  timeSlice 
)

actions runned when the engine on

leaking of coolant from radiator when damaged

Definition at line 848 of file carscript.c.

◆ FillUpCarFluids()

protected void FillUpCarFluids ( )

Definition at line 2700 of file carscript.c.

◆ ForceUpdateLightsEnd()

void ForceUpdateLightsEnd ( )

Definition at line 2525 of file carscript.c.

◆ ForceUpdateLightsStart()

void ForceUpdateLightsStart ( )

Definition at line 2516 of file carscript.c.

◆ GenerateCarHornAINoise()

protected void GenerateCarHornAINoise ( int  pState)

Definition at line 2577 of file carscript.c.

◆ Get3rdPersonCameraType()

override int Get3rdPersonCameraType ( )

camera type

Definition at line 2320 of file carscript.c.

◆ Get_1_1PointPosWS()

vector Get_1_1PointPosWS ( )

Definition at line 469 of file carscript.c.

◆ Get_1_2PointPosWS()

vector Get_1_2PointPosWS ( )

Definition at line 473 of file carscript.c.

◆ Get_2_1PointPosWS()

vector Get_2_1PointPosWS ( )

Definition at line 477 of file carscript.c.

◆ Get_2_2PointPosWS()

vector Get_2_2PointPosWS ( )

Definition at line 481 of file carscript.c.

◆ GetActionCompNameBrakes()

string GetActionCompNameBrakes ( )

Definition at line 2378 of file carscript.c.

◆ GetActionCompNameCoolant()

string GetActionCompNameCoolant ( )

Definition at line 2348 of file carscript.c.

◆ GetActionCompNameFuel()

string GetActionCompNameFuel ( )

Definition at line 2358 of file carscript.c.

◆ GetActionCompNameOil()

string GetActionCompNameOil ( )

Definition at line 2368 of file carscript.c.

◆ GetActionDistanceBrakes()

float GetActionDistanceBrakes ( )

Definition at line 2383 of file carscript.c.

◆ GetActionDistanceCoolant()

float GetActionDistanceCoolant ( )

Definition at line 2353 of file carscript.c.

◆ GetActionDistanceFuel()

float GetActionDistanceFuel ( )

Definition at line 2363 of file carscript.c.

◆ GetActionDistanceOil()

float GetActionDistanceOil ( )

Definition at line 2373 of file carscript.c.

◆ GetActions()

override void GetActions ( typename action_input_type  ,
out array< ActionBase_Basic actions 
)

Definition at line 2400 of file carscript.c.

◆ GetAnimSourceFromSelection()

string GetAnimSourceFromSelection ( string  selection)

Definition at line 2199 of file carscript.c.

◆ GetBackPointPosWS()

vector GetBackPointPosWS ( )

Definition at line 465 of file carscript.c.

◆ GetBattery()

ItemBase GetBattery ( )

Definition at line 2550 of file carscript.c.

◆ GetBatteryConsumption()

float GetBatteryConsumption ( )

Definition at line 2535 of file carscript.c.

◆ GetBatteryRechargeRate()

float GetBatteryRechargeRate ( )

Definition at line 2545 of file carscript.c.

◆ GetBatteryRuntimeConsumption()

float GetBatteryRuntimeConsumption ( )

Definition at line 2540 of file carscript.c.

◆ GetCarDoorsState()

int GetCarDoorsState ( string  slotType)

Definition at line 2331 of file carscript.c.

◆ GetCoolantPtcPosWS()

vector GetCoolantPtcPosWS ( )

Definition at line 447 of file carscript.c.

◆ GetCrashHeavySound()

bool GetCrashHeavySound ( )

Definition at line 2151 of file carscript.c.

◆ GetCrashLightSound()

bool GetCrashLightSound ( )

Definition at line 2132 of file carscript.c.

◆ GetCrewIndex()

int GetCrewIndex ( string  selection)

Definition at line 2235 of file carscript.c.

◆ GetDebugActions()

override void GetDebugActions ( out TSelectableActionInfoArrayEx  outputList)

Definition at line 540 of file carscript.c.

◆ GetDefaultHitPosition()

override vector GetDefaultHitPosition ( )

Definition at line 2592 of file carscript.c.

◆ GetDoorConditionPointFromSelection()

string GetDoorConditionPointFromSelection ( string  selection)

Definition at line 2204 of file carscript.c.

◆ GetDoorInvSlotNameFromSeatPos()

string GetDoorInvSlotNameFromSeatPos ( int  posIdx)

Definition at line 2230 of file carscript.c.

◆ GetDoorSelectionNameFromSeatPos()

string GetDoorSelectionNameFromSeatPos ( int  posIdx)

Definition at line 2225 of file carscript.c.

◆ GetEnginePointPosWS()

vector GetEnginePointPosWS ( )

Definition at line 457 of file carscript.c.

◆ GetEnginePosWS()

vector GetEnginePosWS ( )

Definition at line 442 of file carscript.c.

◆ GetEnviroHeatComfortOverride()

float GetEnviroHeatComfortOverride ( )

DEPRECATED

◆ GetFrontPointPosWS()

vector GetFrontPointPosWS ( )

Definition at line 461 of file carscript.c.

◆ GetLiquidThroughputCoef()

override float GetLiquidThroughputCoef ( )

Definition at line 486 of file carscript.c.

◆ GetMomentum()

float GetMomentum ( )

Definition at line 2608 of file carscript.c.

◆ GetPushForceCoefficientMultiplier()

float GetPushForceCoefficientMultiplier ( )

Definition at line 2613 of file carscript.c.

◆ GetRadiator()

EntityAI GetRadiator ( )

Definition at line 2304 of file carscript.c.

◆ GetRefillPointPosWS()

vector GetRefillPointPosWS ( )

Definition at line 452 of file carscript.c.

◆ HandleByCrewMemberState()

override void HandleByCrewMemberState ( ECrewMemberState  state)

Definition at line 1476 of file carscript.c.

◆ HandleCarHornSound()

protected void HandleCarHornSound ( ECarHornState  pState)

Definition at line 1367 of file carscript.c.

◆ HandleDoorsSound()

protected void HandleDoorsSound ( string  animSource,
float  phase 
)

Definition at line 1324 of file carscript.c.

◆ HandleEngineSound()

void HandleEngineSound ( CarEngineSoundState  state)

postpone the engine sound played from c++ on soundcontroller (via OnSound override)

Definition at line 1383 of file carscript.c.

◆ HandleSeatAdjustmentSound()

protected void HandleSeatAdjustmentSound ( string  animSource,
float  phase 
)

Definition at line 1347 of file carscript.c.

◆ HasEngineZoneReceivedHit()

bool HasEngineZoneReceivedHit ( )

Definition at line 2603 of file carscript.c.

◆ HasRadiator()

bool HasRadiator ( )

Definition at line 2299 of file carscript.c.

◆ InitializeActions()

void InitializeActions ( )

Definition at line 2388 of file carscript.c.

◆ IsHandbrakeActive()

bool IsHandbrakeActive ( )

Definition at line 2314 of file carscript.c.

◆ IsInventoryVisible()

override bool IsInventoryVisible ( )

Definition at line 2466 of file carscript.c.

◆ IsMoving()

bool IsMoving ( )

Definition at line 2309 of file carscript.c.

◆ IsScriptedLightsOn()

bool IsScriptedLightsOn ( )

Propper way to get if light is swiched on. Use instead of IsLightsOn().

Definition at line 1648 of file carscript.c.

◆ IsVitalCarBattery()

bool IsVitalCarBattery ( )

Definition at line 2264 of file carscript.c.

◆ IsVitalEngineBelt()

bool IsVitalEngineBelt ( )

Definition at line 2284 of file carscript.c.

◆ IsVitalFuelTank()

bool IsVitalFuelTank ( )

Definition at line 2294 of file carscript.c.

◆ IsVitalGlowPlug()

bool IsVitalGlowPlug ( )

Definition at line 2279 of file carscript.c.

◆ IsVitalRadiator()

bool IsVitalRadiator ( )

Definition at line 2289 of file carscript.c.

◆ IsVitalSparkPlug()

bool IsVitalSparkPlug ( )

Definition at line 2274 of file carscript.c.

◆ IsVitalTruckBattery()

bool IsVitalTruckBattery ( )

Definition at line 2269 of file carscript.c.

◆ LeakFluid()

protected void LeakFluid ( CarFluid  fluid)

Definition at line 2091 of file carscript.c.

◆ LeftFrontLightShineOff()

protected void LeftFrontLightShineOff ( )

Definition at line 1946 of file carscript.c.

◆ LeftFrontLightShineOn()

protected void LeftFrontLightShineOn ( )

Definition at line 1926 of file carscript.c.

◆ MarkCrewMemberDead()

override void MarkCrewMemberDead ( int  crewMemberIndex)

Definition at line 1467 of file carscript.c.

◆ MarkCrewMemberUnconscious()

override void MarkCrewMemberUnconscious ( int  crewMemberIndex)

Definition at line 1458 of file carscript.c.

◆ NoRearLight()

protected void NoRearLight ( )

Definition at line 1920 of file carscript.c.

◆ OnAction()

override bool OnAction ( int  action_id,
Man  player,
ParamsReadContext  ctx 
)

Definition at line 565 of file carscript.c.

◆ OnAnimationPhaseStarted()

override void OnAnimationPhaseStarted ( string  animSource,
float  phase 
)

Definition at line 1316 of file carscript.c.

◆ OnAttachmentRuined()

override void OnAttachmentRuined ( EntityAI  attachment)

Definition at line 774 of file carscript.c.

◆ OnBeforeEngineStart()

override bool OnBeforeEngineStart ( )

Gets called everytime the game wants to start the engine. This callback is called on server only.

Returns
true if the engine can start, false otherwise.

Definition at line 1547 of file carscript.c.

◆ OnBeforeSwitchLights()

bool OnBeforeSwitchLights ( bool  toOn)

DEPRECATED Gets called everytime the game wants to switch the lights.

Returns
true when lights can be switched, false otherwise.

Definition at line 1642 of file carscript.c.

◆ OnBrakesPressed()

void OnBrakesPressed ( )

Definition at line 1017 of file carscript.c.

◆ OnBrakesReleased()

void OnBrakesReleased ( )

Definition at line 1022 of file carscript.c.

◆ OnContact()

override void OnContact ( string  zoneName,
vector  localPos,
IEntity  other,
Contact  data 
)

WARNING: Can be called very frequently in one frame, use with caution.

Definition at line 1110 of file carscript.c.

◆ OnEngineStart()

override void OnEngineStart ( )

Gets called everytime the engine starts.

Definition at line 1612 of file carscript.c.

◆ OnEngineStop()

override void OnEngineStop ( )

Gets called everytime the engine stops.

Definition at line 1628 of file carscript.c.

◆ OnFluidChanged()

override void OnFluidChanged ( CarFluid  fluid,
float  newValue,
float  oldValue 
)

Gets called everytime when the specified vehicle's fluid changes its current value eg. when car is consuming fuel.

This callback is called on both server and client.

Definition at line 1519 of file carscript.c.

◆ OnGearChanged()

override void OnGearChanged ( int  newGear,
int  oldGear 
)

Definition at line 1605 of file carscript.c.

◆ OnSound()

override float OnSound ( CarSoundCtrl  ctrl,
float  oldValue 
)

Gets called every sound simulation step. In this callback, user can modify behaviour of sound controllers The higher the return value is the more muted sound is.

Definition at line 1301 of file carscript.c.

◆ OnUpdate()

override void OnUpdate ( float  dt)

Definition at line 1027 of file carscript.c.

◆ OnVariablesSynchronized()

override void OnVariablesSynchronized ( )

Definition at line 620 of file carscript.c.

◆ PlayCrashHeavySound()

void PlayCrashHeavySound ( )

Definition at line 2165 of file carscript.c.

◆ PlayCrashLightSound()

void PlayCrashLightSound ( )

Definition at line 2146 of file carscript.c.

◆ PlaySound()

void PlaySound ( string  soundset,
ref EffectSound  sound,
out bool  soundbool 
)

Definition at line 2194 of file carscript.c.

◆ PlaySoundEx()

void PlaySoundEx ( string  soundset,
EffectSound  sound,
out bool  soundbool 
)

Definition at line 2170 of file carscript.c.

◆ RemoveAction()

void RemoveAction ( typename actionName  )

Definition at line 2453 of file carscript.c.

◆ ReverseLightsShineOff()

protected void ReverseLightsShineOff ( )

Definition at line 1977 of file carscript.c.

◆ ReverseLightsShineOn()

protected void ReverseLightsShineOn ( )

Definition at line 1966 of file carscript.c.

◆ ReverseRearLight()

protected void ReverseRearLight ( )

Definition at line 1909 of file carscript.c.

◆ RightFrontLightShineOff()

protected void RightFrontLightShineOff ( )

Definition at line 1956 of file carscript.c.

◆ RightFrontLightShineOn()

protected void RightFrontLightShineOn ( )

Definition at line 1936 of file carscript.c.

◆ SetActions()

void SetActions ( )

Definition at line 2411 of file carscript.c.

◆ SetCarHornState()

void SetCarHornState ( int  pState)

Definition at line 2564 of file carscript.c.

◆ SetEngineStarted()

void SetEngineStarted ( bool  started)

Definition at line 2326 of file carscript.c.

◆ SetEngineZoneReceivedHit()

void SetEngineZoneReceivedHit ( bool  pState)

Definition at line 2597 of file carscript.c.

◆ SpawnAdditionalItems()

protected void SpawnAdditionalItems ( )

Definition at line 2670 of file carscript.c.

◆ SpawnUniversalParts()

protected void SpawnUniversalParts ( )

Definition at line 2632 of file carscript.c.

◆ SynchCrashHeavySound()

void SynchCrashHeavySound ( bool  play)

Definition at line 2156 of file carscript.c.

◆ SynchCrashLightSound()

void SynchCrashLightSound ( bool  play)

Definition at line 2137 of file carscript.c.

◆ TailLightsShineOff()

protected void TailLightsShineOff ( )

Definition at line 2035 of file carscript.c.

◆ TailLightsShineOn()

protected void TailLightsShineOn ( )

Definition at line 2010 of file carscript.c.

◆ ToggleHeadlights()

void ToggleHeadlights ( )

Switches headlights on/off, including the illumination of the control panel and synchronizes this change to all clients.

Definition at line 1654 of file carscript.c.

◆ TranslateAnimationPhaseToCarDoorState()

CarDoorState TranslateAnimationPhaseToCarDoorState ( string  animation)

Definition at line 2336 of file carscript.c.

◆ UpdateHeadlightState()

void UpdateHeadlightState ( )

Definition at line 700 of file carscript.c.

◆ UpdateLights()

void UpdateLights ( int  new_gear = -1)

Definition at line 1660 of file carscript.c.

◆ UpdateLightsClient()

void UpdateLightsClient ( int  newGear = -1)

Definition at line 1668 of file carscript.c.

◆ UpdateLightsServer()

void UpdateLightsServer ( int  newGear = -1)

Definition at line 1787 of file carscript.c.

◆ ~CarScript()

void ~CarScript ( )

Definition at line 509 of file carscript.c.

Variable Documentation

◆ BATTERY_UPDATE_DELAY

const private float BATTERY_UPDATE_DELAY = 100

Definition at line 181 of file carscript.c.

◆ BRAKES_ONLY

enum CarDoorState BRAKES_ONLY

◆ LEFT

enum CarDoorState LEFT

◆ LONG

enum CarDoorState LONG

◆ m_ActionsInitialize

bool m_ActionsInitialize

Definition at line 141 of file carscript.c.

◆ m_backPos

protected vector m_backPos

Definition at line 202 of file carscript.c.

◆ m_BatteryConsume

protected float m_BatteryConsume = 15

Definition at line 177 of file carscript.c.

◆ m_BatteryContinuousConsume

protected float m_BatteryContinuousConsume = 0.25

Definition at line 178 of file carscript.c.

◆ m_BatteryEnergyStartMin

protected float m_BatteryEnergyStartMin = 5.0

Definition at line 182 of file carscript.c.

◆ m_BatteryHealth

protected float m_BatteryHealth

Definition at line 172 of file carscript.c.

◆ m_BatteryRecharge

protected float m_BatteryRecharge = 0.15

Definition at line 179 of file carscript.c.

◆ m_BatteryTimer

private float m_BatteryTimer = 0

Definition at line 180 of file carscript.c.

◆ m_BrakeAmmount

protected float m_BrakeAmmount

Definition at line 157 of file carscript.c.

◆ m_BrakesArePressed

protected bool m_BrakesArePressed

Definition at line 238 of file carscript.c.

◆ m_CarDoorCloseSound

string m_CarDoorCloseSound = ""

Definition at line 216 of file carscript.c.

◆ m_CarDoorOpenSound

string m_CarDoorOpenSound = ""

Definition at line 215 of file carscript.c.

◆ m_CarHornLongSoundName

string m_CarHornLongSoundName = ""

Definition at line 221 of file carscript.c.

◆ m_CarHornShortSoundName

string m_CarHornShortSoundName = ""

Definition at line 220 of file carscript.c.

◆ m_CarHornSoundEffect

protected ref EffectSound m_CarHornSoundEffect

Definition at line 229 of file carscript.c.

◆ m_CarHornState

protected int m_CarHornState

Definition at line 245 of file carscript.c.

◆ m_CarSeatShiftInSound

string m_CarSeatShiftInSound = ""

Definition at line 217 of file carscript.c.

◆ m_CarSeatShiftOutSound

string m_CarSeatShiftOutSound = ""

Definition at line 218 of file carscript.c.

◆ m_CarTypeActionsMap

enum CarDoorState m_CarTypeActionsMap = new map<typename, ref TInputActionMap>

◆ m_ContactCache

ref CarContactCache m_ContactCache

Definition at line 144 of file carscript.c.

◆ m_CoolantAmmount

protected float m_CoolantAmmount

Definition at line 155 of file carscript.c.

◆ m_coolantFx

protected ref EffVehicleSmoke m_coolantFx

Particles.

Definition at line 185 of file carscript.c.

◆ m_coolantPtcFx

protected int m_coolantPtcFx

Definition at line 190 of file carscript.c.

◆ m_coolantPtcPos

protected vector m_coolantPtcPos

Definition at line 196 of file carscript.c.

◆ m_CrashSoundHeavy

ref EffectSound m_CrashSoundHeavy

Definition at line 224 of file carscript.c.

◆ m_CrashSoundLight

ref EffectSound m_CrashSoundLight

Definition at line 223 of file carscript.c.

◆ m_DeadCrewMemberIndices

protected ref set<int> m_DeadCrewMemberIndices

Definition at line 276 of file carscript.c.

◆ m_dmgContactCoef

protected float m_dmgContactCoef = 0.058

Definition at line 161 of file carscript.c.

◆ m_DrownTime

protected float m_DrownTime

Definition at line 165 of file carscript.c.

◆ m_EngineBeforeStart

protected bool m_EngineBeforeStart

Definition at line 270 of file carscript.c.

◆ m_EngineDestroyed

protected bool m_EngineDestroyed

Definition at line 243 of file carscript.c.

◆ m_engineFx

protected ref EffVehicleSmoke m_engineFx

Definition at line 186 of file carscript.c.

◆ m_EngineHealth

protected float m_EngineHealth

Definition at line 169 of file carscript.c.

◆ m_enginePos

protected vector m_enginePos

Definition at line 200 of file carscript.c.

◆ m_enginePtcFx

protected int m_enginePtcFx

Definition at line 189 of file carscript.c.

◆ m_enginePtcPos

protected vector m_enginePtcPos

Definition at line 195 of file carscript.c.

◆ m_EngineStartBattery

string m_EngineStartBattery = ""

Definition at line 210 of file carscript.c.

◆ m_EngineStartDoOnce

protected bool m_EngineStartDoOnce

Definition at line 271 of file carscript.c.

◆ m_EngineStarted

protected bool m_EngineStarted

Definition at line 242 of file carscript.c.

◆ m_EngineStartFuel

string m_EngineStartFuel = ""

Definition at line 212 of file carscript.c.

◆ m_EngineStartOK

string m_EngineStartOK = ""

Sounds.

Definition at line 209 of file carscript.c.

◆ m_EngineStartPlug

string m_EngineStartPlug = ""

Definition at line 211 of file carscript.c.

◆ m_EngineStopFuel

string m_EngineStopFuel = ""

Definition at line 213 of file carscript.c.

◆ m_EngineZoneReceivedHit

protected bool m_EngineZoneReceivedHit

Definition at line 273 of file carscript.c.

◆ m_EnviroHeatComfortOverride

protected float m_EnviroHeatComfortOverride

Definition at line 162 of file carscript.c.

◆ m_exhaustFx

protected ref EffVehicleSmoke m_exhaustFx

Definition at line 187 of file carscript.c.

◆ m_exhaustPtcDir

protected vector m_exhaustPtcDir

Definition at line 194 of file carscript.c.

◆ m_exhaustPtcFx

protected int m_exhaustPtcFx

Definition at line 191 of file carscript.c.

◆ m_exhaustPtcPos

protected vector m_exhaustPtcPos

Definition at line 193 of file carscript.c.

◆ m_ForceUpdateLights

protected bool m_ForceUpdateLights

Definition at line 241 of file carscript.c.

◆ m_frontPos

protected vector m_frontPos

Definition at line 201 of file carscript.c.

◆ m_FuelAmmount

protected float m_FuelAmmount

keeps ammount of each fluid

Definition at line 154 of file carscript.c.

◆ m_fuelPos

protected vector m_fuelPos

Definition at line 198 of file carscript.c.

◆ m_FuelTankHealth

protected float m_FuelTankHealth

Definition at line 171 of file carscript.c.

◆ m_Headlight

CarLightBase m_Headlight

Definition at line 247 of file carscript.c.

◆ m_HeadlightsOn

protected bool m_HeadlightsOn

Definition at line 236 of file carscript.c.

◆ m_HeadlightsState

protected bool m_HeadlightsState

Definition at line 237 of file carscript.c.

◆ m_InputActionMap

TInputActionMap m_InputActionMap

Definition at line 140 of file carscript.c.

◆ m_MomentumPrevTick

protected float m_MomentumPrevTick

Definition at line 142 of file carscript.c.

◆ m_NoisePar

protected ref NoiseParams m_NoisePar

Definition at line 230 of file carscript.c.

◆ m_NoiseSystem

protected NoiseSystem m_NoiseSystem

Definition at line 231 of file carscript.c.

◆ m_OilAmmount

protected float m_OilAmmount

Definition at line 156 of file carscript.c.

◆ m_PlayCrashSoundHeavy

protected bool m_PlayCrashSoundHeavy

Definition at line 234 of file carscript.c.

◆ m_PlayCrashSoundLight

protected bool m_PlayCrashSoundLight

Definition at line 233 of file carscript.c.

◆ m_PlugHealth

protected float m_PlugHealth

Definition at line 173 of file carscript.c.

◆ m_PreStartSound

private ref EffectSound m_PreStartSound

Definition at line 227 of file carscript.c.

◆ m_Radiator

protected EntityAI m_Radiator

Definition at line 175 of file carscript.c.

◆ m_RadiatorHealth

protected float m_RadiatorHealth

Definition at line 170 of file carscript.c.

◆ m_RearLight

CarRearLightBase m_RearLight

Definition at line 248 of file carscript.c.

◆ m_RearLightType

protected bool m_RearLightType

Definition at line 239 of file carscript.c.

◆ m_side_1_1Pos

protected vector m_side_1_1Pos

Definition at line 203 of file carscript.c.

◆ m_side_1_2Pos

protected vector m_side_1_2Pos

Definition at line 204 of file carscript.c.

◆ m_side_2_1Pos

protected vector m_side_2_1Pos

Definition at line 205 of file carscript.c.

◆ m_side_2_2Pos

protected vector m_side_2_2Pos

Definition at line 206 of file carscript.c.

◆ m_Time

protected float m_Time

Definition at line 146 of file carscript.c.

◆ m_UnconsciousCrewMemberIndices

protected ref set<int> m_UnconsciousCrewMemberIndices

Definition at line 275 of file carscript.c.

◆ m_VelocityPrevTick

protected vector m_VelocityPrevTick

Definition at line 143 of file carscript.c.

◆ m_WindowLarge

ref EffectSound m_WindowLarge

Definition at line 226 of file carscript.c.

◆ m_WindowSmall

ref EffectSound m_WindowSmall

Definition at line 225 of file carscript.c.

◆ NONE

enum CarDoorState NONE

◆ OFF

enum CarDoorState OFF = 0

◆ REVERSE_ONLY

enum CarDoorState REVERSE_ONLY

◆ RIGHT

enum CarDoorState RIGHT

◆ SHORT

enum CarDoorState SHORT = 1

◆ START_NO_BATTERY

enum CarDoorState START_NO_BATTERY

◆ START_NO_FUEL

enum CarDoorState START_NO_FUEL

◆ START_NO_SPARKPLUG

enum CarDoorState START_NO_SPARKPLUG

◆ START_OK

enum CarDoorState START_OK

◆ STARTING

enum CarDoorState STARTING

◆ STOP_OK

enum CarDoorState STOP_OK

◆ typename

Base script class for all motorized wheeled vehicles.