DayZ 1.26
DayZ Explorer by KGB
Загрузка...
Поиск...
Не найдено
Класс BoatScript
+ Граф наследования:BoatScript:

Защищенные члены

void BoatScript ()
 
void ~BoatScript ()
 
override void EEDelete (EntityAI parent)
 
void InitializeActions ()
 
override void GetActions (typename action_input_type, out array< ActionBase_Basic > actions)
 
override bool DisableVicinityIcon ()
 
override string GetVehicleType ()
 
override bool IsInventoryVisible ()
 
override float GetTransportCameraDistance ()
 
override vector GetTransportCameraOffset ()
 
override int GetAnimInstance ()
 
override int Get3rdPersonCameraType ()
 
override bool CrewCanGetThrough (int posIdx)
 
override bool CanReachSeatFromSeat (int currentSeat, int nextSeat)
 
override bool CanReachSeatFromDoors (string pSeatSelection, vector pFromPos, float pDistance=1.0)
 
override bool CanReachDoorsFromSeat (string pDoorsSelection, int pCurrentSeat)
 
override bool IsAreaAtDoorFree (int currentSeat, float maxAllowedObjHeight, inout vector extents, out vector transform[4])
 
override bool OnBeforeEngineStart ()
 
override void OnEngineStart ()
 
override void OnEngineStop ()
 
override void EEOnCECreate ()
 
override void EOnPostSimulate (IEntity other, float timeSlice)
 
override void EOnSimulate (IEntity other, float timeSlice)
 
override void EOnFrame (IEntity other, float timeSlice)
 
override void EOnContact (IEntity other, Contact extra)
 
override void EEHitBy (TotalDamageResult damageResult, int damageType, EntityAI source, int component, string dmgZone, string ammo, vector modelPos, float speedCoef)
 
override void OnVariablesSynchronized ()
 
override float OnSound (BoatSoundCtrl ctrl, float oldValue)
 
override void HandleByCrewMemberState (ECrewMemberState state)
 
bool CheckOperationalState ()
 
void OnVehicleJumpOutServer (GetOutTransportActionData data)
 
void HandleEngineSound (EBoatEngineSoundState state)
 
void PlaySound (string soundset, inout EffectSound sound)
 
void HandleBoatSplashSound ()
 
void SyncSoundImpactLight ()
 
void SyncSoundImpactHeavy ()
 
void SyncSoundPushBoat (bool play)
 
void FadeEngineSound (bool fadeIn)
 
void CheckContactCache ()
 
void SetActions ()
 
void AddAction (typename actionName)
 
void RemoveAction (typename actionName)
 
void UpdateParticles ()
 
void StopParticleUpdate ()
 
void ClearWaterEffects ()
 
void CleanupEffects ()
 
override void GetDebugActions (out TSelectableActionInfoArrayEx outputList)
 
override bool OnAction (int action_id, Man player, ParamsReadContext ctx)
 
override event GetOwnerStateType ()
 
override event GetMoveType ()
 

Защищенные данные

const float SOUND_ENGINE_FADE = 0.2
 
const float SPLASH_THRESHOLD_CONDITION = 0.08
 
const float SPLASH_THRESHOLD = 0.18
 
vector m_VelocityPrevTick
 
float m_MomentumPrevTick
 
ref VehicleContactData m_ContactData
 
bool m_UpdateParticles
 
ref EffectBoatWaterBase m_WaterEffects [4]
 
bool m_SplashIncoming
 
bool m_PlaySoundEngineStopNoFuel
 
bool m_PlaySoundImpactLight
 
bool m_PlaySoundImpactHeavy
 
bool m_PlaySoundPushBoat
 
bool m_IsEngineSoundFading
 
bool m_EngineFadeDirection
 
float m_EngineFadeTime
 
string m_SoundImpactLight
 
string m_SoundImpactHeavy
 
string m_SoundPushBoat
 
string m_SoundWaterSplash
 
ref EffectSound m_SoundImpactLightEffect
 
ref EffectSound m_SoundImpactHeavyEffect
 
ref EffectSound m_SoundPushBoatEffect
 
ref EffectSound m_SoundWaterSplashEffect
 

Закрытые данные

TInputActionMap m_InputActionMap
 
bool m_ActionsInitialized
 

Закрытые статические данные

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

Подробное описание

Конструктор(ы)

◆ BoatScript()

