PC Stable Documentation
 
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Loading...
Searching...
No Matches
CarScript.c File Reference

Enumerations

enum  CarDoorState { DOORS_MISSING , DOORS_OPEN , DOORS_CLOSED }
 

Functions

void CarScript ()
 
override void EEInit ()
 
override string GetVehicleType ()
 
vector GetEnginePosWS ()
 
vector GetCoolantPtcPosWS ()
 
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 ()
 
void OnVehicleJumpOutServer (GetOutTransportActionData gotActionData)
 
protected override bool DetectFlipped (VehicleFlippedContext ctx)
 
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.
 
void CheckContactCache ()
 Responsible for damaging the car according to contact events from OnContact.
 
void DamageCrew (float dmg)
 Responsible for damaging crew in a car crash.
 
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 HandleByCrewMemberState (ECrewMemberState state)
 
float GetEnviroHeatComfortOverride ()
 DEPRECATED

 
override void OnFluidChanged (CarFluid fluid, float newValue, float oldValue)
 
override bool OnBeforeEngineStart ()
 
bool CheckOperationalState ()
 
override void OnGearChanged (int newGear, int oldGear)
 
override void OnEngineStart ()
 Gets called everytime the engine starts.
 
override void OnEngineStop ()
 Gets called everytime the engine stops.
 
bool OnBeforeSwitchLights (bool toOn)
 
bool IsScriptedLightsOn ()
 Propper way to get if light is swiched on. Use instead of IsLightsOn().
 
void ToggleHeadlights ()
 Switches headlights on/off, including the illumination of the control panel and synchronizes this change to all clients.
 
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, 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 IsVitalGlowPlug ()
 
bool IsVitalEngineBelt ()
 
bool IsVitalRadiator ()
 
bool IsVitalFuelTank ()
 
bool HasRadiator ()
 
EntityAI GetRadiator ()
 
bool IsMoving ()
 
bool IsHandbrakeActive ()
 
override int Get3rdPersonCameraType ()
 camera type
 
void SetEngineStarted (bool started)
 
int GetCarDoorsState (string slotType)
 
CarDoorState TranslateAnimationPhaseToCarDoorState (string animation)
 
string GetActionCompNameCoolant ()
 
float GetActionDistanceCoolant ()
 
string GetActionCompNameOil ()
 
float GetActionDistanceOil ()
 
string GetActionCompNameBrakes ()
 
float GetActionDistanceBrakes ()
 
override bool CanPutIntoHands (EntityAI parent)
 
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)
 
void SetCarEngineSoundState (CarEngineSoundState pState)
 
protected void GenerateCarHornAINoise (int pState)
 
override vector GetDefaultHitPosition ()
 
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
 
static float DROWN_ENGINE_THRESHOLD = 0.5
 
static float DROWN_ENGINE_DAMAGE = 350.0
 
static const string MEMORY_POINT_NAME_CAR_HORN = "pos_carHorn"
 
protected float m_FuelAmmount
 keeps ammount of each fluid
 
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
 
static vector m_DrownEnginePos
 
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
 
private const float BATTERY_UPDATE_DELAY = 100
 
protected float m_BatteryEnergyStartMin = 5.0
 
protected ref EffVehicleSmoke m_coolantFx
 Particles.
 
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_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.
 
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
 
protected int m_CarEngineSoundState
 
protected int m_CarEngineLastSoundState
 
CarLightBase m_Headlight
 
CarRearLightBase m_RearLight
 
static string m_ReverseLightPoint = "light_reverse"
 
static string m_LeftHeadlightPoint = "light_left"
 
static string m_RightHeadlightPoint = "light_right"
 
static string m_LeftHeadlightTargetPoint = "light_left_dir"
 
static string m_RightHeadlightTargetPoint = "light_right_dir"
 
static string m_DrownEnginePoint = "drown_engine"
 
static const int SELECTION_ID_FRONT_LIGHT_L = 0
 
static const int SELECTION_ID_FRONT_LIGHT_R = 1
 
static const int SELECTION_ID_BRAKE_LIGHT_L = 2
 
static const int SELECTION_ID_BRAKE_LIGHT_R = 3
 
static const int SELECTION_ID_REVERSE_LIGHT_L = 4
 
static const int SELECTION_ID_REVERSE_LIGHT_R = 5
 
static const int SELECTION_ID_TAIL_LIGHT_L = 6
 
static const int SELECTION_ID_TAIL_LIGHT_R = 7
 
static const int SELECTION_ID_DASHBOARD_LIGHT = 8
 
protected ref array< ref EffWheelSmokem_WheelSmokeFx
 
protected ref array< intm_WheelSmokePtcFx
 

Enumeration Type Documentation

◆ CarDoorState

Enumerator
DOORS_MISSING 
DOORS_OPEN 
DOORS_CLOSED 

Function Documentation

◆ AddAction()

◆ BrakeAndReverseRearLight()

protected void BrakeAndReverseRearLight ( )

References m_RearLight.

Referenced by UpdateLightsClient().

◆ BrakeLightsShineOff()

protected void BrakeLightsShineOff ( )

◆ BrakeLightsShineOn()

protected void BrakeLightsShineOn ( )

◆ BrakesRearLight()

protected void BrakesRearLight ( )

References m_RearLight.

Referenced by UpdateLightsClient().

◆ CanManipulateSpareWheel()

protected bool CanManipulateSpareWheel ( string  slotSelectionName)

◆ CanPutIntoHands()

override bool CanPutIntoHands ( EntityAI  parent)

◆ CanReachSeatFromDoors()

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

◆ CanReceiveAttachment()

override bool CanReceiveAttachment ( EntityAI  attachment,
int  slotId 
)

◆ CanReleaseAttachment()

◆ CarPartsHealthCheck()

protected void CarPartsHealthCheck ( )

◆ CarScript()

◆ CheckContactCache()

◆ CheckOperationalState()

◆ CheckVitalItem()

protected void CheckVitalItem ( bool  isVital,
string  itemName 
)

Referenced by EOnPostSimulate().

◆ CleanupEffects()

◆ CleanupSound()

void CleanupSound ( EffectSound  sound)

◆ CreateCarDestroyedEffect()

◆ CreateFrontLight()

protected CarLightBase CreateFrontLight ( )

◆ CreateRearLight()

protected CarRearLightBase CreateRearLight ( )

◆ DamageCrew()

void DamageCrew ( float  dmg)

◆ DashboardShineOff()

protected void DashboardShineOff ( )

◆ DashboardShineOn()

protected void DashboardShineOn ( )

◆ DetectFlipped()

◆ EEDelete()

override void EEDelete ( EntityAI  parent)

References CleanupEffects().

◆ EEHealthLevelChanged()

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

◆ EEHitBy()

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

◆ EEInit()

override void EEInit ( )

◆ EEItemAttached()

override void EEItemAttached ( EntityAI  item,
string  slot_name 
)

◆ EEItemDetached()

◆ EEKilled()

override void EEKilled ( Object  killer)

References m_EngineDestroyed.

◆ EEOnCECreate()

override void EEOnCECreate ( )

References Math::RandomFloat().

◆ EOnPostSimulate()

◆ FillUpCarFluids()

◆ ForceUpdateLightsEnd()

void ForceUpdateLightsEnd ( )

References m_ForceUpdateLights.

Referenced by EEHitBy().

◆ ForceUpdateLightsStart()

void ForceUpdateLightsStart ( )

References m_ForceUpdateLights.

Referenced by EEHitBy().

◆ GenerateCarHornAINoise()

protected void GenerateCarHornAINoise ( int  pState)

◆ Get3rdPersonCameraType()

override int Get3rdPersonCameraType ( )

◆ Get_1_1PointPosWS()

vector Get_1_1PointPosWS ( )

References m_side_1_1Pos.

◆ Get_1_2PointPosWS()

