Dayz Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Loading...
Searching...
No Matches
BoatScript Class Reference

Base script class for boats. More...

Inheritance diagram for BoatScript:
Boat_01_ColorBase

Protected Member Functions

void BoatScript ()
void ~BoatScript ()
void AddAction (typename actionName)
override bool CanReachDoorsFromSeat (string pDoorsSelection, int pCurrentSeat)
override bool CanReachSeatFromDoors (string pSeatSelection, vector pFromPos, float pDistance=1.0)
override bool CanReachSeatFromSeat (int currentSeat, int nextSeat)
void CheckContactCache ()
int CheckOperationalRequirements ()
bool CheckOperationalState ()
void CleanupEffects ()
void ClearWaterEffects ()
override bool CrewCanGetThrough (int posIdx)
void DecayHealthTick ()
override bool DetectFlipped (VehicleFlippedContext ctx)
override bool DisableVicinityIcon ()
override void EEDelete (EntityAI parent)
override void EEHitBy (TotalDamageResult damageResult, int damageType, EntityAI source, int component, string dmgZone, string ammo, vector modelPos, float speedCoef)
override void EEOnCECreate ()
override void EOnFrame (IEntity other, float timeSlice)
override void EOnPostSimulate (IEntity other, float timeSlice)
override void EOnSimulate (IEntity other, float dt)
void FadeEngineSound (bool fadeIn)
void FlipVehicle ()
override int Get3rdPersonCameraType ()
override void GetActions (typename action_input_type, out array< ActionBase_Basic > actions)
override int GetAnimInstance ()
override void GetDebugActions (out TSelectableActionInfoArrayEx outputList)
override event GetMoveType ()
override event GetOwnerStateType ()
override float GetTransportCameraDistance ()
override vector GetTransportCameraOffset ()
override string GetVehicleType ()
void HandleBoatSplashSound ()
void HandleEngineSound (EBoatEngineSoundState state)
void InitializeActions ()
override bool IsAreaAtDoorFree (int currentSeat, float maxAllowedObjHeight, inout vector extents, out vector transform[4])
bool IsInFlagRange ()
override bool IsInventoryVisible ()
override void MarkCrewMemberDead (int crewMemberIndex)
override void MarkCrewMemberUnconscious (int crewMemberIndex)
override bool OnAction (int action_id, Man player, ParamsReadContext ctx)
override bool OnBeforeEngineStart ()
 Gets called everytime the game wants to start the engine.
override void OnContact (string zoneName, vector localPos, IEntity other, Contact data)
 WARNING: Can be called very frequently in one frame, use with caution.
override void OnDriverExit (Human player)
override void OnEngineStart ()
override void OnEngineStop ()
void OnIgnition ()
override void OnInput (float dt)
override float OnSound (BoatSoundCtrl ctrl, float oldValue)
override void OnVariablesSynchronized ()
void OnVehicleJumpOutServer (GetOutTransportActionData data)
void PlaySound (string soundset, inout EffectSound sound, vector position=vector.Zero)
void RemoveAction (typename actionName)
void SetActions ()
void StopParticleUpdate ()
void SyncSoundImpactHeavy ()
void SyncSoundImpactLight ()
void SyncSoundPushBoat (bool play)
void UpdateParticles (float timeSlice=0)

Protected Attributes

const float DECAY_DAMAGE = 0.017
const int DECAY_FLAG_RANGE = 100
const float DECAY_FLIPPED_MULT = 4
const int DECAY_PLAYER_RANGE = 300
const float DECAY_TICK_FREQUENCY = 10
ref VehicleContactData m_ContactData
ref Timer m_DecayTimer
bool m_EngineFadeDirection
float m_EngineFadeTime
bool m_IsEngineSoundFading
float m_MomentumPrevTick
bool m_PlaySoundEngineStopNoFuel
bool m_PlaySoundImpactHeavy
bool m_PlaySoundImpactLight
bool m_PlaySoundPushBoat
ref EffectSound m_SoundEngineEffect
ref EffectSound m_SoundEngineEffectDeletion
string m_SoundEngineStart
string m_SoundEngineStartNoFuel
string m_SoundEngineStop
string m_SoundEngineStopNoFuel
string m_SoundImpactHeavy
string m_SoundImpactLight
string m_SoundPushBoat
ref EffectSound m_SoundPushBoatEffect
string m_SoundWaterSplash
ref EffectSound m_SoundWaterSplashEffect
bool m_SplashIncoming
bool m_UpdateParticles
vector m_VelocityPrevTick
ref EffectBoatWaterBase m_WaterEffects [4]
const float SOUND_ENGINE_FADE = 0.2
const float SPLASH_THRESHOLD = 0.18
const float SPLASH_THRESHOLD_CONDITION = 0.08