void BoatScript ( )
inlineprotected
63 {
64 SetEventMask(EntityEvent.POSTSIMULATE);
65 SetEventMask(EntityEvent.FRAME);
66
69
70 RegisterNetSyncVariableBool("m_PlaySoundEngineStopNoFuel");
71 RegisterNetSyncVariableBool("m_PlaySoundPushBoat");
72 RegisterNetSyncVariableBoolSignal("m_PlaySoundImpactLight");
73 RegisterNetSyncVariableBoolSignal("m_PlaySoundImpactHeavy");
74
75 m_SoundImpactHeavy = "boat_01_hit_light_SoundSet";
76 m_SoundImpactLight = "boat_01_hit_heavy_SoundSet";
77 m_SoundPushBoat = "boat_01_push_SoundSet";
78 m_SoundWaterSplash = "boat_01_splash_SoundSet";
79
80 if (GetGame().IsDedicatedServer())
81 return;
82
87
88 if (MemoryPointExists("ptcFxFront"))
89 m_WaterEffects[EBoatEffects.PTC_FRONT].AttachTo(this, GetMemoryPointPos("ptcFxFront"));
90
91 if (MemoryPointExists("ptcFxBack"))
92 m_WaterEffects[EBoatEffects.PTC_BACK].AttachTo(this, GetMemoryPointPos("ptcFxBack"));
93
94 if (MemoryPointExists("ptcFxSide1"))
95 m_WaterEffects[EBoatEffects.PTC_SIDE_L].AttachTo(this, GetMemoryPointPos("ptcFxSide1"));
96
97 if (MemoryPointExists("ptcFxSide2"))
98 m_WaterEffects[EBoatEffects.PTC_SIDE_R].AttachTo(this, GetMemoryPointPos("ptcFxSide2"));
99 }
EBoatEffects
Definition BoatScript.c:2
void EffectBoatWaterFront()
Definition BoatWaterEffects.c:14
void EffectBoatWaterSide()
Definition BoatWaterEffects.c:203
string m_SoundImpactLight
Definition BoatScript.c:53
bool m_PlaySoundImpactHeavy
Definition BoatScript.c:48
bool m_PlaySoundImpactLight
Definition BoatScript.c:47
string m_SoundPushBoat
Definition BoatScript.c:55
string m_SoundImpactHeavy
Definition BoatScript.c:54
string m_SoundWaterSplash
Definition BoatScript.c:56
ref EffectBoatWaterBase m_WaterEffects[4]
Definition BoatScript.c:42
Definition BoatWaterEffects.c:117
proto native CGame GetGame()
EntityEvent
Entity events for event-mask, or throwing event from code.
Definition EnEntity.c:45

Перекрестные ссылки EffectBoatWaterFront(), EffectBoatWaterSide(), GetGame(), m_PlaySoundImpactHeavy, m_PlaySoundImpactLight, m_SoundImpactHeavy, m_SoundImpactLight, m_SoundPushBoat, m_SoundWaterSplash и m_WaterEffects.

◆ ~BoatScript()

void ~BoatScript ( )
inlineprotected
102 {
103 #ifndef SERVER
105 #endif
106 }
void CleanupEffects()
Definition BoatScript.c:651

Перекрестные ссылки CleanupEffects().

Методы

◆ AddAction()

