DayZ 1.28
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
BoatScript.c
См. документацию.
8
9enum EBoatOperationalState
10{
11 OK = 0,
12 RUINED = 1,
15}
16
17enum EBoatEngineSoundState
18{
23 STOP_NO_FUEL
24}
25
26class BoatScriptOwnerState : BoatOwnerState
27{
28};
29
31{
32};
33
34#ifdef DIAG_DEVELOPER
35BoatScript _boat;
36#endif
37
41class BoatScript : Boat
42{
43 protected const int DECAY_PLAYER_RANGE = 300; // when a player is found within this range, decay is deactivated
44 protected const int DECAY_FLAG_RANGE = 100; // when a boat is parked around a territoryflag, decay is deactivated
45 protected const float DECAY_TICK_FREQUENCY = 10; // seconds
46 protected const float DECAY_DAMAGE = 0.017;
47 protected const float DECAY_FLIPPED_MULT = 4;
48
49 protected const float SOUND_ENGINE_FADE = 0.2;
50 protected const float SPLASH_THRESHOLD_CONDITION = 0.08; // diff between sea surface and propeller pos which determines if the splash should happen
51 protected const float SPLASH_THRESHOLD = 0.18; // diff between sea surface and propeller pos which determines when the splash happens
52
55 private bool m_ActionsInitialized;
56
58 protected float m_MomentumPrevTick;
60 protected ref Timer m_DecayTimer;
61
62 // particles
63 protected bool m_UpdateParticles;
65
66 // sounds
67 protected bool m_SplashIncoming; // boat is high enough for the splash to trigger when it falls back down to sea level
69 protected bool m_PlaySoundImpactLight;
70 protected bool m_PlaySoundImpactHeavy;
71 protected bool m_PlaySoundPushBoat;
72 protected bool m_IsEngineSoundFading;
73 protected bool m_EngineFadeDirection; // true>in | false>out
74 protected float m_EngineFadeTime;
75 protected string m_SoundImpactLight;
76 protected string m_SoundImpactHeavy;
77 protected string m_SoundPushBoat;
78 protected string m_SoundWaterSplash;
79 protected string m_SoundEngineStart;
80 protected string m_SoundEngineStop;
81 protected string m_SoundEngineStartNoFuel;
82 protected string m_SoundEngineStopNoFuel;
83
84 // caches to avoid multiple triggers
88 protected ref EffectSound m_SoundEngineEffectDeletion; // hold engine sound which is being stopped & deleted while another is starting
89
91 {
92#ifdef DIAG_DEVELOPER
93 _boat = this;
94#endif
95
96 SetEventMask(EntityEvent.POSTSIMULATE);
97 SetEventMask(EntityEvent.FRAME);
98
101
102 RegisterNetSyncVariableBool("m_PlaySoundEngineStopNoFuel");
103 RegisterNetSyncVariableBool("m_PlaySoundPushBoat");
104 RegisterNetSyncVariableBoolSignal("m_PlaySoundImpactLight");
105 RegisterNetSyncVariableBoolSignal("m_PlaySoundImpactHeavy");
106
107 m_SoundImpactHeavy = "boat_01_hit_light_SoundSet";
108 m_SoundImpactLight = "boat_01_hit_heavy_SoundSet";
109 m_SoundPushBoat = "boat_01_push_SoundSet";
110 m_SoundWaterSplash = "boat_01_splash_SoundSet";
111 m_SoundEngineStart = "boat_01_engine_start_SoundSet";
112 m_SoundEngineStop = "boat_01_engine_stop_SoundSet";
113 m_SoundEngineStartNoFuel = "boat_01_engine_start_no_fuel_SoundSet";
114 m_SoundEngineStopNoFuel = "boat_01_engine_stop_no_fuel_SoundSet";
115
116 if (GetGame().IsServer())
117 {
119 m_DecayTimer.Run(DECAY_TICK_FREQUENCY, this, "DecayHealthTick", NULL, true);
120 }
121
122 if (GetGame().IsDedicatedServer())
123 return;
124
129
130 if (MemoryPointExists("ptcFxFront"))
131 m_WaterEffects[EBoatEffects.PTC_FRONT].AttachTo(this, GetMemoryPointPos("ptcFxFront"));
132
133 if (MemoryPointExists("ptcFxBack"))
134 m_WaterEffects[EBoatEffects.PTC_BACK].AttachTo(this, GetMemoryPointPos("ptcFxBack"));
135
136 if (MemoryPointExists("ptcFxSide1"))
137 m_WaterEffects[EBoatEffects.PTC_SIDE_L].AttachTo(this, GetMemoryPointPos("ptcFxSide1"));
138
139 if (MemoryPointExists("ptcFxSide2"))
140 m_WaterEffects[EBoatEffects.PTC_SIDE_R].AttachTo(this, GetMemoryPointPos("ptcFxSide2"));
141 }
142
144 {
145 if (m_DecayTimer)
146 m_DecayTimer.Stop();
147
148 #ifndef SERVER
150 #endif
151 }
152
153 override void EEDelete(EntityAI parent)
154 {
155 if (!GetGame().IsDedicatedServer())
157 }
158
160 {
162 if (!m_InputActionMap)
163 {
165 m_InputActionMap = iam;
166 SetActions();
167 m_BoatTypeActionsMap.Insert(this.Type(), m_InputActionMap);
168 }
169 }
170
171 override void GetActions(typename action_input_type, out array<ActionBase_Basic> actions)
172 {
174 {
177 }
178
179 actions = m_InputActionMap.Get(action_input_type);
180 }
181
182 override bool DisableVicinityIcon()
183 {
184 return true;
185 }
186
187 override string GetVehicleType()
188 {
189 return "VehicleTypeBoat";
190 }
191
192 override bool IsInventoryVisible()
193 {
194 return (GetGame().GetPlayer() && (!GetGame().GetPlayer().GetCommand_Vehicle() || GetGame().GetPlayer().GetCommand_Vehicle().GetTransport() == this));
195 }
196
198 {
199 return 4.5;
200 }
201
203 {
204 return "0 1.4 0";
205 }
206
207 override int GetAnimInstance()
208 {
209 return VehicleAnimInstances.ZODIAC;
210 }
211
216
217 override bool CrewCanGetThrough(int posIdx)
218 {
219 return true;
220 }
221
222 override bool CanReachSeatFromSeat(int currentSeat, int nextSeat)
223 {
224 return true;
225 }
226
227 override bool CanReachSeatFromDoors(string pSeatSelection, vector pFromPos, float pDistance = 1.0)
228 {
229 return true;
230 }
231
232 override bool CanReachDoorsFromSeat(string pDoorsSelection, int pCurrentSeat)
233 {
234 return true;
235 }
236
237 override bool IsAreaAtDoorFree(int currentSeat, float maxAllowedObjHeight, inout vector extents, out vector transform[4])
238 {
239 return super.IsAreaAtDoorFree(currentSeat, maxAllowedObjHeight, extents, transform);
240 }
241
247 override bool OnBeforeEngineStart()
248 {
249 EBoatOperationalState state = CheckOperationalRequirements();
250 return state == EBoatOperationalState.OK;
251 }
252
253 // Whether the car engine can be started
255 {
256 int state = EBoatOperationalState.OK;
257
258 EntityAI item = null;
259
260 if (GetHealthLevel("") >= GameConstants.STATE_RUINED || GetHealthLevel("Engine") >= GameConstants.STATE_RUINED)
261 {
262 state |= EBoatOperationalState.RUINED;
263 }
264
265 if (GetFluidFraction(BoatFluid.FUEL) <= 0)
266 {
267 state |= EBoatOperationalState.NO_FUEL;
268 }
269
270 if (IsVitalSparkPlug())
271 {
272 item = FindAttachmentBySlotName("SparkPlug");
273 if (!item || (item && item.IsRuined()))
274 state |= EBoatOperationalState.NO_IGNITER;
275 }
276
277 return state;
278 }
279
281 {
282 EBoatOperationalState state = CheckOperationalRequirements();
283
284 if (state == EBoatOperationalState.RUINED)
285 {
286 return;
287 }
288
289 if (state & EBoatOperationalState.NO_IGNITER)
290 {
291 HandleEngineSound(EBoatEngineSoundState.START_NO_FUEL);
292 return;
293 }
294
295 if (state & EBoatOperationalState.NO_FUEL)
296 {
297 HandleEngineSound(EBoatEngineSoundState.START_NO_FUEL);
298 return;
299 }
300 }
301
302 override void OnEngineStart()
303 {
304 super.OnEngineStart();
305
306 if (GetGame().IsDedicatedServer())
307 return;
308
309 FadeEngineSound(true);
310 HandleEngineSound(EBoatEngineSoundState.START_OK);
311 ClearWaterEffects(); // in case they are still active
312 }
313
314 override void OnEngineStop()
315 {
316 super.OnEngineStop();
317
318 if (GetGame().IsDedicatedServer())
319 return;
320
321 FadeEngineSound(false);
322 HandleEngineSound(EBoatEngineSoundState.STOP_OK);
323
324 vector mat[4];
325 dBodyGetWorldTransform(this, mat);
326 vector pos = mat[3] + VectorToParent(PropellerGetPosition());
327
328 if (GetGame().GetWaterDepth(pos) < 0) // stop instantly
330 else
332 }
333
334 override void EEOnCECreate()
335 {
336 float maxVolume = GetFluidCapacity(BoatFluid.FUEL);
337 float amount = Math.RandomFloat(0.0, maxVolume * 0.35);
338
339 Fill(BoatFluid.FUEL, amount);
340 }
341
342 override void OnInput(float dt)
343 {
344 super.OnInput(dt);
345 }
346
347 override void EOnPostSimulate(IEntity other, float timeSlice)
348 {
349 if (!IsProxy())
350 {
351 if (EngineIsOn())
352 {
353 if (GetFluidFraction(BoatFluid.FUEL) <= 0)
354 {
355 if (GetGame().IsServer())
356 {
358 SetSynchDirty();
360 }
361
362 EngineStop();
363 }
364 }
365 }
366
367 if (GetGame().IsServer())
368 {
371 m_MomentumPrevTick = GetMomentum();
372 }
373
374 if (!GetGame().IsDedicatedServer())
375 {
376 if (EngineIsOn())
377 m_UpdateParticles = true;
378
381
382 }
383 }
384
385 override void EOnSimulate(IEntity other, float dt)
386 {
387 if (!IsProxy())
388 {
389 if (EngineIsOn())
390 {
391 vector mat[4];
392 dBodyGetWorldTransform(this, mat);
393 vector pos = mat[3] + VectorToParent(PropellerGetPosition());
394
395 if (GetGame().GetWaterDepth(pos) < -0.2)
396 EngineStop();
397 }
398 }
399 }
400
401 override void EOnFrame(IEntity other, float timeSlice)
402 {
403 if (!GetGame().IsDedicatedServer())
404 {
406 UpdateParticles(timeSlice);
407
409 {
410 m_EngineFadeTime -= timeSlice;
411 if (m_EngineFadeTime < 0)
412 m_IsEngineSoundFading = false;
413 }
414 }
415 }
416
418 override void OnContact(string zoneName, vector localPos, IEntity other, Contact data)
419 {
420 if (GetGame().IsServer())
421 {
422 if (m_ContactData)
423 return;
424
425 float momentumDelta = GetMomentum() - m_MomentumPrevTick;
426 float dot = vector.Dot(m_VelocityPrevTick.Normalized(), GetVelocity(this).Normalized());
427 if (dot < 0)
428 momentumDelta = m_MomentumPrevTick;
429
431 m_ContactData.SetData(localPos, other, momentumDelta); // change to local pos
432 }
433
434 if (!IsProxy())
435 {
436 if (EngineIsOn() && !CheckOperationalState())
437 EngineStop();
438 }
439 }
440
441 override void EEHitBy(TotalDamageResult damageResult, int damageType, EntityAI source, int component, string dmgZone, string ammo, vector modelPos, float speedCoef)
442 {
443 super.EEHitBy(damageResult, damageType, source, component, dmgZone, ammo, modelPos, speedCoef);
444
445 if (!IsProxy())
446 {
447 if (EngineIsOn() && !CheckOperationalState())
448 EngineStop();
449 }
450 }
451
453 {
454 super.OnVariablesSynchronized();
455
457 {
458 EffectSound impactHeavy;
461 }
462
464 {
465 EffectSound impactLight;
468 }
469
472 else if (m_SoundPushBoatEffect && m_SoundPushBoatEffect.IsPlaying())
474
476 {
477 HandleEngineSound(EBoatEngineSoundState.STOP_NO_FUEL);
479 }
480 }
481
482 protected override bool DetectFlipped(VehicleFlippedContext ctx)
483 {
484 if (!DetectFlippedUsingSurface(ctx, GameConstants.VEHICLE_FLIP_ANGLE_TOLERANCE))
485 return false;
486 return true;
487 }
488
489 override float OnSound(BoatSoundCtrl ctrl, float oldValue)
490 {
492 {
495 else
497
498 return oldValue;
499 }
500
501 return super.OnSound(ctrl, oldValue);
502 }
503
504 override void MarkCrewMemberUnconscious(int crewMemberIndex)
505 {
506 if (!IsAuthority())
507 return;
508
509 if (crewMemberIndex == DayZPlayerConstants.VEHICLESEAT_DRIVER)
510 {
511 EngineStop();
512 }
513 }
514
515 override void MarkCrewMemberDead(int crewMemberIndex)
516 {
517 if (!IsAuthority())
518 return;
519
520 if (crewMemberIndex == DayZPlayerConstants.VEHICLESEAT_DRIVER)
521 {
522 EngineStop();
523 }
524 }
525
526 protected void DecayHealthTick()
527 {
529 return;
530
532
533 if (IsFlipped())
534 damage *= DECAY_FLIPPED_MULT;
535
536 if (IsInFlagRange())
537 damage *= 0.3;
538
539 AddHealth("Engine","Health", -damage);
540 }
541
542 protected bool IsInFlagRange()
543 {
545 if (!locations)
546 return false;
547
548 int count = locations.Count();
549 if (count > 0)
550 {
551 vector pos = GetWorldPosition();
552 for (int i = 0; i < count; i++)
553 {
554 if (vector.Distance(pos, locations.Get(i)) < DECAY_FLAG_RANGE)
555 return true;
556 }
557
558 return false;
559 }
560 else
561 return false;
562 }
563
565 {
566 if (GetHealthLevel("") >= GameConstants.STATE_RUINED || GetHealthLevel("Engine") >= GameConstants.STATE_RUINED)
567 return false;
568
569 if (IsVitalSparkPlug())
570 {
571 EntityAI item = FindAttachmentBySlotName("SparkPlug");
572 if (!item || (item && item.IsRuined()))
573 return false;
574 }
575
576 return true;
577 }
578
579 override void OnDriverExit(Human player)
580 {
581 super.OnDriverExit(player);
582
583 if (GetGear() != GetNeutralGear())
584 {
585 EngineStop();
586 }
587 }
588
589 // Server side event for jump out processing
591 {
592 vector posMS = data.m_Player.WorldToModel(data.m_Player.GetPosition());
594 healthCoef = Math.Clamp(healthCoef, 0.0, 1.0);
595 data.m_Player.ProcessDirectDamage(DamageType.CUSTOM, data.m_Player, "", "FallDamageHealth", posMS, healthCoef);
596 }
597
598 protected void HandleEngineSound(EBoatEngineSoundState state)
599 {
600 if (GetGame().IsDedicatedServer())
601 return;
602
603 string soundset;
604
605 switch (state)
606 {
607 case EBoatEngineSoundState.START_OK:
608 soundset = m_SoundEngineStart;
609 break;
610 case EBoatEngineSoundState.STOP_OK:
611 soundset = m_SoundEngineStop;
612 break;
613 case EBoatEngineSoundState.START_NO_FUEL:
614 soundset = m_SoundEngineStartNoFuel;
615 break;
616 case EBoatEngineSoundState.STOP_NO_FUEL:
617 soundset = m_SoundEngineStopNoFuel;
618 break;
619 }
620
621 // already playing same type of sound
623 {
624 if (m_SoundEngineEffect.GetSoundSet() == soundset) // already playing same type of sound
625 return;
626 else
627 {
629 m_SoundEngineEffectDeletion.SoundStop(); // stop the existing sound
630
631 m_SoundEngineEffect = null;
632 }
633
634 }
635
636 PlaySound(soundset, m_SoundEngineEffect, ModelToWorld(PropellerGetPosition()));
637 }
638
639 protected void PlaySound(string soundset, inout EffectSound sound, vector position = vector.Zero)
640 {
641 #ifndef SERVER
642 if (position == vector.Zero)
643 position = GetPosition();
644
645 if (!sound)
646 {
647 sound = SEffectManager.PlaySoundCachedParams(soundset, position);
648 sound.SetAttachmentParent(this);
649 sound.SetAutodestroy(true); // SoundWaveObjects tend to null themselves for unknown reasons, breaking the effect in the process
650 }
651 else
652 {
653 if (!sound.IsSoundPlaying())
654 {
655 sound.SetCurrentPosition(position);
656 sound.SoundPlay();
657 }
658 }
659 #endif
660 }
661
662 protected void HandleBoatSplashSound()
663 {
664 float propPosRelative = GetGame().SurfaceGetSeaLevel() - CoordToParent(PropellerGetPosition())[1];
665 if (propPosRelative < SPLASH_THRESHOLD_CONDITION)
666 m_SplashIncoming = true;
667
668 if (m_SplashIncoming && propPosRelative > SPLASH_THRESHOLD)
669 {
671 m_SoundWaterSplashEffect.SetAttachmentParent(this);
672 m_SoundWaterSplashEffect.SetLocalPosition(PropellerGetPosition());
673 m_SoundWaterSplashEffect.SetAutodestroy(true);
674
675 vector velocity = dBodyGetVelocityAt(this, CoordToParent(PropellerGetPosition()));
676 float speed = velocity.Normalize() * 3.6; // to km/h
677 float lerp = Math.InverseLerp(0, 30, speed);
678 m_SoundWaterSplashEffect.SetSoundVolume(lerp);
679
681
682 m_SplashIncoming = false;
683 }
684 }
685
686 protected void SyncSoundImpactLight()
687 {
689 {
691 SetSynchDirty();
692 }
693 }
694
695 protected void SyncSoundImpactHeavy()
696 {
698 {
700 SetSynchDirty();
701 }
702 }
703
704 void SyncSoundPushBoat(bool play)
705 {
706 if (m_PlaySoundPushBoat != play)
707 {
708 m_PlaySoundPushBoat = play;
709 SetSynchDirty();
710 }
711 }
712
713 // Set engine sound to fade on start/stop
714 protected void FadeEngineSound(bool fadeIn)
715 {
717 m_EngineFadeDirection = fadeIn;
719 }
720
721 protected void FlipVehicle()
722 {
723 vector orient = GetOrientation();
724 orient[2] = orient[2] + 180;
725 SetOrientation(orient);
726
727 vector pos = GetPosition();
728 pos[1] = pos[1] + 0.5;
729 SetPosition(pos);
730 }
731
732 protected void CheckContactCache()
733 {
734 if (!m_ContactData)
735 return;
736
737 float impulse = Math.AbsInt(m_ContactData.m_Impulse);
738 m_ContactData = null;
739
741 return;
742 else if (impulse < GameConstants.CARS_CONTACT_DMG_THRESHOLD)
744 else
746 }
747
748 protected void SetActions()
749 {
752 }
753
754 void AddAction(typename actionName)
755 {
756 ActionBase action = ActionManagerBase.GetAction(actionName);
757
758 if (!action)
759 {
760 Debug.LogError("Action " + actionName + " dosn't exist!");
761 return;
762 }
763
764 typename ai = action.GetInputType();
765 if (!ai)
766 {
767 m_ActionsInitialized = false;
768 return;
769 }
770
771 array<ActionBase_Basic> actionArray = m_InputActionMap.Get(ai);
772
773 if (!actionArray)
774 {
775 actionArray = new array<ActionBase_Basic>;
776 m_InputActionMap.Insert(ai, actionArray);
777 }
778
780 {
781 Debug.ActionLog(action.ToString() + " -> " + ai, this.ToString() , "n/a", "Add action" );
782 }
783
784 actionArray.Insert(action);
785 }
786
787 void RemoveAction(typename actionName)
788 {
789 PlayerBase player = PlayerBase.Cast(GetGame().GetPlayer());
790 ActionBase action = player.GetActionManager().GetAction(actionName);
791 typename ai = action.GetInputType();
792 array<ActionBase_Basic> actionArray = m_InputActionMap.Get(ai);
793
794 if (actionArray)
795 {
796 actionArray.RemoveItem(action);
797 }
798 }
799
800 protected void UpdateParticles(float timeSlice = 0)
801 {
802 for (int i; i < 4; i++)
803 {
804 m_WaterEffects[i].Update(timeSlice);
805 }
806 }
807
808 protected void StopParticleUpdate()
809 {
810 m_UpdateParticles = false;
812 }
813
814 protected void ClearWaterEffects()
815 {
817
818 for (int i; i < 4; i++)
819 {
820 if (m_WaterEffects[i].IsPlaying())
821 {
823 {
824 m_WaterEffects[i].GetParticle().SetParticleParam(EmitorParam.BIRTH_RATE, 0);
825 m_WaterEffects[i].GetParticle().SetParticleParam(EmitorParam.BIRTH_RATE_RND, 0);
826 }
827 m_WaterEffects[i].Stop();
828 }
829 }
830 }
831
832 // Called on destroy/stream out
833 protected void CleanupEffects()
834 {
835 for (int i; i < 4; i++)
836 {
838 {
839 m_WaterEffects[i].Stop();
841 }
842 }
843
846 }
847
848 override void GetDebugActions(out TSelectableActionInfoArrayEx outputList)
849 {
850 outputList.Insert(new TSelectableActionInfoWithColor(SAT_DEBUG_ACTION, EActions.FLIP_ENTITY, "Flip vehicle", FadeColors.LIGHT_GREY));
851
852 super.GetDebugActions(outputList);
853 }
854
855 override bool OnAction(int action_id, Man player, ParamsReadContext ctx)
856 {
857 if (super.OnAction(action_id, player, ctx))
858 return true;
859
860 if (!GetGame().IsServer())
861 {
862 return false;
863 }
864
865 switch (action_id)
866 {
867 case EActions.FLIP_ENTITY:
868 FlipVehicle();
869 return true;
870 }
871
872 return false;
873 }
874
875 protected override event typename GetOwnerStateType()
876 {
877 return BoatScriptOwnerState;
878 }
879
880 protected override event typename GetMoveType()
881 {
882 return BoatScriptMove;
883 }
884
885 #ifdef DIAG_DEVELOPER
886 override void FixEntity()
887 {
888 super.FixEntity();
889
890 if (GetGame().IsServer())
891 Fill(BoatFluid.FUEL, GetFluidCapacity(BoatFluid.FUEL));
892
893
894 }
895 #endif
896}
Param4< int, int, string, int > TSelectableActionInfoWithColor
Определения 3_Game/Entities/EntityAI.c:97
void ActionManagerBase(PlayerBase player)
Определения ActionManagerBase.c:63
map< typename, ref array< ActionBase_Basic > > TInputActionMap
Определения ActionManagerClient.c:1
vector GetOrientation()
Определения AreaDamageManager.c:306
@ OK
0 - No error. Can be returned from any call.
Определения BIOSErrorModule.c:9
BoatSoundCtrl
Boat's sound controller list. (native, do not change or extend)
Определения Boat.c:3
BoatFluid
Type of vehicle's fluid. (native, do not change or extend)
Определения Boat.c:14
enum EBoatEffects STOP_OK
enum EBoatEffects NO_FUEL
enum EBoatEffects NO_IGNITER
enum EBoatEffects START_NO_FUEL
enum EBoatEffects START_OK
EBoatEffects
Определения BoatScript.c:2
@ PTC_SIDE_L
Определения BoatScript.c:5
@ PTC_BACK
Определения BoatScript.c:4
@ PTC_FRONT
Определения BoatScript.c:3
@ PTC_SIDE_R
Определения BoatScript.c:6
void EffectBoatWaterFront()
Определения BoatWaterEffects.c:14
void EffectBoatWaterSide()
Определения BoatWaterEffects.c:203
proto native bool AvoidPlayer(vector vPos, float fDistance)
Check if there is a player within a radius.
proto native CEApi GetCEApi()
Get the CE API.
map
Определения ControlsXboxNew.c:4
DamageType
exposed from C++ (do not change)
Определения DamageSystem.c:11
EActions
Определения EActions.c:2
bool IsRegistered()
Get whether this Effect is registered in SEffectManager.
Определения Effect.c:570
bool IsPlaying()
Returns true when the Effect is playing, false otherwise.
Определения Effect.c:197
bool IsProxy()
Определения Hand_Events.c:65
void PlaySound()
Определения HungerSoundHandler.c:38
@ RUINED
Определения InjuryHandler.c:24
class BoxCollidingParams component
ComponentInfo for BoxCollidingResult.
string Type
Определения JsonDataContaminatedArea.c:11
PlayerBase GetPlayer()
Определения ModifierBase.c:51
proto native ParticleSource GetParticle(int index)
Manually get the particle at index.
VehicleAnimInstances
Определения VehicleAnimInstances.c:2
GetInputType()
Определения ActionBase.c:215
Определения ActionBase.c:53
const int HEALTH_HIGH_SPEED_VALUE
Определения ActionGetOutTransport.c:37
const int HEALTH_LOW_SPEED_VALUE
Определения ActionGetOutTransport.c:36
Определения ActionPushBoat.c:18
Определения Boat.c:23
Определения Boat.c:19
void HandleBoatSplashSound()
Определения BoatScript.c:662
override void GetDebugActions(out TSelectableActionInfoArrayEx outputList)
Определения BoatScript.c:848
ref EffectBoatWaterBase m_WaterEffects[4]
Определения BoatScript.c:64
void AddAction(typename actionName)
Определения BoatScript.c:754
bool m_PlaySoundPushBoat
Определения BoatScript.c:71
void PlaySound(string soundset, inout EffectSound sound, vector position=vector.Zero)
Определения BoatScript.c:639
bool m_UpdateParticles
Определения BoatScript.c:63
const int DECAY_PLAYER_RANGE
Определения BoatScript.c:43
override void OnEngineStop()
Определения BoatScript.c:314
string m_SoundEngineStopNoFuel
Определения BoatScript.c:82
override void EEDelete(EntityAI parent)
Определения BoatScript.c:153
void HandleEngineSound(EBoatEngineSoundState state)
Определения BoatScript.c:598
void DecayHealthTick()
Определения BoatScript.c:526
bool m_PlaySoundEngineStopNoFuel
Определения BoatScript.c:68
override void EOnFrame(IEntity other, float timeSlice)
Определения BoatScript.c:401
void FadeEngineSound(bool fadeIn)
Определения BoatScript.c:714
ref EffectSound m_SoundPushBoatEffect
Определения BoatScript.c:85
int CheckOperationalRequirements()
Определения BoatScript.c:254
override void EOnPostSimulate(IEntity other, float timeSlice)
Определения BoatScript.c:347
override bool IsInventoryVisible()
Определения BoatScript.c:192
override void GetActions(typename action_input_type, out array< ActionBase_Basic > actions)
Определения BoatScript.c:171
string m_SoundPushBoat
Определения BoatScript.c:77
ref Timer m_DecayTimer
Определения BoatScript.c:60
void FlipVehicle()
Определения BoatScript.c:721
override event GetOwnerStateType()
Определения BoatScript.c:875
bool IsInFlagRange()
Определения BoatScript.c:542
string m_SoundImpactHeavy
Определения BoatScript.c:76
void ~BoatScript()
Определения BoatScript.c:143
string m_SoundWaterSplash
Определения BoatScript.c:78
override bool DetectFlipped(VehicleFlippedContext ctx)
Определения BoatScript.c:482
string m_SoundImpactLight
Определения BoatScript.c:75
override event GetMoveType()
Определения BoatScript.c:880
override int Get3rdPersonCameraType()
Определения BoatScript.c:212
void OnIgnition()
Определения BoatScript.c:280
override void OnDriverExit(Human player)
Определения BoatScript.c:579
void CheckContactCache()
Определения BoatScript.c:732
override void MarkCrewMemberUnconscious(int crewMemberIndex)
Определения BoatScript.c:504
override int GetAnimInstance()
Определения BoatScript.c:207
override void OnInput(float dt)
Определения BoatScript.c:342
void SyncSoundImpactHeavy()
Определения BoatScript.c:695
override void MarkCrewMemberDead(int crewMemberIndex)
Определения BoatScript.c:515
void SyncSoundPushBoat(bool play)
Определения BoatScript.c:704
override void EOnSimulate(IEntity other, float dt)
Определения BoatScript.c:385
const float DECAY_FLIPPED_MULT
Определения BoatScript.c:47
float m_MomentumPrevTick
Определения BoatScript.c:58
override void EEHitBy(TotalDamageResult damageResult, int damageType, EntityAI source, int component, string dmgZone, string ammo, vector modelPos, float speedCoef)
Определения BoatScript.c:441
bool m_EngineFadeDirection
Определения BoatScript.c:73
ref EffectSound m_SoundEngineEffect
Определения BoatScript.c:87
string m_SoundEngineStart
Определения BoatScript.c:79
void CleanupEffects()
Определения BoatScript.c:833
TInputActionMap m_InputActionMap
Определения BoatScript.c:54
bool m_IsEngineSoundFading
Определения BoatScript.c:72
override bool CrewCanGetThrough(int posIdx)
Определения BoatScript.c:217
bool m_PlaySoundImpactLight
Определения BoatScript.c:69
void ClearWaterEffects()
Определения BoatScript.c:814
vector m_VelocityPrevTick
Определения BoatScript.c:57
override bool DisableVicinityIcon()
Определения BoatScript.c:182
const float DECAY_TICK_FREQUENCY
Определения BoatScript.c:45
void OnVehicleJumpOutServer(GetOutTransportActionData data)
Определения BoatScript.c:590
float m_EngineFadeTime
Определения BoatScript.c:74
void SetActions()
Определения BoatScript.c:748
void SyncSoundImpactLight()
Определения BoatScript.c:686
override bool OnAction(int action_id, Man player, ParamsReadContext ctx)
Определения BoatScript.c:855
ref VehicleContactData m_ContactData
Определения BoatScript.c:59
ref EffectSound m_SoundWaterSplashEffect
Определения BoatScript.c:86
override float GetTransportCameraDistance()
Определения BoatScript.c:197
override bool CanReachDoorsFromSeat(string pDoorsSelection, int pCurrentSeat)
Определения BoatScript.c:232
bool m_PlaySoundImpactHeavy
Определения BoatScript.c:70
override bool CanReachSeatFromDoors(string pSeatSelection, vector pFromPos, float pDistance=1.0)
Определения BoatScript.c:227
const int DECAY_FLAG_RANGE
Определения BoatScript.c:44
bool m_SplashIncoming
Определения BoatScript.c:67
override bool CanReachSeatFromSeat(int currentSeat, int nextSeat)
Определения BoatScript.c:222
void BoatScript()
Определения BoatScript.c:90
void StopParticleUpdate()
Определения BoatScript.c:808
override bool IsAreaAtDoorFree(int currentSeat, float maxAllowedObjHeight, inout vector extents, out vector transform[4])
Определения BoatScript.c:237
override string GetVehicleType()
Определения BoatScript.c:187
const float SPLASH_THRESHOLD_CONDITION
Определения BoatScript.c:50
void RemoveAction(typename actionName)
Определения BoatScript.c:787
const float SOUND_ENGINE_FADE
Определения BoatScript.c:49
string m_SoundEngineStop
Определения BoatScript.c:80
override void OnContact(string zoneName, vector localPos, IEntity other, Contact data)
WARNING: Can be called very frequently in one frame, use with caution.
Определения BoatScript.c:418
override bool OnBeforeEngineStart()
Определения BoatScript.c:247
override void OnVariablesSynchronized()
Определения BoatScript.c:452
bool m_ActionsInitialized
Определения BoatScript.c:55
void UpdateParticles(float timeSlice=0)
Определения BoatScript.c:800
ref EffectSound m_SoundEngineEffectDeletion
Определения BoatScript.c:88
override vector GetTransportCameraOffset()
Определения BoatScript.c:202
static ref map< typename, ref TInputActionMap > m_BoatTypeActionsMap
Определения BoatScript.c:53
void InitializeActions()
Определения BoatScript.c:159
const float DECAY_DAMAGE
Определения BoatScript.c:46
override void OnEngineStart()
Определения BoatScript.c:302
string m_SoundEngineStartNoFuel
Определения BoatScript.c:81
const float SPLASH_THRESHOLD
Определения BoatScript.c:51
override void EEOnCECreate()
Определения BoatScript.c:334
bool CheckOperationalState()
Определения BoatScript.c:564
override float OnSound(BoatSoundCtrl ctrl, float oldValue)
Определения BoatScript.c:489
Определения BoatScript.c:42
Определения BoatScript.c:31
proto native float SurfaceGetSeaLevel()
override ScriptCallQueue GetCallQueue(int call_category)
Определения DayZGame.c:1187
proto native Mission GetMission()
static float GetBoatDecayMultiplier()
Определения CfgGameplayHandler.c:463
Определения EnPhysics.c:326
static const int DAYZCAMERA_3RD_VEHICLE
generic vehicle 3rd person
Определения DayZPlayerCameras.c:19
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.
Определения 3_Game/tools/Debug.c:245
static void ActionLog(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Определения 3_Game/tools/Debug.c:127
Определения 3_Game/tools/Debug.c:2
override void SetAutodestroy(bool auto_destroy)
Sets whether Effect automatically cleans up when it stops.
Определения EffectSound.c:603
Wrapper class for managing sound through SEffectManager.
Определения EffectSound.c:5
Определения EnEntity.c:165
static bool IsActionLogEnable()
Определения 3_Game/tools/Debug.c:638
Определения 3_Game/tools/Debug.c:594
Определения EnMath.c:7
array< vector > GetActiveRefresherLocations()
Определения PlayerBaseClient.c:2
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.
Определения EffectManager.c:207
static void EffectUnregisterEx(Effect effect)
Unregisters Effect in SEffectManager.
Определения EffectManager.c:391
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.
Определения EffectManager.c:144
static void DestroyEffect(Effect effect)
Unregisters, stops and frees the Effect.
Определения EffectManager.c:271
Manager class for managing Effect (EffectParticle, EffectSound)
Определения EffectManager.c:6
proto void Remove(func fn)
remove specific call from queue
proto void CallLater(func fn, int delay=0, bool repeat=false, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
adds call into the queue with given parameters and arguments (arguments are held in memory until the ...
Определения DayZPlayerImplement.c:63
Определения DamageSystem.c:2
Определения Transport.c:653
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
static float Dot(vector v1, vector v2)
Returns Dot product of vector v1 and vector v2.
Определения EnConvert.c:271
static const vector Zero
Определения EnConvert.c:110
proto float Normalize()
Normalizes vector. Returns length.
static proto native float Distance(vector v1, vector v2)
Returns the distance between tips of two 3D vectors.
Определения EnConvert.c:106
DayZPlayerConstants
defined in C++
Определения dayzplayer.c:602
Serializer ParamsReadContext
Определения gameplay.c:15
proto native CGame GetGame()
const float CARS_CONTACT_DMG_THRESHOLD
Определения 3_Game/constants.c:838
const float CARS_CONTACT_DMG_MIN
Определения 3_Game/constants.c:839
proto native void SetPosition(vector position)
Set the world position of the Effect.
Определения Effect.c:463
EntityEvent
Entity events for event-mask, or throwing event from code.
Определения EnEntity.c:45
const int STATE_RUINED
Определения 3_Game/constants.c:848
static proto int AbsInt(int i)
Returns absolute value.
static proto float RandomFloat(float min, float max)
Returns a random float number between and min[inclusive] and max[exclusive].
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'.
static proto float InverseLerp(float a, float b, float value)
Calculates the linear value that produces the interpolant value within the range [a,...
EmitorParam
Определения EnVisual.c:114
@ NONE
No flags.
Определения EnProfiler.c:11
proto native vector dBodyGetVelocityAt(notnull IEntity body, vector globalpos)
proto native vector GetVelocity(notnull IEntity ent)
Returns linear velocity.
proto native void dBodyGetWorldTransform(notnull IEntity body, out vector matrix[4])
const int SAT_DEBUG_ACTION
Определения 3_Game/constants.c:454
class JsonUndergroundAreaTriggerData GetPosition
Определения UndergroundAreaLoader.c:9
const int CALL_CATEGORY_SYSTEM
Определения 3_Game/tools/tools.c:8
const float VEHICLE_FLIP_ANGLE_TOLERANCE
Определения 3_Game/constants.c:818