vector Get_1_2PointPosWS ( )

References m_side_1_2Pos.

◆ Get_2_1PointPosWS()

vector Get_2_1PointPosWS ( )

References m_side_2_1Pos.

◆ Get_2_2PointPosWS()

vector Get_2_2PointPosWS ( )

References m_side_2_2Pos.

◆ GetActionCompNameBrakes()

string GetActionCompNameBrakes ( )

◆ GetActionCompNameCoolant()

string GetActionCompNameCoolant ( )

◆ GetActionCompNameOil()

string GetActionCompNameOil ( )

◆ GetActionDistanceBrakes()

float GetActionDistanceBrakes ( )

◆ GetActionDistanceCoolant()

float GetActionDistanceCoolant ( )

◆ GetActionDistanceOil()

float GetActionDistanceOil ( )

◆ GetActions()

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

◆ GetAnimSourceFromSelection()

string GetAnimSourceFromSelection ( string  selection)

◆ GetBackPointPosWS()

vector GetBackPointPosWS ( )

References m_backPos.

◆ GetBattery()

◆ GetBatteryConsumption()

float GetBatteryConsumption ( )

References m_BatteryConsume.

Referenced by OnEngineStart().

◆ GetBatteryRechargeRate()

float GetBatteryRechargeRate ( )

References m_BatteryRecharge.

Referenced by OnUpdate().

◆ GetBatteryRuntimeConsumption()

float GetBatteryRuntimeConsumption ( )

References m_BatteryContinuousConsume.

Referenced by OnUpdate().

◆ GetCarDoorsState()

int GetCarDoorsState ( string  slotType)

◆ GetCoolantPtcPosWS()

vector GetCoolantPtcPosWS ( )

References m_coolantPtcPos.

◆ GetCrashHeavySound()

bool GetCrashHeavySound ( )

◆ GetCrashLightSound()

bool GetCrashLightSound ( )

◆ GetCrewIndex()

int GetCrewIndex ( string  selection)

◆ GetDebugActions()

override void GetDebugActions ( out TSelectableActionInfoArrayEx  outputList)

References SAT_DEBUG_ACTION.

◆ GetDefaultHitPosition()

override vector GetDefaultHitPosition ( )

References vector::Zero.

◆ GetDoorConditionPointFromSelection()

string GetDoorConditionPointFromSelection ( string  selection)

◆ GetDoorInvSlotNameFromSeatPos()

string GetDoorInvSlotNameFromSeatPos ( int  posIdx)

◆ GetDoorSelectionNameFromSeatPos()

string GetDoorSelectionNameFromSeatPos ( int  posIdx)

◆ GetEnginePointPosWS()

vector GetEnginePointPosWS ( )

References m_enginePos.

◆ GetEnginePosWS()

vector GetEnginePosWS ( )

References m_DrownEnginePos.

Referenced by CreateCarDestroyedEffect(), and OnUpdate().

◆ GetEnviroHeatComfortOverride()

float GetEnviroHeatComfortOverride ( )

DEPRECATED

◆ GetFrontPointPosWS()

vector GetFrontPointPosWS ( )

References m_frontPos.

◆ GetLiquidThroughputCoef()

override float GetLiquidThroughputCoef ( )

◆ GetPushForceCoefficientMultiplier()

float GetPushForceCoefficientMultiplier ( )

◆ GetRadiator()

EntityAI GetRadiator ( )

References m_Radiator.

Referenced by CarPartsHealthCheck().

◆ GetVehicleType()

override string GetVehicleType ( )

◆ HandleByCrewMemberState()

override void HandleByCrewMemberState ( ECrewMemberState  state)

Referenced by EOnPostSimulate().

◆ HandleCarHornSound()

protected void HandleCarHornSound ( ECarHornState  pState)

◆ HandleDoorsSound()

protected void HandleDoorsSound ( string  animSource,
float  phase 
)

◆ HandleEngineSound()

◆ HandleSeatAdjustmentSound()

protected void HandleSeatAdjustmentSound ( string  animSource,
float  phase 
)

◆ HasRadiator()

bool HasRadiator ( )

References m_Radiator.

Referenced by CarPartsHealthCheck().

◆ InitializeActions()

void InitializeActions ( )

◆ IsHandbrakeActive()

bool IsHandbrakeActive ( )

◆ IsInventoryVisible()

override bool IsInventoryVisible ( )

References GetGame(), and GetPlayer().

◆ IsMoving()

bool IsMoving ( )

Referenced by CanReleaseAttachment().

◆ IsScriptedLightsOn()

bool IsScriptedLightsOn ( )

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

References m_HeadlightsOn.

Referenced by EEItemDetached(), and OnUpdate().

◆ IsVitalCarBattery()

bool IsVitalCarBattery ( )

◆ IsVitalEngineBelt()

bool IsVitalEngineBelt ( )

◆ IsVitalFuelTank()

bool IsVitalFuelTank ( )

Referenced by EOnPostSimulate().

◆ IsVitalGlowPlug()

bool IsVitalGlowPlug ( )

◆ IsVitalRadiator()

bool IsVitalRadiator ( )

◆ IsVitalTruckBattery()

bool IsVitalTruckBattery ( )

◆ LeakFluid()

protected void LeakFluid ( CarFluid  fluid)

◆ LeftFrontLightShineOff()

protected void LeftFrontLightShineOff ( )

◆ LeftFrontLightShineOn()

protected void LeftFrontLightShineOn ( )

◆ NoRearLight()

protected void NoRearLight ( )

References m_RearLight.

Referenced by UpdateLightsClient().

◆ OnAction()

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

References GetGame(), and SetCarHornState().

◆ OnAnimationPhaseStarted()

override void OnAnimationPhaseStarted ( string  animSource,
float  phase 
)

◆ OnAttachmentRuined()

override void OnAttachmentRuined ( EntityAI  attachment)

◆ 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.

References GetBattery(), CarScript::IsVitalCarBattery(), CarScript::IsVitalGlowPlug(), CarScript::IsVitalSparkPlug(), CarScript::IsVitalTruckBattery(), m_BatteryEnergyStartMin, and SetCarEngineSoundState().

◆ 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.

◆ OnBrakesPressed()

void OnBrakesPressed ( )

References UpdateLights().

Referenced by OnUpdate().

◆ OnBrakesReleased()

void OnBrakesReleased ( )

References UpdateLights().

Referenced by OnUpdate().

◆ OnContact()

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

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

References vector::Dot(), GetGame(), GetVelocity(), Contact::Impulse, Debug::Log(), m_ContactCache, m_MomentumPrevTick, m_VelocityPrevTick, and vector::Normalized().

◆ OnEngineStart()

override void OnEngineStart ( )

Gets called everytime the engine starts.

References GetBattery(), GetBatteryConsumption(), GetGame(), HandleEngineSound(), and UpdateLights().

◆ OnEngineStop()

override void OnEngineStop ( )

Gets called everytime the engine stops.

References HandleEngineSound(), and UpdateLights().

◆ 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 vehicle is consuming fuel.

This callback is called on server.

References m_BrakeAmmount, m_CoolantAmmount, m_FuelAmmount, and m_OilAmmount.

◆ OnGearChanged()

override void OnGearChanged ( int  newGear,
int  oldGear 
)

References UpdateLights().

◆ 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.

References m_EngineStarted.

◆ OnUpdate()

◆ OnVariablesSynchronized()

◆ OnVehicleJumpOutServer()

◆ PlayCrashHeavySound()

void PlayCrashHeavySound ( )

◆ PlayCrashLightSound()

void PlayCrashLightSound ( )

◆ PlaySound()

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

References PlaySoundEx().

◆ PlaySoundEx()

◆ RemoveAction()

void RemoveAction ( typename actionName  )

◆ ReverseLightsShineOff()

protected void ReverseLightsShineOff ( )

◆ ReverseLightsShineOn()

protected void ReverseLightsShineOn ( )

◆ ReverseRearLight()

protected void ReverseRearLight ( )

References m_RearLight.

Referenced by UpdateLightsClient().

◆ RightFrontLightShineOff()

protected void RightFrontLightShineOff ( )

◆ RightFrontLightShineOn()

protected void RightFrontLightShineOn ( )

◆ SetActions()

void SetActions ( )

◆ SetCarEngineSoundState()

void SetCarEngineSoundState ( CarEngineSoundState  pState)

References m_CarEngineSoundState.

Referenced by OnBeforeEngineStart().

◆ SetCarHornState()

void SetCarHornState ( int  pState)

References GenerateCarHornAINoise(), GetGame(), and m_CarHornState.

Referenced by OnAction().

◆ SetEngineStarted()

void SetEngineStarted ( bool  started)

References m_EngineStarted.

Referenced by HandleEngineSound().

◆ SpawnAdditionalItems()

◆ SpawnUniversalParts()

◆ SynchCrashHeavySound()

void SynchCrashHeavySound ( bool  play)

References m_PlayCrashSoundHeavy.

Referenced by CheckContactCache().

◆ SynchCrashLightSound()

void SynchCrashLightSound ( bool  play)

References m_PlayCrashSoundLight.

Referenced by CheckContactCache().

◆ TailLightsShineOff()

protected void TailLightsShineOff ( )

◆ TailLightsShineOn()

protected void TailLightsShineOn ( )

◆ ToggleHeadlights()

void ToggleHeadlights ( )

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

References m_HeadlightsOn.

Referenced by EEItemDetached(), and OnUpdate().

◆ TranslateAnimationPhaseToCarDoorState()

CarDoorState TranslateAnimationPhaseToCarDoorState ( string  animation)

◆ UpdateHeadlightState()

void UpdateHeadlightState ( )

◆ UpdateLights()

◆ UpdateLightsClient()

◆ UpdateLightsServer()

◆ ~CarScript()

void ~CarScript ( )

References CleanupEffects().

Variable Documentation

◆ BATTERY_UPDATE_DELAY

private const float BATTERY_UPDATE_DELAY = 100

Referenced by OnUpdate().

◆ BRAKES_ONLY

enum CarDoorState BRAKES_ONLY

◆ DROWN_ENGINE_DAMAGE

float DROWN_ENGINE_DAMAGE = 350.0
static

Referenced by OnUpdate().

◆ DROWN_ENGINE_THRESHOLD

float DROWN_ENGINE_THRESHOLD = 0.5
static

Referenced by OnUpdate().

◆ LEFT

enum CarDoorState LEFT

◆ LONG

enum CarDoorState LONG

◆ m_ActionsInitialize

bool m_ActionsInitialize

◆ m_backPos

protected vector m_backPos

Referenced by CarScript(), and GetBackPointPosWS().

◆ m_BatteryConsume

protected float m_BatteryConsume = 15

Referenced by GetBatteryConsumption().

◆ m_BatteryContinuousConsume

protected float m_BatteryContinuousConsume = 0.25

◆ m_BatteryEnergyStartMin

protected float m_BatteryEnergyStartMin = 5.0

◆ m_BatteryHealth

protected float m_BatteryHealth

◆ m_BatteryRecharge

protected float m_BatteryRecharge = 0.15

Referenced by GetBatteryRechargeRate().

◆ m_BatteryTimer

private float m_BatteryTimer = 0

Referenced by OnUpdate().

◆ m_BrakeAmmount

protected float m_BrakeAmmount

Referenced by OnFluidChanged().

◆ m_BrakesArePressed

protected bool m_BrakesArePressed

◆ m_CarDoorCloseSound

◆ m_CarDoorOpenSound

◆ m_CarEngineLastSoundState

protected int m_CarEngineLastSoundState

◆ m_CarEngineSoundState

protected int m_CarEngineSoundState

◆ m_CarHornLongSoundName

◆ m_CarHornShortSoundName

◆ m_CarHornSoundEffect

protected ref EffectSound m_CarHornSoundEffect

◆ m_CarHornState

protected int m_CarHornState

◆ m_CarSeatShiftInSound

string m_CarSeatShiftInSound = ""

◆ m_CarSeatShiftOutSound

string m_CarSeatShiftOutSound = ""

◆ m_CarTypeActionsMap

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

Referenced by InitializeActions().

◆ m_ContactCache

ref CarContactCache m_ContactCache

◆ m_CoolantAmmount

protected float m_CoolantAmmount

Referenced by OnFluidChanged().

◆ m_coolantFx

protected ref EffVehicleSmoke m_coolantFx

Particles.

Referenced by CleanupEffects(), and EOnPostSimulate().

◆ m_coolantPtcFx

protected int m_coolantPtcFx

Referenced by CarScript(), and EOnPostSimulate().

◆ m_coolantPtcPos

protected vector m_coolantPtcPos

◆ m_CrashSoundHeavy

ref EffectSound m_CrashSoundHeavy

◆ m_CrashSoundLight

ref EffectSound m_CrashSoundLight

◆ m_dmgContactCoef

protected float m_dmgContactCoef = 0.058

◆ m_DrownEnginePoint

string m_DrownEnginePoint = "drown_engine"
static

◆ m_DrownEnginePos

vector m_DrownEnginePos
static

Referenced by CarScript(), and GetEnginePosWS().

◆ m_DrownTime

protected float m_DrownTime

Referenced by OnUpdate().

◆ m_EngineDestroyed

protected bool m_EngineDestroyed

Referenced by EEKilled().

◆ m_engineFx

protected ref EffVehicleSmoke m_engineFx

◆ m_EngineHealth

protected float m_EngineHealth

◆ m_enginePos

protected vector m_enginePos

Referenced by CarScript(), and GetEnginePointPosWS().

◆ m_enginePtcFx

protected int m_enginePtcFx

◆ m_enginePtcPos

◆ m_EngineStartBattery

◆ m_EngineStarted

protected bool m_EngineStarted

Referenced by OnSound(), and SetEngineStarted().

◆ m_EngineStartFuel

◆ m_EngineStartOK

◆ m_EngineStartPlug

◆ m_EngineStopFuel

◆ m_EnviroHeatComfortOverride

protected float m_EnviroHeatComfortOverride

Referenced by CarScript().

◆ m_exhaustFx

protected ref EffVehicleSmoke m_exhaustFx

Referenced by CleanupEffects(), and EOnPostSimulate().

◆ m_exhaustPtcDir

protected vector m_exhaustPtcDir

Referenced by CarScript(), and EOnPostSimulate().

◆ m_exhaustPtcFx

protected int m_exhaustPtcFx

Referenced by CarScript(), and EOnPostSimulate().

◆ m_exhaustPtcPos

protected vector m_exhaustPtcPos

Referenced by CarScript(), and EOnPostSimulate().

◆ m_ForceUpdateLights

protected bool m_ForceUpdateLights

◆ m_frontPos

protected vector m_frontPos

Referenced by CarScript(), and GetFrontPointPosWS().

◆ m_FuelAmmount

protected float m_FuelAmmount

keeps ammount of each fluid

Referenced by OnFluidChanged().

◆ m_FuelTankHealth

protected float m_FuelTankHealth

◆ m_Headlight

CarLightBase m_Headlight

◆ m_HeadlightsOn

◆ m_HeadlightsState

◆ m_InputActionMap

TInputActionMap m_InputActionMap

◆ m_LeftHeadlightPoint

string m_LeftHeadlightPoint = "light_left"
static

Referenced by UpdateLightsClient().

◆ m_LeftHeadlightTargetPoint

string m_LeftHeadlightTargetPoint = "light_left_dir"
static

Referenced by UpdateLightsClient().

◆ m_MomentumPrevTick

protected float m_MomentumPrevTick

◆ m_NoisePar

protected ref NoiseParams m_NoisePar

◆ m_NoiseSystem

protected NoiseSystem m_NoiseSystem

Referenced by EEInit(), and GenerateCarHornAINoise().

◆ m_OilAmmount

protected float m_OilAmmount

Referenced by OnFluidChanged().

◆ m_PlayCrashSoundHeavy

protected bool m_PlayCrashSoundHeavy

◆ m_PlayCrashSoundLight

protected bool m_PlayCrashSoundLight

◆ m_PlugHealth

protected float m_PlugHealth

◆ m_PreStartSound

private ref EffectSound m_PreStartSound

Referenced by HandleEngineSound().

◆ m_Radiator

protected EntityAI m_Radiator

◆ m_RadiatorHealth

protected float m_RadiatorHealth

◆ m_RearLight

◆ m_RearLightType

protected bool m_RearLightType

◆ m_ReverseLightPoint

string m_ReverseLightPoint = "light_reverse"
static

Referenced by UpdateLightsClient().

◆ m_RightHeadlightPoint

string m_RightHeadlightPoint = "light_right"
static

Referenced by UpdateLightsClient().

◆ m_RightHeadlightTargetPoint

string m_RightHeadlightTargetPoint = "light_right_dir"
static

Referenced by UpdateLightsClient().

◆ m_side_1_1Pos

protected vector m_side_1_1Pos

Referenced by CarScript(), and Get_1_1PointPosWS().

◆ m_side_1_2Pos

protected vector m_side_1_2Pos

Referenced by CarScript(), and Get_1_2PointPosWS().

◆ m_side_2_1Pos

protected vector m_side_2_1Pos

Referenced by CarScript(), and Get_2_1PointPosWS().

◆ m_side_2_2Pos

protected vector m_side_2_2Pos

Referenced by CarScript(), and Get_2_2PointPosWS().

◆ m_Time

protected float m_Time

◆ m_VelocityPrevTick

protected vector m_VelocityPrevTick

◆ m_WheelSmokeFx

protected ref array<ref EffWheelSmoke> m_WheelSmokeFx

◆ m_WheelSmokePtcFx

protected ref array<int> m_WheelSmokePtcFx

◆ m_WindowLarge

ref EffectSound m_WindowLarge

◆ m_WindowSmall

ref EffectSound m_WindowSmall

◆ MEMORY_POINT_NAME_CAR_HORN

const string MEMORY_POINT_NAME_CAR_HORN = "pos_carHorn"
static

◆ NONE

enum CarDoorState NONE

◆ OFF

enum CarDoorState OFF = 0

◆ REVERSE_ONLY

enum CarDoorState REVERSE_ONLY

◆ RIGHT

enum CarDoorState RIGHT

◆ SELECTION_ID_BRAKE_LIGHT_L

const int SELECTION_ID_BRAKE_LIGHT_L = 2
static

◆ SELECTION_ID_BRAKE_LIGHT_R

const int SELECTION_ID_BRAKE_LIGHT_R = 3
static

◆ SELECTION_ID_DASHBOARD_LIGHT

const int SELECTION_ID_DASHBOARD_LIGHT = 8
static

◆ SELECTION_ID_FRONT_LIGHT_L

const int SELECTION_ID_FRONT_LIGHT_L = 0
static

◆ SELECTION_ID_FRONT_LIGHT_R

const int SELECTION_ID_FRONT_LIGHT_R = 1
static

◆ SELECTION_ID_REVERSE_LIGHT_L

const int SELECTION_ID_REVERSE_LIGHT_L = 4
static

◆ SELECTION_ID_REVERSE_LIGHT_R

const int SELECTION_ID_REVERSE_LIGHT_R = 5
static

◆ SELECTION_ID_TAIL_LIGHT_L

const int SELECTION_ID_TAIL_LIGHT_L = 6
static

◆ SELECTION_ID_TAIL_LIGHT_R

const int SELECTION_ID_TAIL_LIGHT_R = 7
static

◆ 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.