void AddAction ( typename actionName )
inlineprotected
573 {
574 ActionBase action = ActionManagerBase.GetAction(actionName);
575
576 if (!action)
577 {
578 Debug.LogError("Action " + actionName + " dosn't exist!");
579 return;
580 }
581
582 typename ai = action.GetInputType();
583 if (!ai)
584 {
585 m_ActionsInitialized = false;
586 return;
587 }
588
590
591 if (!actionArray)
592 {
595 }
596
598 {
599 Debug.ActionLog(action.ToString() + " -> " + ai, this.ToString() , "n/a", "Add action" );
600 }
601
602 actionArray.Insert(action);
603 }
Definition ActionBase.c:53
TInputActionMap m_InputActionMap
Definition BoatScript.c:33
bool m_ActionsInitialized
Definition BoatScript.c:34
Definition Debug.c:14
static void ActionLog(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Definition Debug.c:141
static void LogError(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Prints debug message as error message.
Definition Debug.c:259
Definition Debug.c:600
static bool IsActionLogEnable()
Definition Debug.c:644
Definition EntityAI.c:95

Перекрестные ссылки Debug::ActionLog(), LogManager::IsActionLogEnable(), Debug::LogError(), m_ActionsInitialized и m_InputActionMap.

Используется в SetActions().

◆ CanReachDoorsFromSeat()

override bool CanReachDoorsFromSeat ( string pDoorsSelection,
int pCurrentSeat )
inlineprotected
188 {
189 return true;
190 }

◆ CanReachSeatFromDoors()

override bool CanReachSeatFromDoors ( string pSeatSelection,
vector pFromPos,
float pDistance = 1.0 )
inlineprotected
183 {
184 return true;
185 }

◆ CanReachSeatFromSeat()

override bool CanReachSeatFromSeat ( int currentSeat,
int nextSeat )
inlineprotected
178 {
179 return true;
180 }

◆ CheckContactCache()

void CheckContactCache ( )
inlineprotected
551 {
552 if (!m_ContactData)
553 return;
554
555 float impulse = Math.AbsInt(m_ContactData.m_Impulse);
557
559 return;
562 else
564 }
ref VehicleContactData m_ContactData
Definition BoatScript.c:38
void SyncSoundImpactLight()
Definition BoatScript.c:515
void SyncSoundImpactHeavy()
Definition BoatScript.c:524
Definition constants.c:638
Definition EnMath.c:7
const float CARS_CONTACT_DMG_MIN
Definition constants.c:798
const float CARS_CONTACT_DMG_THRESHOLD
Definition constants.c:797
static proto int AbsInt(int i)
Returns absolute value.

Перекрестные ссылки Math::AbsInt(), GameConstants::CARS_CONTACT_DMG_MIN, GameConstants::CARS_CONTACT_DMG_THRESHOLD, m_ContactData, SyncSoundImpactHeavy() и SyncSoundImpactLight().

Используется в EOnPostSimulate().

◆ CheckOperationalState()

bool CheckOperationalState ( )
inlineprotected
414 {
415 if (GetHealthLevel("") >= GameConstants.STATE_RUINED || GetHealthLevel("Engine") >= GameConstants.STATE_RUINED)
416 return false;
417
418 if (IsVitalSparkPlug())
419 {
420 EntityAI item = FindAttachmentBySlotName("SparkPlug");
421 if (!item || (item && item.IsRuined()))
422 return false;
423 }
424
425 return true;
426 }
Definition Building.c:6
const int STATE_RUINED
Definition constants.c:807

Перекрестные ссылки GameConstants::STATE_RUINED.

Используется в EEHitBy() и EOnContact().

◆ CleanupEffects()

void CleanupEffects ( )
inlineprotected
652 {
653 for (int i; i < 4; i++)
654 {
656 {
657 m_WaterEffects[i].Stop();
659 }
660 }
661
666 }
bool IsRegistered()
Get whether this Effect is registered in SEffectManager.
Definition Effect.c:545
ref EffectSound m_SoundPushBoatEffect
Definition BoatScript.c:59
ref EffectSound m_SoundImpactHeavyEffect
Definition BoatScript.c:58
ref EffectSound m_SoundImpactLightEffect
Definition BoatScript.c:57
ref EffectSound m_SoundWaterSplashEffect
Definition BoatScript.c:60
Manager class for managing Effect (EffectParticle, EffectSound)
Definition EffectManager.c:6
static void DestroyEffect(Effect effect)
Unregisters, stops and frees the Effect.
Definition EffectManager.c:271
static void EffectUnregisterEx(Effect effect)
Unregisters Effect in SEffectManager.
Definition EffectManager.c:391

Перекрестные ссылки SEffectManager::DestroyEffect(), SEffectManager::EffectUnregisterEx(), IsRegistered(), m_SoundImpactHeavyEffect, m_SoundImpactLightEffect, m_SoundPushBoatEffect, m_SoundWaterSplashEffect и m_WaterEffects.

Используется в EEDelete() и ~BoatScript().

◆ ClearWaterEffects()

void ClearWaterEffects ( )
inlineprotected
633 {
634 GetGame().GetCallQueue(CALL_CATEGORY_SYSTEM).Remove(StopParticleUpdate);
635
636 for (int i; i < 4; i++)
637 {
639 {
641 {
642 m_WaterEffects[i].GetParticle().SetParticleParam(EmitorParam.BIRTH_RATE, 0);
643 m_WaterEffects[i].GetParticle().SetParticleParam(EmitorParam.BIRTH_RATE_RND, 0);
644 }
645 m_WaterEffects[i].Stop();
646 }
647 }
648 }
bool IsPlaying()
Returns true when the Effect is playing, false otherwise.
Definition Effect.c:195
proto native ParticleSource GetParticle(int index)
Manually get the particle at index.
void StopParticleUpdate()
Definition BoatScript.c:626
EmitorParam
Definition EnVisual.c:114
const int CALL_CATEGORY_SYSTEM
Definition tools.c:8

Перекрестные ссылки CALL_CATEGORY_SYSTEM, GetGame(), GetParticle(), IsPlaying(), m_WaterEffects и StopParticleUpdate().

Используется в OnEngineStart() и StopParticleUpdate().

◆ CrewCanGetThrough()

override bool CrewCanGetThrough ( int posIdx)
inlineprotected
173 {
174 return true;
175 }

◆ DisableVicinityIcon()

override bool DisableVicinityIcon ( )
inlineprotected
138 {
139 return true;
140 }

◆ EEDelete()

override void EEDelete ( EntityAI parent)
inlineprotected
109 {
110 if (!GetGame().IsDedicatedServer())
112 }

Перекрестные ссылки CleanupEffects() и GetGame().

◆ EEHitBy()

override void EEHitBy ( TotalDamageResult damageResult,
int damageType,
EntityAI source,
int component,
string dmgZone,
string ammo,
vector modelPos,
float speedCoef )
inlineprotected
332 {
334
335 if (GetGame().IsServer())
336 {
337 if (EngineIsOn() && !CheckOperationalState())
338 EngineStop();
339 }
340 }
class BoxCollidingParams component
ComponentInfo for BoxCollidingResult.
bool CheckOperationalState()
Definition BoatScript.c:413

Перекрестные ссылки CheckOperationalState(), component и GetGame().

◆ EEOnCECreate()

override void EEOnCECreate ( )
inlineprotected
241 {
242 float maxVolume = GetFluidCapacity(BoatFluid.FUEL);
243 float amount = Math.RandomFloat(0.0, maxVolume * 0.35);
244
245 Fill(BoatFluid.FUEL, amount);
246 }
BoatFluid
Type of vehicle's fluid. (native, do not change or extend)
Definition Boat.c:14
static proto float RandomFloat(float min, float max)
Returns a random float number between and min[inclusive] and max[exclusive].

Перекрестные ссылки Math::RandomFloat().

◆ EOnContact()

override void EOnContact ( IEntity other,
Contact extra )
inlineprotected
311 {
312 if (GetGame().IsServer())
313 {
314 if (m_ContactData)
315 return;
316
317 float momentumDelta = GetMomentum() - m_MomentumPrevTick;
318 float dot = vector.Dot(m_VelocityPrevTick.Normalized(), GetVelocity(this).Normalized());
319 if (dot < 0)
321
323 m_ContactData.SetData(extra.Position, other, momentumDelta); // change to local pos
324
325 if (EngineIsOn() && !CheckOperationalState())
326 EngineStop();
327 }
328
329 }
vector m_VelocityPrevTick
Definition BoatScript.c:36
float m_MomentumPrevTick
Definition BoatScript.c:37
Definition Transport.c:449
Definition EnConvert.c:106
proto vector Normalized()
return normalized vector (keeps orginal vector untouched)
static float Dot(vector v1, vector v2)
Returns Dot product of vector v1 and vector v2.
Definition EnConvert.c:271
proto native vector GetVelocity(notnull IEntity ent)
Returns linear velocity.

Перекрестные ссылки CheckOperationalState(), vector::Dot(), GetGame(), GetVelocity(), m_ContactData, m_MomentumPrevTick, m_VelocityPrevTick и vector::Normalized().

◆ EOnFrame()

override void EOnFrame ( IEntity other,
float timeSlice )
inlineprotected
295 {
296 if (!GetGame().IsDedicatedServer())
297 {
300
302 {
304 if (m_EngineFadeTime < 0)
305 m_IsEngineSoundFading = false;
306 }
307 }
308 }
bool m_IsEngineSoundFading
Definition BoatScript.c:50
void UpdateParticles()
Definition BoatScript.c:618
float m_EngineFadeTime
Definition BoatScript.c:52
bool m_UpdateParticles
Definition BoatScript.c:41

Перекрестные ссылки GetGame(), m_EngineFadeTime, m_IsEngineSoundFading, m_UpdateParticles и UpdateParticles().

◆ EOnPostSimulate()

override void EOnPostSimulate ( IEntity other,
float timeSlice )
inlineprotected
249 {
250 if (GetGame().IsServer())
251 {
254
255 if (EngineIsOn())
256 {
257 if (GetFluidFraction(BoatFluid.FUEL) <= 0)
258 {
260 SetSynchDirty();
262
263 EngineStop();
264 }
265 }
266
269 m_MomentumPrevTick = GetMomentum();
270 }
271 else if (EngineIsOn())
272 m_UpdateParticles = true;
273
274 if (!GetGame().IsDedicatedServer() && m_UpdateParticles)
276 }
ECrewMemberState
Definition ECrewMemberState.c:2
bool m_PlaySoundEngineStopNoFuel
Definition BoatScript.c:46
void HandleBoatSplashSound()
Definition BoatScript.c:491
void CheckContactCache()
Definition BoatScript.c:550
override void HandleByCrewMemberState(ECrewMemberState state)
Definition BoatScript.c:385

Перекрестные ссылки CheckContactCache(), GetGame(), GetVelocity(), HandleBoatSplashSound(), HandleByCrewMemberState(), m_MomentumPrevTick, m_PlaySoundEngineStopNoFuel, m_UpdateParticles и m_VelocityPrevTick.

◆ EOnSimulate()

override void EOnSimulate ( IEntity other,
float timeSlice )
inlineprotected
279 {
280 if (!IsProxy())
281 {
282 if (EngineIsOn())
283 {
284 vector mat[4];
286 vector pos = mat[3] + VectorToParent(PropellerGetPosition());
287
288 if (GetGame().GetWaterDepth(pos) < -0.2)
289 EngineStop();
290 }
291 }
292 }
bool IsProxy()
Definition Hand_Events.c:65
proto native void dBodyGetWorldTransform(notnull IEntity body, out vector matrix[4])

Перекрестные ссылки dBodyGetWorldTransform(), GetGame() и IsProxy().

◆ FadeEngineSound()

void FadeEngineSound ( bool fadeIn)
inlineprotected
544 {
548 }
const float SOUND_ENGINE_FADE
Definition BoatScript.c:28
bool m_EngineFadeDirection
Definition BoatScript.c:51

Перекрестные ссылки m_EngineFadeDirection, m_EngineFadeTime, m_IsEngineSoundFading и SOUND_ENGINE_FADE.

Используется в OnEngineStart() и OnEngineStop().

◆ Get3rdPersonCameraType()

override int Get3rdPersonCameraType ( )
inlineprotected
168 {
170 }
Definition DayZPlayerCameras.c:2
static const int DAYZCAMERA_3RD_VEHICLE
generic vehicle 3rd person
Definition DayZPlayerCameras.c:19

Перекрестные ссылки DayZPlayerCameras::DAYZCAMERA_3RD_VEHICLE.

◆ GetActions()

override void GetActions ( typename action_input_type ,
out array< ActionBase_Basic > actions )
inlineprotected
127 {
129 {
132 }
133
135 }
void InitializeActions()
Definition BoatScript.c:114

Перекрестные ссылки InitializeActions(), m_ActionsInitialized и m_InputActionMap.

◆ GetAnimInstance()

override int GetAnimInstance ( )
inlineprotected
163 {
164 return VehicleAnimInstances.ZODIAC;
165 }
VehicleAnimInstances
Definition VehicleAnimInstances.c:2

◆ GetDebugActions()

override void GetDebugActions ( out TSelectableActionInfoArrayEx outputList)
inlineprotected
669 {
670 super.GetDebugActions(outputList);
671
672 outputList.Insert(new TSelectableActionInfoWithColor(SAT_DEBUG_ACTION, EActions.SEPARATOR, "___________________________", FadeColors.RED));
674 }
Param4< int, int, string, int > TSelectableActionInfoWithColor
Definition EntityAI.c:97
EActions
Definition EActions.c:2
const int SAT_DEBUG_ACTION
Definition constants.c:431

Перекрестные ссылки SAT_DEBUG_ACTION.

◆ GetMoveType()

override event GetMoveType ( )
inlineprotected
702 {
703 return BoatScriptMove;
704 }
Definition BoatScript.c:23

◆ GetOwnerStateType()

override event GetOwnerStateType ( )
inlineprotected
697 {
699 }

◆ GetTransportCameraDistance()

override float GetTransportCameraDistance ( )
inlineprotected
153 {
154 return 4.5;
155 }

◆ GetTransportCameraOffset()

override vector GetTransportCameraOffset ( )
inlineprotected
158 {
159 return "0 1.4 0";
160 }

◆ GetVehicleType()

override string GetVehicleType ( )
inlineprotected
143 {
144 return "VehicleTypeBoat";
145 }

◆ HandleBoatSplashSound()

void HandleBoatSplashSound ( )
inlineprotected
492 {
493 float propPosRelative = GetGame().SurfaceGetSeaLevel() - CoordToParent(PropellerGetPosition())[1];
495 m_SplashIncoming = true;
496
498 {
500 m_SoundWaterSplashEffect.SetAttachmentParent(this);
501 m_SoundWaterSplashEffect.SetLocalPosition(PropellerGetPosition());
502 m_SoundWaterSplashEffect.SetAutodestroy(true);
503
504 vector velocity = dBodyGetVelocityAt(this, CoordToParent(PropellerGetPosition()));
505 float speed = velocity.Normalize() * 3.6; // to km/h
506 float lerp = Math.InverseLerp(0, 30, speed);
507 m_SoundWaterSplashEffect.SetSoundVolume(lerp);
508
510
511 m_SplashIncoming = false;
512 }
513 }
class JsonUndergroundAreaTriggerData GetPosition
Definition UndergroundAreaLoader.c:9
const float SPLASH_THRESHOLD
Definition BoatScript.c:30
bool m_SplashIncoming
Definition BoatScript.c:45
const float SPLASH_THRESHOLD_CONDITION
Definition BoatScript.c:29
static EffectSound CreateSound(string sound_set, vector position, float play_fade_in=0, float stop_fade_out=0, bool loop=false, bool enviroment=false)
Create an EffectSound.
Definition EffectManager.c:144
static proto float InverseLerp(float a, float b, float value)
Calculates the linear value that produces the interpolant value within the range [a,...
proto native vector dBodyGetVelocityAt(notnull IEntity body, vector globalpos)

Перекрестные ссылки SEffectManager::CreateSound(), dBodyGetVelocityAt(), GetGame(), GetPosition, Math::InverseLerp(), m_SoundWaterSplash, m_SoundWaterSplashEffect, m_SplashIncoming, SPLASH_THRESHOLD и SPLASH_THRESHOLD_CONDITION.

Используется в EOnPostSimulate().

◆ HandleByCrewMemberState()

override void HandleByCrewMemberState ( ECrewMemberState state)
inlineprotected
386 {
387 switch (state)
388 {
389 case ECrewMemberState.UNCONSCIOUS:
390 foreach (int unconsciousCrewMemberIndex : m_UnconsciousCrewMemberIndices)
391 {
392 if (unconsciousCrewMemberIndex == DayZPlayerConstants.VEHICLESEAT_DRIVER)
393 EngineStop();
394
395 m_UnconsciousCrewMemberIndices.RemoveItem(unconsciousCrewMemberIndex);
396 }
397
398 break;
399
400 case ECrewMemberState.DEAD:
401 foreach (int deadCrewMemberIndex : m_DeadCrewMemberIndices)
402 {
403 if (deadCrewMemberIndex == DayZPlayerConstants.VEHICLESEAT_DRIVER)
404 EngineStop();
405
406 m_DeadCrewMemberIndices.RemoveItem(deadCrewMemberIndex);
407 }
408
409 break;
410 }
411 }
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:602

Используется в EOnPostSimulate().

◆ HandleEngineSound()

void HandleEngineSound ( EBoatEngineSoundState state)
inlineprotected
438 {
439 if (GetGame().IsDedicatedServer())
440 return;
441
443
444 switch (state)
445 {
446 case EBoatEngineSoundState.START_OK:
447 sound = SEffectManager.PlaySound("boat_01_engine_start_SoundSet", ModelToWorld(PropellerGetPosition()));
448 sound.SetAttachmentParent(this);
449 sound.SetAutodestroy(true);
450 break;
451 case EBoatEngineSoundState.STOP_OK:
452 sound = SEffectManager.PlaySound("boat_01_engine_stop_SoundSet", ModelToWorld(PropellerGetPosition()));
453 sound.SetAttachmentParent(this);
454 sound.SetAutodestroy(true);
455 break;
456 case EBoatEngineSoundState.START_NO_FUEL:
457 sound = SEffectManager.PlaySound("boat_01_engine_start_no_fuel_SoundSet", ModelToWorld(PropellerGetPosition()));
458 sound.SetAttachmentParent(this);
459 sound.SetAutodestroy(true);
460 break;
461 case EBoatEngineSoundState.STOP_NO_FUEL:
462 sound = SEffectManager.PlaySound("boat_01_engine_stop_no_fuel_SoundSet", ModelToWorld(PropellerGetPosition()));
463 sound.SetAttachmentParent(this);
464 sound.SetAutodestroy(true);
465 break;
466 }
467 }
Wrapper class for managing sound through SEffectManager.
Definition EffectSound.c:5
static EffectSound PlaySound(string sound_set, vector position, float play_fade_in=0, float stop_fade_out=0, bool loop=false)
Create and play an EffectSound.
Definition EffectManager.c:169

Перекрестные ссылки GetGame() и SEffectManager::PlaySound().

Используется в OnBeforeEngineStart(), OnEngineStart(), OnEngineStop() и OnVariablesSynchronized().

◆ InitializeActions()

void InitializeActions ( )
inlineprotected
115 {
117 if (!m_InputActionMap)
118 {
121 SetActions();
123 }
124 }
map< typename, ref array< ActionBase_Basic > > TInputActionMap
Definition ActionManagerClient.c:1
string Type
Definition JsonDataContaminatedArea.c:11
void SetActions()
Definition BoatScript.c:566
static ref map< typename, ref TInputActionMap > m_BoatTypeActionsMap
Definition BoatScript.c:32

Перекрестные ссылки m_BoatTypeActionsMap, m_InputActionMap, SetActions() и Type.

Используется в GetActions().

◆ IsAreaAtDoorFree()

override bool IsAreaAtDoorFree ( int currentSeat,
float maxAllowedObjHeight,
inout vector extents,
out vector transform[4] )
inlineprotected
193 {
194 return super.IsAreaAtDoorFree(currentSeat, maxAllowedObjHeight, extents, transform);
195 }

◆ IsInventoryVisible()

override bool IsInventoryVisible ( )
inlineprotected
148 {
149 return (GetGame().GetPlayer() && (!GetGame().GetPlayer().GetCommand_Vehicle() || GetGame().GetPlayer().GetCommand_Vehicle().GetTransport() == this));
150 }
PlayerBase GetPlayer()
Definition ModifierBase.c:51

Перекрестные ссылки GetGame() и GetPlayer().

◆ OnAction()

override bool OnAction ( int action_id,
Man player,
ParamsReadContext ctx )
inlineprotected
677 {
678 if (super.OnAction(action_id, player, ctx))
679 return true;
680
681 if (!GetGame().IsServer())
682 {
683 return false;
684 }
685
686 switch (action_id)
687 {
688 case EActions.DELETE:
689 Delete();
690 return true;
691 }
692
693 return false;
694 }

Перекрестные ссылки GetGame().

◆ OnBeforeEngineStart()

override bool OnBeforeEngineStart ( )
inlineprotected
198 {
199 if (GetFluidFraction(BoatFluid.FUEL) <= 0)
200 {
202 return false;
203 }
204
205 return true;
206 }
void HandleEngineSound(EBoatEngineSoundState state)
Definition BoatScript.c:437

Перекрестные ссылки HandleEngineSound().

◆ OnEngineStart()

override void OnEngineStart ( )
inlineprotected
209 {
210 super.OnEngineStart();
211
212 if (GetGame().IsDedicatedServer())
213 return;
214
215 FadeEngineSound(true);
217 ClearWaterEffects(); // in case they are still active
218 }
void FadeEngineSound(bool fadeIn)
Definition BoatScript.c:543
void ClearWaterEffects()
Definition BoatScript.c:632

Перекрестные ссылки ClearWaterEffects(), FadeEngineSound(), GetGame() и HandleEngineSound().

◆ OnEngineStop()

override void OnEngineStop ( )
inlineprotected
221 {
222 super.OnEngineStop();
223
224 if (GetGame().IsDedicatedServer())
225 return;
226
227 FadeEngineSound(false);
229
230 vector mat[4];
232 vector pos = mat[3] + VectorToParent(PropellerGetPosition());
233
234 if (GetGame().GetWaterDepth(pos) < 0) // stop instantly
236 else
237 GetGame().GetCallQueue(CALL_CATEGORY_SYSTEM).CallLater(StopParticleUpdate, 3000);
238 }

Перекрестные ссылки CALL_CATEGORY_SYSTEM, dBodyGetWorldTransform(), FadeEngineSound(), GetGame(), HandleEngineSound() и StopParticleUpdate().

◆ OnSound()

override float OnSound ( BoatSoundCtrl ctrl,
float oldValue )
inlineprotected
371 {
373 {
376 else
378
379 return oldValue;
380 }
381
382 return super.OnSound(ctrl, oldValue);
383 }

Перекрестные ссылки Math::InverseLerp(), m_EngineFadeDirection, m_EngineFadeTime, m_IsEngineSoundFading и SOUND_ENGINE_FADE.

◆ OnVariablesSynchronized()

override void OnVariablesSynchronized ( )
inlineprotected

◆ OnVehicleJumpOutServer()

void OnVehicleJumpOutServer ( GetOutTransportActionData data)
inlineprotected
430 {
431 vector posMS = data.m_Player.WorldToModel(data.m_Player.GetPosition());
433 healthCoef = Math.Clamp(healthCoef, 0.0, 1.0);
434 data.m_Player.ProcessDirectDamage(DamageType.CUSTOM, data.m_Player, "", "FallDamageHealth", posMS, healthCoef);
435 }
DamageType
exposed from C++ (do not change)
Definition DamageSystem.c:11
Definition ActionGetOutTransport.c:24
const int HEALTH_HIGH_SPEED_VALUE
Definition ActionGetOutTransport.c:37
const int HEALTH_LOW_SPEED_VALUE
Definition ActionGetOutTransport.c:36
static proto float Clamp(float value, float min, float max)
Clamps 'value' to 'min' if it is lower than 'min', or to 'max' if it is higher than 'max'.

Перекрестные ссылки Math::Clamp(), ActionGetOutTransport::HEALTH_HIGH_SPEED_VALUE, ActionGetOutTransport::HEALTH_LOW_SPEED_VALUE и Math::InverseLerp().

◆ PlaySound()

void PlaySound ( string soundset,
inout EffectSound sound )
inlineprotected
470 {
471 #ifndef SERVER
472 //Print(this.GetPosition().ToString() + " playing " + soundset + " using "+ sound);
473
474 if (!sound)
475 {
477 sound.SetAttachmentParent(this);
478 sound.SetAutodestroy(true); // SoundWaveObjects tend to null themselves for unknown reasons, breaking the effect in the process
479 }
480 else
481 {
482 if (!sound.IsSoundPlaying())
483 {
484 sound.SetCurrentPosition(GetPosition());
485 sound.SoundPlay();
486 }
487 }
488 #endif
489 }
static EffectSound PlaySoundCachedParams(string sound_set, vector position, float play_fade_in=0, float stop_fade_out=0, bool loop=false)
Create and play an EffectSound, using or creating cached SoundParams.
Definition EffectManager.c:207

Перекрестные ссылки GetPosition и SEffectManager::PlaySoundCachedParams().

◆ RemoveAction()

void RemoveAction ( typename actionName )
inlineprotected
606 {
608 ActionBase action = player.GetActionManager().GetAction(actionName);
609 typename ai = action.GetInputType();
611
612 if (actionArray)
613 {
614 actionArray.RemoveItem(action);
615 }
616 }
Definition PlayerBaseClient.c:2

Перекрестные ссылки GetGame(), GetPlayer() и m_InputActionMap.

◆ SetActions()

void SetActions ( )
inlineprotected
567 {
570 }
Definition ActionGetInTransport.c:2
Definition ActionPushBoat.c:2
void AddAction(typename actionName)
Definition BoatScript.c:572

Перекрестные ссылки AddAction().

Используется в InitializeActions().

◆ StopParticleUpdate()

void StopParticleUpdate ( )
inlineprotected
627 {
628 m_UpdateParticles = false;
630 }

Перекрестные ссылки ClearWaterEffects() и m_UpdateParticles.

Используется в ClearWaterEffects() и OnEngineStop().

◆ SyncSoundImpactHeavy()

void SyncSoundImpactHeavy ( )
inlineprotected
525 {
527 {
529 SetSynchDirty();
530 }
531 }

Перекрестные ссылки m_PlaySoundImpactHeavy.

Используется в CheckContactCache().

◆ SyncSoundImpactLight()

void SyncSoundImpactLight ( )
inlineprotected
516 {
518 {
520 SetSynchDirty();
521 }
522 }

Перекрестные ссылки m_PlaySoundImpactLight.

Используется в CheckContactCache().

◆ SyncSoundPushBoat()

void SyncSoundPushBoat ( bool play)
inlineprotected
534 {
536 {
538 SetSynchDirty();
539 }
540 }

Перекрестные ссылки m_PlaySoundPushBoat.

◆ UpdateParticles()

void UpdateParticles ( )
inlineprotected
619 {
620 for (int i; i < 4; i++)
621 {
622 m_WaterEffects[i].Update();
623 }
624 }

Перекрестные ссылки m_WaterEffects.

Используется в EOnFrame().

Поля

◆ m_ActionsInitialized

bool m_ActionsInitialized
private

Используется в AddAction() и GetActions().

◆ m_BoatTypeActionsMap

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

Используется в InitializeActions().

◆ m_ContactData

ref VehicleContactData m_ContactData
protected

Используется в CheckContactCache() и EOnContact().

◆ m_EngineFadeDirection

bool m_EngineFadeDirection
protected

Используется в FadeEngineSound() и OnSound().

◆ m_EngineFadeTime

float m_EngineFadeTime
protected

Используется в EOnFrame(), FadeEngineSound() и OnSound().

◆ m_InputActionMap

TInputActionMap m_InputActionMap
private

Используется в AddAction(), GetActions(), InitializeActions() и RemoveAction().

◆ m_IsEngineSoundFading

bool m_IsEngineSoundFading
protected

Используется в EOnFrame(), FadeEngineSound() и OnSound().

◆ m_MomentumPrevTick

float m_MomentumPrevTick
protected

Используется в EOnContact() и EOnPostSimulate().

◆ m_PlaySoundEngineStopNoFuel

bool m_PlaySoundEngineStopNoFuel
protected

Используется в EOnPostSimulate() и OnVariablesSynchronized().

◆ m_PlaySoundImpactHeavy

bool m_PlaySoundImpactHeavy
protected

◆ m_PlaySoundImpactLight

bool m_PlaySoundImpactLight
protected

◆ m_PlaySoundPushBoat

bool m_PlaySoundPushBoat
protected

Используется в OnVariablesSynchronized() и SyncSoundPushBoat().

◆ m_SoundImpactHeavy

string m_SoundImpactHeavy
protected

Используется в BoatScript() и OnVariablesSynchronized().

◆ m_SoundImpactHeavyEffect

ref EffectSound m_SoundImpactHeavyEffect
protected

Используется в CleanupEffects() и OnVariablesSynchronized().

◆ m_SoundImpactLight

string m_SoundImpactLight
protected

Используется в BoatScript() и OnVariablesSynchronized().

◆ m_SoundImpactLightEffect

ref EffectSound m_SoundImpactLightEffect
protected

Используется в CleanupEffects() и OnVariablesSynchronized().

◆ m_SoundPushBoat

string m_SoundPushBoat
protected

Используется в BoatScript() и OnVariablesSynchronized().

◆ m_SoundPushBoatEffect

ref EffectSound m_SoundPushBoatEffect
protected

Используется в CleanupEffects() и OnVariablesSynchronized().

◆ m_SoundWaterSplash

string m_SoundWaterSplash
protected

Используется в BoatScript() и HandleBoatSplashSound().

◆ m_SoundWaterSplashEffect

ref EffectSound m_SoundWaterSplashEffect
protected

Используется в CleanupEffects() и HandleBoatSplashSound().

◆ m_SplashIncoming

bool m_SplashIncoming
protected

Используется в HandleBoatSplashSound().

◆ m_UpdateParticles

bool m_UpdateParticles
protected

Используется в EOnFrame(), EOnPostSimulate() и StopParticleUpdate().

◆ m_VelocityPrevTick

vector m_VelocityPrevTick
protected

Используется в EOnContact() и EOnPostSimulate().

◆ m_WaterEffects

ref EffectBoatWaterBase m_WaterEffects[4]
protected

◆ SOUND_ENGINE_FADE

const float SOUND_ENGINE_FADE = 0.2
protected

Используется в FadeEngineSound() и OnSound().

◆ SPLASH_THRESHOLD

const float SPLASH_THRESHOLD = 0.18
protected

Используется в HandleBoatSplashSound().

◆ SPLASH_THRESHOLD_CONDITION

const float SPLASH_THRESHOLD_CONDITION = 0.08
protected

Используется в HandleBoatSplashSound().


Объявления и описания членов класса находятся в файле: