DayZ 1.29
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
Transport.c
См. документацию.
1
5{
6
7};
8
9#ifdef FEATURE_NETWORK_RECONCILIATION
10
11class TransportOwnerState : PawnOwnerState
12{
13 proto native void SetWorldTransform(vector transform[4]);
14 proto native void GetWorldTransform(out vector transform[4]);
15
16 proto native void SetLinearVelocity(vector value);
17 proto native void GetLinearVelocity(out vector value);
18
19 proto native void SetAngularVelocity(vector value);
20 proto native void GetAngularVelocity(out vector value);
21
22 proto native void SetBuoyancySubmerged(float value);
23 proto native float GetBuoyancySubmerged();
24
25#ifdef DIAG_DEVELOPER
26 override event void GetTransform(inout vector transform[4])
27 {
28 GetWorldTransform(transform);
29 }
30#endif
31};
32
33class TransportMove : PawnMove
34{
35 proto native void SetWorldTransform(vector transform[4]);
36 proto native void GetWorldTransform(out vector transform[4]);
37
38 proto native void SetLinearVelocity(vector value);
39 proto native void GetLinearVelocity(out vector value);
40
41 proto native void SetAngularVelocity(vector value);
42 proto native void GetAngularVelocity(out vector value);
43
44#ifdef DIAG_DEVELOPER
45 override event void GetTransform(inout vector transform[4])
46 {
47 GetWorldTransform(transform);
48 }
49#endif
50};
51
53class Transport extends Pawn
54#else
55class Transport extends EntityAI
56#endif
57{
60
64
66 protected vector m_fuelPos;
67
68 protected ref set<int> m_UnconsciousCrewMemberIndices;
69 protected ref set<int> m_DeadCrewMemberIndices;
70
71 void Transport()
72 {
73 RegisterNetSyncVariableBool("m_EngineZoneReceivedHit");
74
75 if ( MemoryPointExists("refill") )
76 m_fuelPos = GetMemoryPointPos("refill");
77 else
78 m_fuelPos = "0 0 0";
79
80 m_UnconsciousCrewMemberIndices = new set<int>();
81 m_DeadCrewMemberIndices = new set<int>();
82 }
83
84 override void EEHitBy(TotalDamageResult damageResult, int damageType, EntityAI source, int component, string dmgZone, string ammo, vector modelPos, float speedCoef)
85 {
86 super.EEHitBy(damageResult, damageType, source, component, dmgZone, ammo, modelPos, speedCoef);
87
88 SetEngineZoneReceivedHit(dmgZone == "Engine");
89 }
90
91 override int GetMeleeTargetType()
92 {
93 return EMeleeTargetType.NONALIGNABLE;
94 }
95
97 protected override event typename GetOwnerStateType()
98 {
99 return TransportOwnerState;
100 }
101
103 protected override event typename GetMoveType()
104 {
105 return TransportMove;
106 }
107
109 proto native void Synchronize();
110
112 proto native int CrewSize();
113
116 proto native int CrewPositionIndex( int componentIdx );
117
120 proto native int CrewMemberIndex( Human player );
121
124 proto native Human CrewMember( int posIdx );
125
128 proto native Human CrewDriver();
129
131 proto void CrewEntry( int posIdx, out vector pos, out vector dir );
132
134 proto void CrewEntryWS( int posIdx, out vector pos, out vector dir );
135
137 proto void CrewTransform( int posIdx, out vector mat[4] );
138
140 proto void CrewTransformWS( int posIdx, out vector mat[4] );
141
143 proto native void CrewGetIn( Human player, int posIdx );
144
146 proto native Human CrewGetOut( int posIdx );
147
149 proto native void CrewDeath( int posIdx );
150
155 void OnDriverEnter(Human player) {}
156
161 void OnDriverExit(Human player) {}
162
164 proto native bool LightIsOn();
165
167 proto native void LightOn();
168
170 proto native void LightOff();
171
173 proto native void LightToggle();
174
181 {
182 // light can turn on by default
183 return true;
184 }
185
190 {
191 UpdateLights();
192 }
193
195
197 proto void ApplyForce(vector force);
198
200 proto void ApplyTorque(vector force);
201
203 proto void ApplyForceAt(vector pos, vector force);
204
206 proto void ApplyCentralImpulse(vector centralImpulse);
207
209 proto void ApplyTorqueImpulse(vector torqueImpulse);
210
212 proto void ApplyImpulseAt(vector pos, vector force);
213
215
220 proto native int Random();
221
227 proto native float RandomRange(int pRange);
228
233 proto native float Random01();
234
239 float RandomFloat(float min, float max)
240 {
241 return Random01() * (max - min) + min;
242 }
243
252 void OnContact(string zoneName, vector localPos, IEntity other, Contact data) {}
253
262 void OnInput(float dt) {}
263
268 void OnUpdate(float dt) {}
269
270 // Scripted function
271 void UpdateLights(int new_gear = -1) {}
272
273 override bool IsTransport()
274 {
275 return true;
276 }
277
279 {
280 return false;
281 }
282
283 override bool IsHealthVisible()
284 {
285 return true;
286 }
287
288 override bool ShowZonesHealth()
289 {
290 return true;
291 }
292
293 override int GetHideIconMask()
294 {
295 return EInventoryIconVisibility.HIDE_VICINITY;
296 }
297
299 {
300 return GetVelocity(this).Length() * dBodyGetMass(this);
301 }
302
304 {
305 return true;
306 }
307
309 {
310 return "VehicleTypeUndefined";
311 }
312
314 {
315 return "refill";
316 }
317
319 {
320 return 1.5;
321 }
322
324 {
325 return ModelToWorld( m_fuelPos );
326 }
327
329 {
330 if (!m_FlippedContext)
331 {
333 }
334
335#ifdef DIAG_DEVELOPER
336 m_FlippedContext.Reset(DiagMenu.GetBool(DiagMenuIDs.VEHICLE_DRAW_FLIP_CONTEXT));
337#endif
338
339 return m_FlippedContext;
340 }
341
342 protected bool DetectFlippedUsingSurface(VehicleFlippedContext ctx, float angleTolerance)
343 {
344 vector corners[4];
345 GetTightlyPackedCorners(ETransformationAxis.BOTTOM, corners);
346
347 // compute the average position to find the lowest "center-most" position
348 vector avgPosition = vector.Zero;
349 for (int i = 0; i < 4; i++)
350 {
351 avgPosition = avgPosition + corners[i];
352 }
353
354 avgPosition = avgPosition * 0.25;
355
356 // get depth of the water to determine if we should use the roadway surface normal or just up vector
357 float depth = g_Game.GetWaterDepth(avgPosition);
358
359 vector normal = vector.Up;
360 vector dirUp = GetDirectionUp();
361
362 bool testLand = depth < -1.0;
363
364 // iterate over the corners to find the average normal
365 if (testLand)
366 {
367 // trace roadway, incase the vehicle is on a rock, or bridge
369
370 // ignore expensive water computation, we already know we are above land
371 ctx.m_SurfaceParams.includeWater = false;
372
373 // ignore this vehicle, it may have a roadway LOD
374 ctx.m_SurfaceParams.ignore = this;
375
376 // detect closest to the given point
377 ctx.m_SurfaceParams.rsd = RoadSurfaceDetection.CLOSEST;
378
379 for (i = 0; i < 4; i++)
380 {
381 ctx.m_SurfaceParams.position = corners[i];
382
383 g_Game.GetSurface(ctx.m_SurfaceParams, ctx.m_SurfaceResult);
384
385 corners[i][1] = ctx.m_SurfaceResult.height;
386 }
387
388 vector d0 = vector.Direction(corners[0], corners[1]);
389 vector d1 = vector.Direction(corners[0], corners[2]);
390
391 d0.Normalize();
392 d1.Normalize();
393
394 // cross product the two directions to get the normal vector of the land
395 normal = d0 * d1;
396 }
397
398 bool isFlipped = vector.Dot(normal, dirUp) < Math.Cos(angleTolerance * Math.DEG2RAD);
399
400#ifdef DIAG_DEVELOPER
401 if (ctx.IsDebug())
402 {
403 int color = 0xFF00FF00;
404 if (isFlipped)
405 color = 0xFFFF0000;
406
407 ctx.AddShape(Shape.Create(ShapeType.LINE, color, ShapeFlags.NOZBUFFER, corners[0], corners[0] + normal));
408 ctx.AddShape(Shape.Create(ShapeType.LINE, color, ShapeFlags.NOZBUFFER, corners[1], corners[1] + normal));
409 ctx.AddShape(Shape.Create(ShapeType.LINE, color, ShapeFlags.NOZBUFFER, corners[2], corners[2] + normal));
410 ctx.AddShape(Shape.Create(ShapeType.LINE, color, ShapeFlags.NOZBUFFER, corners[3], corners[3] + normal));
411 }
412#endif
413
414 return isFlipped;
415 }
416
419 {
420 return false;
421 }
422
424 /*sealed*/ bool IsFlipped()
425 {
427 ctx.m_bIsAction = false;
428 ctx.m_ActionPlayer = null;
429 return DetectFlipped(ctx);
430 }
431
433 /*sealed*/ bool IsActionFlipped(Man player)
434 {
436 ctx.m_bIsAction = true;
437 ctx.m_ActionPlayer = player;
438 return DetectFlipped(ctx);
439 }
440
442 {
443 for (int index = 0; index < CrewSize(); ++index)
444 {
445 if (CrewMember(index) != null)
446 return true;
447 }
448
449 return false;
450 }
451
453 {
454 return 4.0;
455 }
456
457 void MarkCrewMemberUnconscious(int crewMemberIndex);
458 void MarkCrewMemberDead(int crewMemberIndex);
459
461 {
462 return "0 1.3 0";
463 }
464
466 {
467#ifndef CFGMODS_DEFINE_TEST
468 Error("GetAnimInstance() not implemented");
469 return 0;
470#else
471 return 2;
472#endif
473 }
474
475 int GetSeatAnimationType( int posIdx )
476 {
477#ifndef CFGMODS_DEFINE_TEST
478 Error("GetSeatAnimationType() not implemented");
479#endif
480 return 0;
481 }
482
484 {
485#ifndef CFGMODS_DEFINE_TEST
486 Error("Get3rdPersonCameraType() not implemented");
487 return 0;
488#else
489 return 31;
490#endif
491 }
492
493 bool CrewCanGetThrough( int posIdx )
494 {
495#ifndef CFGMODS_DEFINE_TEST
496 return false;
497#else
498 return true;
499#endif
500 }
501
502 bool CanReachSeatFromSeat( int currentSeat, int nextSeat )
503 {
504#ifndef CFGMODS_DEFINE_TEST
505 return false;
506#else
507 return true;
508#endif
509 }
510
511 bool CanReachSeatFromDoors( string pSeatSelection, vector pFromPos, float pDistance = 1.0 )
512 {
513#ifndef CFGMODS_DEFINE_TEST
514 return false;
515#else
516 return true;
517#endif
518 }
519
520 bool CanReachDoorsFromSeat( string pDoorsSelection, int pCurrentSeat )
521 {
522#ifndef CFGMODS_DEFINE_TEST
523 return false;
524#else
525 return true;
526#endif
527 }
528
529 int GetSeatIndexFromDoor( string pDoorSelection )
530 {
531 //Potientially could be fixed some other way, currently follows the unfortunate pattern that CanReachDoorsFromSeat has created
532 switch (pDoorSelection)
533 {
534 case "DoorsDriver":
535 return 0;
536 break;
537 case "DoorsCoDriver":
538 return 1;
539 break;
540 case "DoorsCargo1":
541 return 2;
542 break;
543 case "DoorsCargo2":
544 return 3;
545 break;
546 }
547 return -1;
548 }
549
551 {
552 if (!o)
553 return false;
554
556 int layer = dBodyGetInteractionLayer(o);
557 bool interacts = dGetInteractionLayer(this, PhxInteractionLayers.CHARACTER, layer);
558 if (!interacts)
559 {
560 return true;
561 }
562
563 DayZPlayer player;
564 if (Class.CastTo(player, o))
565 {
567 HumanCommandVehicle hcv = player.GetCommand_Vehicle();
568 if (hcv && hcv.GetTransport() == this)
569 {
570 return true;
571 }
572 }
573
574 EntityAI e = EntityAI.Cast(o);
575 // CanBeSkinned means it is a dead entity which should not block the door
576 return ( ( e && (e.IsZombie() || e.IsHologram()) ) || o.CanBeSkinned() || o.IsBush() || o.IsTree() );
577 }
578
579 void SetEngineZoneReceivedHit(bool pState)
580 {
582 SetSynchDirty();
583 }
584
586 {
588 }
589
590 override void GetDebugActions(out TSelectableActionInfoArrayEx outputList)
591 {
592 super.GetDebugActions(outputList);
593
594 outputList.Insert(new TSelectableActionInfoWithColor(SAT_DEBUG_ACTION, EActions.DELETE, "Delete", FadeColors.RED));
595 if (Gizmo_IsSupported())
596 outputList.Insert(new TSelectableActionInfoWithColor(SAT_DEBUG_ACTION, EActions.GIZMO_OBJECT, "Gizmo Object", FadeColors.LIGHT_GREY));
597 outputList.Insert(new TSelectableActionInfoWithColor(SAT_DEBUG_ACTION, EActions.GIZMO_PHYSICS, "Gizmo Physics (SP Only)", FadeColors.LIGHT_GREY)); // intentionally allowed for testing physics desync
598 outputList.Insert(new TSelectableActionInfoWithColor(SAT_DEBUG_ACTION, EActions.SEPARATOR, "___________________________", FadeColors.RED));
599 }
600
601 override bool OnAction(int action_id, Man player, ParamsReadContext ctx)
602 {
603 if (super.OnAction(action_id, player, ctx))
604 return true;
605
606 if (g_Game.IsClient() || !g_Game.IsMultiplayer())
607 {
608 switch (action_id)
609 {
610 case EActions.GIZMO_OBJECT:
611 if (GetGizmoApi())
613 return true;
614 case EActions.GIZMO_PHYSICS:
615 if (GetGizmoApi())
616 GetGizmoApi().SelectPhysics(GetPhysics());
617 return true;
618 }
619 }
620
621 if (g_Game.IsServer())
622 {
623 switch (action_id)
624 {
625 case EActions.DELETE:
626 Delete();
627 return true;
628 }
629 }
630
631 return false;
632 }
633
634 bool IsAreaAtDoorFree( int currentSeat, float maxAllowedObjHeight, inout vector extents, out vector transform[4] )
635 {
636 GetTransform(transform);
637
638 vector crewPos;
639 vector crewDir;
640 CrewEntry( currentSeat, crewPos, crewDir );
641
642 vector entry[4];
643 entry[2] = crewDir;
644 entry[0] = vector.Up * crewDir;
645 entry[1] = entry[2] * entry[0];
646 entry[3] = crewPos;
647
648 Math3D.MatrixMultiply4( transform, entry, transform );
649
650 vector position = transform[3];
651 vector orientation = Math3D.MatrixToAngles(transform);
652
653 position[1] = position[1] + maxAllowedObjHeight + (extents[1] * 0.5);
654
655 array<Object> excluded = new array<Object>;
656 array<Object> collided = new array<Object>;
657
658 excluded.Insert(this);
659
660 g_Game.IsBoxColliding(position, orientation, extents, excluded, collided);
661
662 orientation.RotationMatrixFromAngles(transform);
663 transform[3] = position;
664
665 foreach (Object o : collided)
666 {
667 EntityAI e = EntityAI.Cast(o);
668 if (IsIgnoredObject(o))
669 continue;
670
671 vector minmax[2];
672 if (o.GetCollisionBox(minmax))
673 return false;
674 }
675
676 return true;
677 }
678
679 bool IsAreaAtDoorFree( int currentSeat, float maxAllowedObjHeight = 0.5, float horizontalExtents = 0.5, float playerHeight = 1.7 )
680 {
681 vector transform[4];
682 vector extents;
683
684 extents[0] = horizontalExtents;
685 extents[1] = playerHeight;
686 extents[2] = horizontalExtents;
687
688 return IsAreaAtDoorFree( currentSeat, maxAllowedObjHeight, extents, transform );
689 }
690
691 Shape DebugFreeAreaAtDoor( int currentSeat, float maxAllowedObjHeight = 0.5, float horizontalExtents = 0.5, float playerHeight = 1.7 )
692 {
693 int color = ARGB(20, 0, 255, 0);
694
695 vector transform[4];
696 vector extents;
697
698 extents[0] = horizontalExtents;
699 extents[1] = playerHeight;
700 extents[2] = horizontalExtents;
701
702 if (!IsAreaAtDoorFree( currentSeat, maxAllowedObjHeight, extents, transform ))
703 {
704 color = ARGB(20, 255, 0, 0);
705 }
706
707 Shape shape = Debug.DrawBox(-extents * 0.5, extents * 0.5, color);
708 shape.SetMatrix(transform);
709 return shape;
710 }
711};
712
714{
718
719 void SetData(vector localPos, IEntity other, float impulse)
720 {
721 m_LocalPos = localPos;
722 m_Other = other;
723 m_Impulse = impulse;
724 }
725};
726
728{
729 bool m_bIsAction = false;
731
734
735#ifdef DIAG_DEVELOPER
736 private ref array<Shape> m_DebugShapes;
737 private bool m_bIsDebug;
738
740 {
741 m_DebugShapes = new array<Shape>();
742 }
743
745 {
746 Reset();
747 }
748
749 void Reset(bool isDebug = false)
750 {
751 foreach (Shape shape : m_DebugShapes)
752 {
753 shape.Destroy();
754 }
755
756 m_DebugShapes.Clear();
757
758 m_bIsDebug = isDebug;
759 }
760
761 void AddShape(Shape shape)
762 {
763 m_DebugShapes.Insert(shape);
764 }
765
766 bool IsDebug()
767 {
768 return m_bIsDebug;
769 }
770#endif
771
772 [Obsolete("no replacement")]
774};
Param4< int, int, string, int > TSelectableActionInfoWithColor
DayZGame g_Game
Определения DayZGame.c:3942
PhxInteractionLayers
Определения DayZPhysics.c:2
EActions
Определения EActions.c:2
ECrewMemberState
Определения ECrewMemberState.c:3
DiagMenuIDs
Определения EDiagMenuIDs.c:2
EMeleeTargetType
Определения EMeleeTargetType.c:2
ETransformationAxis
Определения ETransformationAxis.c:2
proto GizmoApi GetGizmoApi()
class BoxCollidingParams component
ComponentInfo for BoxCollidingResult.
SurfaceDetectionType
Определения SurfaceInfo.c:66
Super root of all classes in Enforce script.
Определения EnScript.c:11
Определения Contact.c:10
Определения DayZPlayerImplement.c:87
static Shape DrawBox(vector pos1, vector pos2, int color=0x1fff7f7f)
Определения 3_Game/DayZ/tools/Debug.c:349
Определения 3_Game/DayZ/tools/Debug.c:2
Определения EnDebug.c:241
bool CanReachSeatFromSeat(int currentSeat, int nextSeat)
Определения Transport.c:502
ref TIntArray m_InteractActions
Определения Transport.c:63
vector m_fuelPos
Определения Transport.c:66
ref TIntArray m_SingleUseActions
Определения Transport.c:61
override bool IsHealthVisible()
Определения Transport.c:283
override void EEHitBy(TotalDamageResult damageResult, int damageType, EntityAI source, int component, string dmgZone, string ammo, vector modelPos, float speedCoef)
Определения Transport.c:84
int GetAnimInstance()
Определения Transport.c:465
proto void CrewEntryWS(int posIdx, out vector pos, out vector dir)
Reads entry point and direction into vehicle on given position in world space.
void UpdateLights(int new_gear=-1)
Определения Transport.c:271
void OnDriverEnter(Human player)
Определения Transport.c:155
bool DetectFlippedUsingSurface(VehicleFlippedContext ctx, float angleTolerance)
Определения Transport.c:342
proto native void LightToggle()
Calls LightOn/LightOff depending on current light state.
float GetActionDistanceFuel()
Определения Transport.c:318
bool DetectFlipped(VehicleFlippedContext ctx)
Override based on vehicle implementation (Car, Boat, modded, etc.)
Определения Transport.c:418
string GetVehicleType()
Определения Transport.c:308
proto void CrewEntry(int posIdx, out vector pos, out vector dir)
Reads entry point and direction into vehicle on given position in model space.
override bool ShowZonesHealth()
Определения Transport.c:288
bool OnBeforeLightOn()
Определения Transport.c:180
bool m_EngineZoneReceivedHit
Определения Transport.c:65
bool IsActionFlipped(Man player)
Don't override, may change to native for caching 'DetectFlipped' in the future based on active-ness (...
Определения Transport.c:433
override int GetHideIconMask()
Определения Transport.c:293
proto native Human CrewMember(int posIdx)
proto void CrewTransform(int posIdx, out vector mat[4])
Returns crew transformation indside vehicle in model space.
void Man()
Определения 3_Game/DayZ/Entities/Man.c:43
proto native Human CrewGetOut(int posIdx)
Performs transfer of player from vehicle into world from given position.
float GetTransportCameraDistance()
Определения Transport.c:452
override int GetMeleeTargetType()
Определения Transport.c:91
override event GetOwnerStateType()
Определения Transport.c:97
void OnContact(string zoneName, vector localPos, IEntity other, Contact data)
Определения Transport.c:252
proto native float Random01()
Random number in range of <0,1> - !!! use this only during deterministic simulation (EOnSimulate/EOnP...
void MarkCrewMemberUnconscious(int crewMemberIndex)
proto native int Random()
-------------— deterministic random numbers ---------------------—
void SetEngineZoneReceivedHit(bool pState)
Определения Transport.c:579
proto native int CrewPositionIndex(int componentIdx)
proto native int CrewMemberIndex(Human player)
float GetMomentum()
Определения Transport.c:298
bool IsAreaAtDoorFree(int currentSeat, float maxAllowedObjHeight, inout vector extents, out vector transform[4])
Определения Transport.c:634
override bool IsTransport()
Определения Transport.c:273
proto native Human CrewDriver()
string GetActionCompNameFuel()
Определения Transport.c:313
VehicleFlippedContext GetFlipContext()
Определения Transport.c:328
proto void ApplyImpulseAt(vector pos, vector force)
Applies impulse on the physics body at a position (world space coordinates).
proto void ApplyForceAt(vector pos, vector force)
Applies constant force on the physics body at a position (world space coordinates).
override bool OnAction(int action_id, Man player, ParamsReadContext ctx)
Определения Transport.c:601
proto native void Synchronize()
Synchronizes car's state in case the simulation is not running.
float RandomFloat(float min, float max)
Random number in range of <min,max> - !!! use this only during deterministic simulation (EOnSimulate/...
Определения Transport.c:239
void OnUpdate(float dt)
Определения Transport.c:268
proto void ApplyTorque(vector force)
Applies constant torque on the physics body.
bool IsAnyCrewPresent()
Определения Transport.c:441
override event GetMoveType()
Определения Transport.c:103
void OnInput(float dt)
Определения Transport.c:262
proto void CrewTransformWS(int posIdx, out vector mat[4])
Returns crew transformation indside vehicle in world space.
vector GetTransportCameraOffset()
Определения Transport.c:460
proto native int CrewSize()
Returns crew capacity of this vehicle.
proto native void LightOn()
Signals for LightIsOn to return true.
bool CrewCanGetThrough(int posIdx)
Определения Transport.c:493
int GetSeatIndexFromDoor(string pDoorSelection)
Определения Transport.c:529
bool IsFlipped()
Don't override, may change to native for caching 'DetectFlipped' in the future based on active-ness (...
Определения Transport.c:424
proto native void CrewGetIn(Human player, int posIdx)
Performs transfer of player from world into vehicle on given position.
proto native void LightOff()
Signals for LightIsOn to return false.
ref TIntArray m_ContinuousActions
Определения Transport.c:62
proto void ApplyTorqueImpulse(vector torqueImpulse)
Applies impulse torque on the physics body.
static ref VehicleFlippedContext m_FlippedContext
Shared context across all vehicles for flipping.
Определения Transport.c:59
Shape DebugFreeAreaAtDoor(int currentSeat, float maxAllowedObjHeight=0.5, float horizontalExtents=0.5, float playerHeight=1.7)
Определения Transport.c:691
proto void ApplyCentralImpulse(vector centralImpulse)
Applies impulse on the physics body (at origin).
int GetSeatAnimationType(int posIdx)
Определения Transport.c:475
bool IsAreaAtDoorFree(int currentSeat, float maxAllowedObjHeight=0.5, float horizontalExtents=0.5, float playerHeight=1.7)
Определения Transport.c:679
bool HasEngineZoneReceivedHit()
Определения Transport.c:585
proto void ApplyForce(vector force)
-------------— deterministic physics ---------------------—
int Get3rdPersonCameraType()
Определения Transport.c:483
ref set< int > m_DeadCrewMemberIndices
Определения Transport.c:69
void OnUpdateLight()
Определения Transport.c:189
void Transport()
Определения Transport.c:71
override void GetDebugActions(out TSelectableActionInfoArrayEx outputList)
Определения Transport.c:590
proto native bool LightIsOn()
Returns true when lights are on, false otherwise.
void MarkCrewMemberDead(int crewMemberIndex)
bool IsVitalSparkPlug()
Определения Transport.c:303
override bool IsIgnoredByConstruction()
Определения Transport.c:278
bool CanReachDoorsFromSeat(string pDoorsSelection, int pCurrentSeat)
Определения Transport.c:520
bool CanReachSeatFromDoors(string pSeatSelection, vector pFromPos, float pDistance=1.0)
Определения Transport.c:511
ref set< int > m_UnconsciousCrewMemberIndices
Определения Transport.c:68
proto native void CrewDeath(int posIdx)
Handles death of player in vehicle and awakes its physics if needed.
vector GetRefillPointPosWS()
Определения Transport.c:323
proto native float RandomRange(int pRange)
Random number in range of <0,pRange-1> - !!! use this only during deterministic simulation (EOnSimula...
void OnDriverExit(Human player)
Определения Transport.c:161
bool IsIgnoredObject(Object o)
Определения Transport.c:550
void EntityAIType()
Определения EntityAIType.c:3
proto void SelectObject(Object object)
proto void SelectPhysics(Physics physics)
proto native Transport GetTransport()
Определения human.c:690
Определения human.c:1333
Определения EnEntity.c:165
Определения EnMath3D.c:28
Определения EnMath.c:7
Определения ObjectTyped.c:2
bool includeWater
Include water in the surface detection, will return the water if it is higher than the surface.
Определения SurfaceInfo.c:83
SurfaceDetectionType type
Type of surface to detect.
Определения SurfaceInfo.c:77
RoadSurfaceDetection rsd
See RoadSurfaceDetection, SurfaceTraceType.Roadway only.
Определения SurfaceInfo.c:92
Object ignore
Object to ignore tracing against, SurfaceTraceType.Roadway only.
Определения SurfaceInfo.c:89
vector position
3D position to trace the surface from
Определения SurfaceInfo.c:80
float height
Height position.
Определения SurfaceInfo.c:102
Определения DamageSystem.c:2
override bool IsAreaAtDoorFree(int currentSeat, float maxAllowedObjHeight=0.5, float horizontalExtents=0.5, float playerHeight=1.7)
Определения Car.c:121
Native class for boats - handles physics simulation.
Определения Boat.c:32
Определения Transport.c:5
void SetData(vector localPos, IEntity other, float impulse)
Определения Transport.c:719
IEntity m_Other
Определения Transport.c:716
vector m_LocalPos
Определения Transport.c:715
float m_Impulse
Определения Transport.c:717
Определения Transport.c:714
Man m_ActionPlayer
Определения Transport.c:730
ref SurfaceDetectionParameters m_SurfaceParams
Определения Transport.c:732
void HandleByCrewMemberState(ECrewMemberState state)
bool m_bIsAction
Определения Transport.c:729
ref SurfaceDetectionResult m_SurfaceResult
Определения Transport.c:733
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto native float Length()
Returns length of vector (magnitude)
static float Dot(vector v1, vector v2)
Returns Dot product of vector v1 and vector v2.
Определения EnConvert.c:284
static const vector Zero
Определения EnConvert.c:123
proto float Normalize()
Normalizes vector. Returns length.
static vector Direction(vector p1, vector p2)
Returns direction vector from point p1 to point p2.
Определения EnConvert.c:233
proto void RotationMatrixFromAngles(out vector mat[3])
Creates rotation matrix from angles.
static const vector Up
Определения EnConvert.c:120
Определения EnConvert.c:119
proto native float Random01()
Random number in range of <0,1> - !!! use this only during deterministic simulation (CommandHandler)
Serializer ParamsReadContext
Определения gameplay.c:15
void Error(string err)
Messagebox with error message.
Определения EnDebug.c:90
ShapeType
Определения EnDebug.c:116
ShapeFlags
Определения EnDebug.c:126
static proto bool GetBool(int id, bool reverse=false)
Get value as bool from the given script id.
class DiagMenu Shape
don't call destructor directly. Use Destroy() instead
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
array< int > TIntArray
Определения EnScript.c:714
void Obsolete(string msg="")
Определения EnScript.c:371
static proto vector MatrixToAngles(vector mat[3])
Returns angles of rotation matrix.
static proto void MatrixMultiply4(vector mat0[4], vector mat1[4], out vector res[4])
Transforms matrix.
static proto float Cos(float angle)
Returns cosinus of angle in radians.
static const float DEG2RAD
Определения EnMath.c:17
proto native bool dGetInteractionLayer(notnull IEntity worldEntity, int mask1, int mask2)
proto native vector GetVelocity(notnull IEntity ent)
Returns linear velocity.
proto native float dBodyGetMass(notnull IEntity ent)
proto native int dBodyGetInteractionLayer(notnull IEntity ent)
const int SAT_DEBUG_ACTION
Определения 3_Game/DayZ/constants.c:457
int ARGB(int a, int r, int g, int b)
Определения proto.c:322