Private Attributes

bool m_ActionsInitialized
TInputActionMap m_InputActionMap

Static Private Attributes

static ref map< typename, ref TInputActionMapm_BoatTypeActionsMap = new map<typename, ref TInputActionMap>()

Detailed Description

Base script class for boats.

Definition at line 41 of file boatscript.c.

Constructor & Destructor Documentation

◆ BoatScript()

◆ ~BoatScript()

void ~BoatScript ( )
inlineprotected

Definition at line 143 of file boatscript.c.

References CleanupEffects(), and m_DecayTimer.

Member Function Documentation

◆ AddAction()

void AddAction ( typename actionName )
inlineprotected

◆ CanReachDoorsFromSeat()

override bool CanReachDoorsFromSeat ( string pDoorsSelection,
int pCurrentSeat )
inlineprotected

Definition at line 232 of file boatscript.c.

◆ CanReachSeatFromDoors()

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

Definition at line 227 of file boatscript.c.

◆ CanReachSeatFromSeat()

override bool CanReachSeatFromSeat ( int currentSeat,
int nextSeat )
inlineprotected

Definition at line 222 of file boatscript.c.

◆ CheckContactCache()

◆ CheckOperationalRequirements()

int CheckOperationalRequirements ( )
inlineprotected

Definition at line 254 of file boatscript.c.

References GameConstants::STATE_RUINED.

Referenced by OnBeforeEngineStart(), and OnIgnition().

◆ CheckOperationalState()

bool CheckOperationalState ( )
inlineprotected

Definition at line 564 of file boatscript.c.

References GameConstants::STATE_RUINED.

Referenced by EEHitBy(), and OnContact().

◆ CleanupEffects()

void CleanupEffects ( )
inlineprotected

◆ ClearWaterEffects()

void ClearWaterEffects ( )
inlineprotected

◆ CrewCanGetThrough()

override bool CrewCanGetThrough ( int posIdx)
inlineprotected

Definition at line 217 of file boatscript.c.

◆ DecayHealthTick()

◆ DetectFlipped()

override bool DetectFlipped ( VehicleFlippedContext ctx)
inlineprotected

Definition at line 482 of file boatscript.c.

References GameConstants::VEHICLE_FLIP_ANGLE_TOLERANCE.

◆ DisableVicinityIcon()

override bool DisableVicinityIcon ( )
inlineprotected

Definition at line 182 of file boatscript.c.

◆ EEDelete()

override void EEDelete ( EntityAI parent)
inlineprotected

Definition at line 153 of file boatscript.c.

References CleanupEffects(), and g_Game.

◆ EEHitBy()

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

Definition at line 441 of file boatscript.c.

References CheckOperationalState(), component, and IsProxy().

◆ EEOnCECreate()

override void EEOnCECreate ( )
inlineprotected

Definition at line 334 of file boatscript.c.

References Math::RandomFloat().

◆ EOnFrame()

override void EOnFrame ( IEntity other,
float timeSlice )
inlineprotected

◆ EOnPostSimulate()

override void EOnPostSimulate ( IEntity other,
float timeSlice )
inlineprotected

◆ EOnSimulate()

override void EOnSimulate ( IEntity other,
float dt )
inlineprotected

Definition at line 385 of file boatscript.c.

References dBodyGetWorldTransform(), g_Game, and IsProxy().

◆ FadeEngineSound()

void FadeEngineSound ( bool fadeIn)
inlineprotected

◆ FlipVehicle()

void FlipVehicle ( )
inlineprotected

Definition at line 721 of file boatscript.c.

References GetOrientation(), GetPosition(), and SetPosition().

Referenced by OnAction().

◆ Get3rdPersonCameraType()

override int Get3rdPersonCameraType ( )
inlineprotected

Definition at line 212 of file boatscript.c.

References DayZPlayerCameras::DAYZCAMERA_3RD_VEHICLE.

◆ GetActions()

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

Definition at line 171 of file boatscript.c.

References InitializeActions(), m_ActionsInitialized, and m_InputActionMap.

◆ GetAnimInstance()

override int GetAnimInstance ( )
inlineprotected

Definition at line 207 of file boatscript.c.

◆ GetDebugActions()

override void GetDebugActions ( out TSelectableActionInfoArrayEx outputList)
inlineprotected

Definition at line 848 of file boatscript.c.

References SAT_DEBUG_ACTION.

◆ GetMoveType()

override event GetMoveType ( )
inlineprotected

Definition at line 880 of file boatscript.c.

◆ GetOwnerStateType()

override event GetOwnerStateType ( )
inlineprotected

Definition at line 875 of file boatscript.c.

◆ GetTransportCameraDistance()

override float GetTransportCameraDistance ( )
inlineprotected

Definition at line 197 of file boatscript.c.

◆ GetTransportCameraOffset()

override vector GetTransportCameraOffset ( )
inlineprotected

Definition at line 202 of file boatscript.c.

◆ GetVehicleType()

override string GetVehicleType ( )
inlineprotected

Definition at line 187 of file boatscript.c.

◆ HandleBoatSplashSound()

◆ HandleEngineSound()

void HandleEngineSound ( EBoatEngineSoundState state)
inlineprotected

◆ InitializeActions()

void InitializeActions ( )
inlineprotected

Definition at line 159 of file boatscript.c.

References m_BoatTypeActionsMap, m_InputActionMap, SetActions(), and Type.

Referenced by GetActions().

◆ IsAreaAtDoorFree()

override bool IsAreaAtDoorFree ( int currentSeat,
float maxAllowedObjHeight,
inout vector extents,
out vector transform[4] )
inlineprotected

Definition at line 237 of file boatscript.c.

◆ IsInFlagRange()

bool IsInFlagRange ( )
inlineprotected

Definition at line 542 of file boatscript.c.

References DECAY_FLAG_RANGE, vector::Distance(), and g_Game.

Referenced by DecayHealthTick().

◆ IsInventoryVisible()

override bool IsInventoryVisible ( )
inlineprotected

Definition at line 192 of file boatscript.c.

References g_Game.

◆ MarkCrewMemberDead()

override void MarkCrewMemberDead ( int crewMemberIndex)
inlineprotected

Definition at line 515 of file boatscript.c.

◆ MarkCrewMemberUnconscious()

override void MarkCrewMemberUnconscious ( int crewMemberIndex)
inlineprotected

Definition at line 504 of file boatscript.c.

◆ OnAction()

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

Definition at line 855 of file boatscript.c.

References FlipVehicle(), and g_Game.

◆ OnBeforeEngineStart()

override bool OnBeforeEngineStart ( )
inlineprotected

Gets called everytime the game wants to start the engine.

Returns
true if the engine can start, false otherwise.

Definition at line 247 of file boatscript.c.

References CheckOperationalRequirements().

◆ OnContact()

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

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

Definition at line 418 of file boatscript.c.

References CheckOperationalState(), vector::Dot(), g_Game, GetVelocity(), IsProxy(), m_ContactData, m_MomentumPrevTick, and m_VelocityPrevTick.

◆ OnDriverExit()

override void OnDriverExit ( Human player)
inlineprotected

Definition at line 579 of file boatscript.c.

◆ OnEngineStart()

override void OnEngineStart ( )
inlineprotected

Definition at line 302 of file boatscript.c.

References ClearWaterEffects(), FadeEngineSound(), g_Game, and HandleEngineSound().

◆ OnEngineStop()

override void OnEngineStop ( )
inlineprotected

◆ OnIgnition()

void OnIgnition ( )
inlineprotected

Definition at line 280 of file boatscript.c.

References CheckOperationalRequirements(), and HandleEngineSound().

Referenced by OnExecute().

◆ OnInput()

override void OnInput ( float dt)
inlineprotected

Definition at line 342 of file boatscript.c.

◆ OnSound()

override float OnSound ( BoatSoundCtrl ctrl,
float oldValue )
inlineprotected

◆ OnVariablesSynchronized()

◆ OnVehicleJumpOutServer()

◆ PlaySound()

void PlaySound ( string soundset,
inout EffectSound sound,
vector position = vector.Zero )
inlineprotected

◆ RemoveAction()

void RemoveAction ( typename actionName )
inlineprotected

Definition at line 787 of file boatscript.c.

References g_Game, ActionBase::GetInputType(), and m_InputActionMap.

◆ SetActions()

void SetActions ( )
inlineprotected

Definition at line 748 of file boatscript.c.

References AddAction().

Referenced by InitializeActions().

◆ StopParticleUpdate()

void StopParticleUpdate ( )
inlineprotected

Definition at line 808 of file boatscript.c.

References ClearWaterEffects(), and m_UpdateParticles.

Referenced by ClearWaterEffects(), and OnEngineStop().

◆ SyncSoundImpactHeavy()

void SyncSoundImpactHeavy ( )
inlineprotected

Definition at line 695 of file boatscript.c.

References m_PlaySoundImpactHeavy.

Referenced by CheckContactCache().

◆ SyncSoundImpactLight()

void SyncSoundImpactLight ( )
inlineprotected

Definition at line 686 of file boatscript.c.

References m_PlaySoundImpactLight.

Referenced by CheckContactCache().

◆ SyncSoundPushBoat()

void SyncSoundPushBoat ( bool play)
inlineprotected

Definition at line 704 of file boatscript.c.

References m_PlaySoundPushBoat.

Referenced by ActionPushBoat::OnEndServer(), and ActionPushBoat::OnStartServer().

◆ UpdateParticles()

void UpdateParticles ( float timeSlice = 0)
inlineprotected

Definition at line 800 of file boatscript.c.

References m_WaterEffects.

Referenced by EOnFrame().

Field Documentation

◆ DECAY_DAMAGE

const float DECAY_DAMAGE = 0.017
protected

Definition at line 46 of file boatscript.c.

Referenced by DecayHealthTick().

◆ DECAY_FLAG_RANGE

const int DECAY_FLAG_RANGE = 100
protected

Definition at line 44 of file boatscript.c.

Referenced by IsInFlagRange().

◆ DECAY_FLIPPED_MULT

const float DECAY_FLIPPED_MULT = 4
protected

Definition at line 47 of file boatscript.c.

Referenced by DecayHealthTick().

◆ DECAY_PLAYER_RANGE

const int DECAY_PLAYER_RANGE = 300
protected

Definition at line 43 of file boatscript.c.

Referenced by DecayHealthTick().

◆ DECAY_TICK_FREQUENCY

const float DECAY_TICK_FREQUENCY = 10
protected

Definition at line 45 of file boatscript.c.

Referenced by BoatScript().

◆ m_ActionsInitialized

bool m_ActionsInitialized
private

Definition at line 55 of file boatscript.c.

Referenced by AddAction(), and GetActions().

◆ m_BoatTypeActionsMap

ref map<typename, ref TInputActionMap> m_BoatTypeActionsMap = new map<typename, ref TInputActionMap>()
staticprivate

Definition at line 53 of file boatscript.c.

Referenced by InitializeActions().

◆ m_ContactData

ref VehicleContactData m_ContactData
protected

Definition at line 59 of file boatscript.c.

Referenced by CheckContactCache(), and OnContact().

◆ m_DecayTimer

ref Timer m_DecayTimer
protected

Definition at line 60 of file boatscript.c.

Referenced by BoatScript(), and ~BoatScript().

◆ m_EngineFadeDirection

bool m_EngineFadeDirection
protected

Definition at line 73 of file boatscript.c.

Referenced by FadeEngineSound(), and OnSound().

◆ m_EngineFadeTime

float m_EngineFadeTime
protected

Definition at line 74 of file boatscript.c.

Referenced by EOnFrame(), FadeEngineSound(), and OnSound().

◆ m_InputActionMap

TInputActionMap m_InputActionMap
private

Definition at line 54 of file boatscript.c.

Referenced by AddAction(), GetActions(), InitializeActions(), and RemoveAction().

◆ m_IsEngineSoundFading

bool m_IsEngineSoundFading
protected

Definition at line 72 of file boatscript.c.

Referenced by EOnFrame(), FadeEngineSound(), and OnSound().

◆ m_MomentumPrevTick

float m_MomentumPrevTick
protected

Definition at line 58 of file boatscript.c.

Referenced by EOnPostSimulate(), and OnContact().

◆ m_PlaySoundEngineStopNoFuel

bool m_PlaySoundEngineStopNoFuel
protected

Definition at line 68 of file boatscript.c.

Referenced by EOnPostSimulate(), and OnVariablesSynchronized().

◆ m_PlaySoundImpactHeavy

bool m_PlaySoundImpactHeavy
protected

Definition at line 70 of file boatscript.c.

Referenced by BoatScript(), OnVariablesSynchronized(), and SyncSoundImpactHeavy().

◆ m_PlaySoundImpactLight

bool m_PlaySoundImpactLight
protected

Definition at line 69 of file boatscript.c.

Referenced by BoatScript(), OnVariablesSynchronized(), and SyncSoundImpactLight().

◆ m_PlaySoundPushBoat

bool m_PlaySoundPushBoat
protected

Definition at line 71 of file boatscript.c.

Referenced by OnVariablesSynchronized(), and SyncSoundPushBoat().

◆ m_SoundEngineEffect

ref EffectSound m_SoundEngineEffect
protected

Definition at line 87 of file boatscript.c.

Referenced by HandleEngineSound().

◆ m_SoundEngineEffectDeletion

ref EffectSound m_SoundEngineEffectDeletion
protected

Definition at line 88 of file boatscript.c.

Referenced by HandleEngineSound().

◆ m_SoundEngineStart

string m_SoundEngineStart
protected

Definition at line 79 of file boatscript.c.

Referenced by BoatScript(), and HandleEngineSound().

◆ m_SoundEngineStartNoFuel

string m_SoundEngineStartNoFuel
protected

Definition at line 81 of file boatscript.c.

Referenced by BoatScript(), and HandleEngineSound().

◆ m_SoundEngineStop

string m_SoundEngineStop
protected

Definition at line 80 of file boatscript.c.

Referenced by BoatScript(), and HandleEngineSound().

◆ m_SoundEngineStopNoFuel

string m_SoundEngineStopNoFuel
protected

Definition at line 82 of file boatscript.c.

Referenced by BoatScript(), and HandleEngineSound().

◆ m_SoundImpactHeavy

string m_SoundImpactHeavy
protected

Definition at line 76 of file boatscript.c.

Referenced by BoatScript(), and OnVariablesSynchronized().

◆ m_SoundImpactLight

string m_SoundImpactLight
protected

Definition at line 75 of file boatscript.c.

Referenced by BoatScript(), and OnVariablesSynchronized().

◆ m_SoundPushBoat

string m_SoundPushBoat
protected

Definition at line 77 of file boatscript.c.

Referenced by BoatScript(), and OnVariablesSynchronized().

◆ m_SoundPushBoatEffect

ref EffectSound m_SoundPushBoatEffect
protected

Definition at line 85 of file boatscript.c.

Referenced by CleanupEffects(), and OnVariablesSynchronized().

◆ m_SoundWaterSplash

string m_SoundWaterSplash
protected

Definition at line 78 of file boatscript.c.

Referenced by BoatScript(), and HandleBoatSplashSound().

◆ m_SoundWaterSplashEffect

ref EffectSound m_SoundWaterSplashEffect
protected

Definition at line 86 of file boatscript.c.

Referenced by CleanupEffects(), and HandleBoatSplashSound().

◆ m_SplashIncoming

bool m_SplashIncoming
protected

Definition at line 67 of file boatscript.c.

Referenced by HandleBoatSplashSound().

◆ m_UpdateParticles

bool m_UpdateParticles
protected

Definition at line 63 of file boatscript.c.

Referenced by EOnFrame(), EOnPostSimulate(), and StopParticleUpdate().

◆ m_VelocityPrevTick

vector m_VelocityPrevTick
protected

Definition at line 57 of file boatscript.c.

Referenced by EOnPostSimulate(), and OnContact().

◆ m_WaterEffects

ref EffectBoatWaterBase m_WaterEffects[4]
protected

Definition at line 64 of file boatscript.c.

Referenced by BoatScript(), CleanupEffects(), ClearWaterEffects(), and UpdateParticles().

◆ SOUND_ENGINE_FADE

const float SOUND_ENGINE_FADE = 0.2
protected

Definition at line 49 of file boatscript.c.

Referenced by FadeEngineSound(), and OnSound().

◆ SPLASH_THRESHOLD

const float SPLASH_THRESHOLD = 0.18
protected

Definition at line 51 of file boatscript.c.

Referenced by HandleBoatSplashSound().

◆ SPLASH_THRESHOLD_CONDITION

const float SPLASH_THRESHOLD_CONDITION = 0.08
protected

Definition at line 50 of file boatscript.c.

Referenced by HandleBoatSplashSound().


The documentation for this class was generated from the following file:
  • F:/Games/Dayz/scripts/4_world/entities/vehicles/boatscript.c