DayZ 1.28
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
Transport.c
См. документацию.
1
4#ifdef FEATURE_NETWORK_RECONCILIATION
5
6class TransportOwnerState : PawnOwnerState
7{
8 proto native void SetWorldTransform(vector transform[4]);
9 proto native void GetWorldTransform(out vector transform[4]);
10
11 proto native void SetLinearVelocity(vector value);
12 proto native void GetLinearVelocity(out vector value);
13
14 proto native void SetAngularVelocity(vector value);
15 proto native void GetAngularVelocity(out vector value);
16
17 proto native void SetBuoyancySubmerged(float value);
18 proto native float GetBuoyancySubmerged();
19
20#ifdef DIAG_DEVELOPER
21 override event void GetTransform(inout vector transform[4])
22 {
23 GetWorldTransform(transform);
24 }
25#endif
26};
27
28class TransportMove : PawnMove
29{
30 proto native void SetWorldTransform(vector transform[4]);
31 proto native void GetWorldTransform(out vector transform[4]);
32
33 proto native void SetLinearVelocity(vector value);
34 proto native void GetLinearVelocity(out vector value);
35
36 proto native void SetAngularVelocity(vector value);
37 proto native void GetAngularVelocity(out vector value);
38
39#ifdef DIAG_DEVELOPER
40 override event void GetTransform(inout vector transform[4])
41 {
42 GetWorldTransform(transform);
43 }
44#endif
45};
46
48class Transport extends Pawn
49#else
50class Transport extends EntityAI
51#endif
52{
55
59
61 protected vector m_fuelPos;
62
63 protected ref set<int> m_UnconsciousCrewMemberIndices;
64 protected ref set<int> m_DeadCrewMemberIndices;
65
66 void Transport()
67 {
68 RegisterNetSyncVariableBool("m_EngineZoneReceivedHit");
69
70 if ( MemoryPointExists("refill") )
71 m_fuelPos = GetMemoryPointPos("refill");
72 else
73 m_fuelPos = "0 0 0";
74
75 m_UnconsciousCrewMemberIndices = new set<int>();
76 m_DeadCrewMemberIndices = new set<int>();
77 }
78
79 override void EEHitBy(TotalDamageResult damageResult, int damageType, EntityAI source, int component, string dmgZone, string ammo, vector modelPos, float speedCoef)
80 {
81 super.EEHitBy(damageResult, damageType, source, component, dmgZone, ammo, modelPos, speedCoef);
82
83 SetEngineZoneReceivedHit(dmgZone == "Engine");
84 }
85
86 override int GetMeleeTargetType()
87 {
88 return EMeleeTargetType.NONALIGNABLE;
89 }
90
92 protected override event typename GetOwnerStateType()
93 {
94 return TransportOwnerState;
95 }
96
98 protected override event typename GetMoveType()
99 {
100 return TransportMove;
101 }
102
104 proto native void Synchronize();
105
107 proto native int CrewSize();
108
111 proto native int CrewPositionIndex( int componentIdx );
112
115 proto native int CrewMemberIndex( Human player );
116
119 proto native Human CrewMember( int posIdx );
120
123 proto native Human CrewDriver();
124
126 proto void CrewEntry( int posIdx, out vector pos, out vector dir );
127
129 proto void CrewEntryWS( int posIdx, out vector pos, out vector dir );
130
132 proto void CrewTransform( int posIdx, out vector mat[4] );
133
135 proto void CrewTransformWS( int posIdx, out vector mat[4] );
136
138 proto native void CrewGetIn( Human player, int posIdx );
139
141 proto native Human CrewGetOut( int posIdx );
142
144 proto native void CrewDeath( int posIdx );
145
150 void OnDriverEnter(Human player) {}
151
156 void OnDriverExit(Human player) {}
157
159
164 proto native int Random();
165
171 proto native float RandomRange(int pRange);
172
177 proto native float Random01();
178
183 float RandomFloat(float min, float max)
184 {
185 return Random01() * (max - min) + min;
186 }
187
196 void OnContact(string zoneName, vector localPos, IEntity other, Contact data) {}
197
206 void OnInput(float dt) {}
207
212 void OnUpdate(float dt) {}
213
214 override bool IsTransport()
215 {
216 return true;
217 }
218
220 {
221 return false;
222 }
223
224 override bool IsHealthVisible()
225 {
226 return true;
227 }
228
229 override bool ShowZonesHealth()
230 {
231 return true;
232 }
233
234 override int GetHideIconMask()
235 {
236 return EInventoryIconVisibility.HIDE_VICINITY;
237 }
238
240 {
241 return GetVelocity(this).Length() * dBodyGetMass(this);
242 }
243
245 {
246 return true;
247 }
248
250 {
251 return "VehicleTypeUndefined";
252 }
253
255 {
256 return "refill";
257 }
258
260 {
261 return 1.5;
262 }
263
265 {
266 return ModelToWorld( m_fuelPos );
267 }
268
270 {
271 if (!m_FlippedContext)
272 {
274 }
275
276#ifdef DIAG_DEVELOPER
277 m_FlippedContext.Reset(DiagMenu.GetBool(DiagMenuIDs.VEHICLE_DRAW_FLIP_CONTEXT));
278#endif
279
280 return m_FlippedContext;
281 }
282
283 protected bool DetectFlippedUsingSurface(VehicleFlippedContext ctx, float angleTolerance)
284 {
285 vector corners[4];
286 GetTightlyPackedCorners(ETransformationAxis.BOTTOM, corners);
287
288 // compute the average position to find the lowest "center-most" position
289 vector avgPosition = vector.Zero;
290 for (int i = 0; i < 4; i++)
291 {
292 avgPosition = avgPosition + corners[i];
293 }
294
295 avgPosition = avgPosition * 0.25;
296
297 // get depth of the water to determine if we should use the roadway surface normal or just up vector
298 float depth = GetGame().GetWaterDepth(avgPosition);
299
300 vector normal = vector.Up;
301 vector dirUp = GetDirectionUp();
302
303 bool testLand = depth < -1.0;
304
305 // iterate over the corners to find the average normal
306 if (testLand)
307 {
308 // trace roadway, incase the vehicle is on a rock, or bridge
310
311 // ignore expensive water computation, we already know we are above land
312 ctx.m_SurfaceParams.includeWater = false;
313
314 // ignore this vehicle, it may have a roadway LOD
315 ctx.m_SurfaceParams.ignore = this;
316
317 // detect closest to the given point
318 ctx.m_SurfaceParams.rsd = RoadSurfaceDetection.CLOSEST;
319
320 for (i = 0; i < 4; i++)
321 {
322 ctx.m_SurfaceParams.position = corners[i];
323
325
326 corners[i][1] = ctx.m_SurfaceResult.height;
327 }
328
329 vector d0 = vector.Direction(corners[0], corners[1]);
330 vector d1 = vector.Direction(corners[0], corners[2]);
331
332 d0.Normalize();
333 d1.Normalize();
334
335 // cross product the two directions to get the normal vector of the land
336 normal = d0 * d1;
337 }
338
339 bool isFlipped = vector.Dot(normal, dirUp) < Math.Cos(angleTolerance * Math.DEG2RAD);
340
341#ifdef DIAG_DEVELOPER
342 if (ctx.IsDebug())
343 {
344 int color = 0xFF00FF00;
345 if (isFlipped)
346 color = 0xFFFF0000;
347
348 ctx.AddShape(Shape.Create(ShapeType.LINE, color, ShapeFlags.NOZBUFFER, corners[0], corners[0] + normal));
349 ctx.AddShape(Shape.Create(ShapeType.LINE, color, ShapeFlags.NOZBUFFER, corners[1], corners[1] + normal));
350 ctx.AddShape(Shape.Create(ShapeType.LINE, color, ShapeFlags.NOZBUFFER, corners[2], corners[2] + normal));
351 ctx.AddShape(Shape.Create(ShapeType.LINE, color, ShapeFlags.NOZBUFFER, corners[3], corners[3] + normal));
352 }
353#endif
354
355 return isFlipped;
356 }
357
360 {
361 return false;
362 }
363
365 /*sealed*/ bool IsFlipped()
366 {
368 ctx.m_bIsAction = false;
369 ctx.m_ActionPlayer = null;
370 return DetectFlipped(ctx);
371 }
372
374 /*sealed*/ bool IsActionFlipped(Man player)
375 {
377 ctx.m_bIsAction = true;
378 ctx.m_ActionPlayer = player;
379 return DetectFlipped(ctx);
380 }
381
383 {
384 for (int index = 0; index < CrewSize(); ++index)
385 {
386 if (CrewMember(index) != null)
387 return true;
388 }
389
390 return false;
391 }
392
394 {
395 return 4.0;
396 }
397
398 void MarkCrewMemberUnconscious(int crewMemberIndex);
399 void MarkCrewMemberDead(int crewMemberIndex);
400
402 {
403 return "0 1.3 0";
404 }
405
407 {
408#ifndef CFGMODS_DEFINE_TEST
409 Error("GetAnimInstance() not implemented");
410 return 0;
411#else
412 return 2;
413#endif
414 }
415
416 int GetSeatAnimationType( int posIdx )
417 {
418#ifndef CFGMODS_DEFINE_TEST
419 Error("GetSeatAnimationType() not implemented");
420#endif
421 return 0;
422 }
423
425 {
426#ifndef CFGMODS_DEFINE_TEST
427 Error("Get3rdPersonCameraType() not implemented");
428 return 0;
429#else
430 return 31;
431#endif
432 }
433
434 bool CrewCanGetThrough( int posIdx )
435 {
436#ifndef CFGMODS_DEFINE_TEST
437 return false;
438#else
439 return true;
440#endif
441 }
442
443 bool CanReachSeatFromSeat( int currentSeat, int nextSeat )
444 {
445#ifndef CFGMODS_DEFINE_TEST
446 return false;
447#else
448 return true;
449#endif
450 }
451
452 bool CanReachSeatFromDoors( string pSeatSelection, vector pFromPos, float pDistance = 1.0 )
453 {
454#ifndef CFGMODS_DEFINE_TEST
455 return false;
456#else
457 return true;
458#endif
459 }
460
461 bool CanReachDoorsFromSeat( string pDoorsSelection, int pCurrentSeat )
462 {
463#ifndef CFGMODS_DEFINE_TEST
464 return false;
465#else
466 return true;
467#endif
468 }
469
470 int GetSeatIndexFromDoor( string pDoorSelection )
471 {
472 //Potientially could be fixed some other way, currently follows the unfortunate pattern that CanReachDoorsFromSeat has created
473 switch (pDoorSelection)
474 {
475 case "DoorsDriver":
476 return 0;
477 break;
478 case "DoorsCoDriver":
479 return 1;
480 break;
481 case "DoorsCargo1":
482 return 2;
483 break;
484 case "DoorsCargo2":
485 return 3;
486 break;
487 }
488 return -1;
489 }
490
492 {
493 if (!o)
494 return false;
495
497 int layer = dBodyGetInteractionLayer(o);
498 bool interacts = dGetInteractionLayer(this, PhxInteractionLayers.CHARACTER, layer);
499 if (!interacts)
500 {
501 return true;
502 }
503
504 DayZPlayer player;
505 if (Class.CastTo(player, o))
506 {
508 HumanCommandVehicle hcv = player.GetCommand_Vehicle();
509 if (hcv && hcv.GetTransport() == this)
510 {
511 return true;
512 }
513 }
514
515 EntityAI e = EntityAI.Cast(o);
516 // CanBeSkinned means it is a dead entity which should not block the door
517 return ( ( e && (e.IsZombie() || e.IsHologram()) ) || o.CanBeSkinned() || o.IsBush() || o.IsTree() );
518 }
519
520 void SetEngineZoneReceivedHit(bool pState)
521 {
523 SetSynchDirty();
524 }
525
527 {
529 }
530
531 override void GetDebugActions(out TSelectableActionInfoArrayEx outputList)
532 {
533 super.GetDebugActions(outputList);
534
535 outputList.Insert(new TSelectableActionInfoWithColor(SAT_DEBUG_ACTION, EActions.DELETE, "Delete", FadeColors.RED));
536 if (Gizmo_IsSupported())
537 outputList.Insert(new TSelectableActionInfoWithColor(SAT_DEBUG_ACTION, EActions.GIZMO_OBJECT, "Gizmo Object", FadeColors.LIGHT_GREY));
538 outputList.Insert(new TSelectableActionInfoWithColor(SAT_DEBUG_ACTION, EActions.GIZMO_PHYSICS, "Gizmo Physics (SP Only)", FadeColors.LIGHT_GREY)); // intentionally allowed for testing physics desync
539 outputList.Insert(new TSelectableActionInfoWithColor(SAT_DEBUG_ACTION, EActions.SEPARATOR, "___________________________", FadeColors.RED));
540 }
541
542 override bool OnAction(int action_id, Man player, ParamsReadContext ctx)
543 {
544 if (super.OnAction(action_id, player, ctx))
545 return true;
546
547 if (GetGame().IsClient() || !GetGame().IsMultiplayer())
548 {
549 switch (action_id)
550 {
551 case EActions.GIZMO_OBJECT:
553 return true;
554 case EActions.GIZMO_PHYSICS:
555 GetGame().GizmoSelectPhysics(GetPhysics());
556 return true;
557 }
558 }
559
560 if (GetGame().IsServer())
561 {
562 switch (action_id)
563 {
564 case EActions.DELETE:
565 Delete();
566 return true;
567 }
568 }
569
570 return false;
571 }
572
573 bool IsAreaAtDoorFree( int currentSeat, float maxAllowedObjHeight, inout vector extents, out vector transform[4] )
574 {
575 GetTransform(transform);
576
577 vector crewPos;
578 vector crewDir;
579 CrewEntry( currentSeat, crewPos, crewDir );
580
581 vector entry[4];
582 entry[2] = crewDir;
583 entry[0] = vector.Up * crewDir;
584 entry[1] = entry[2] * entry[0];
585 entry[3] = crewPos;
586
587 Math3D.MatrixMultiply4( transform, entry, transform );
588
589 vector position = transform[3];
590 vector orientation = Math3D.MatrixToAngles(transform);
591
592 position[1] = position[1] + maxAllowedObjHeight + (extents[1] * 0.5);
593
594 array<Object> excluded = new array<Object>;
595 array<Object> collided = new array<Object>;
596
597 excluded.Insert(this);
598
599 GetGame().IsBoxColliding(position, orientation, extents, excluded, collided);
600
601 orientation.RotationMatrixFromAngles(transform);
602 transform[3] = position;
603
604 foreach (Object o : collided)
605 {
606 EntityAI e = EntityAI.Cast(o);
607 if (IsIgnoredObject(o))
608 continue;
609
610 vector minmax[2];
611 if (o.GetCollisionBox(minmax))
612 return false;
613 }
614
615 return true;
616 }
617
618 bool IsAreaAtDoorFree( int currentSeat, float maxAllowedObjHeight = 0.5, float horizontalExtents = 0.5, float playerHeight = 1.7 )
619 {
620 vector transform[4];
621 vector extents;
622
623 extents[0] = horizontalExtents;
624 extents[1] = playerHeight;
625 extents[2] = horizontalExtents;
626
627 return IsAreaAtDoorFree( currentSeat, maxAllowedObjHeight, extents, transform );
628 }
629
630 Shape DebugFreeAreaAtDoor( int currentSeat, float maxAllowedObjHeight = 0.5, float horizontalExtents = 0.5, float playerHeight = 1.7 )
631 {
632 int color = ARGB(20, 0, 255, 0);
633
634 vector transform[4];
635 vector extents;
636
637 extents[0] = horizontalExtents;
638 extents[1] = playerHeight;
639 extents[2] = horizontalExtents;
640
641 if (!IsAreaAtDoorFree( currentSeat, maxAllowedObjHeight, extents, transform ))
642 {
643 color = ARGB(20, 255, 0, 0);
644 }
645
646 Shape shape = Debug.DrawBox(-extents * 0.5, extents * 0.5, color);
647 shape.SetMatrix(transform);
648 return shape;
649 }
650};
651
653{
657
658 void SetData(vector localPos, IEntity other, float impulse)
659 {
660 m_LocalPos = localPos;
661 m_Other = other;
662 m_Impulse = impulse;
663 }
664};
665
667{
668 bool m_bIsAction = false;
670
673
674#ifdef DIAG_DEVELOPER
675 private ref array<Shape> m_DebugShapes;
676 private bool m_bIsDebug;
677
679 {
680 m_DebugShapes = new array<Shape>();
681 }
682
684 {
685 Reset();
686 }
687
688 void Reset(bool isDebug = false)
689 {
690 foreach (Shape shape : m_DebugShapes)
691 {
692 shape.Destroy();
693 }
694
695 m_DebugShapes.Clear();
696
697 m_bIsDebug = isDebug;
698 }
699
700 void AddShape(Shape shape)
701 {
702 m_DebugShapes.Insert(shape);
703 }
704
705 bool IsDebug()
706 {
707 return m_bIsDebug;
708 }
709#endif
710
711 [Obsolete("no replacement")]
713};
Param4< int, int, string, int > TSelectableActionInfoWithColor
Определения 3_Game/Entities/EntityAI.c:97
void Reset()
PhxInteractionLayers
Определения DayZPhysics.c:2
EActions
Определения EActions.c:2
ECrewMemberState
Определения ECrewMemberState.c:3
DiagMenuIDs
Определения EDiagMenuIDs.c:2
EMeleeTargetType
Определения EMeleeTargetType.c:2
ETransformationAxis
Определения ETransformationAxis.c:2
class BoxCollidingParams component
ComponentInfo for BoxCollidingResult.
SurfaceDetectionType
Определения SurfaceInfo.c:66
proto native float GetWaterDepth(vector posWS)
proto native void GizmoSelectObject(Object object)
proto native bool IsBoxColliding(vector center, vector orientation, vector edgeLength, array< Object > excludeObjects, array< Object > collidedObjects=NULL)
Finds all objects that are in choosen oriented bounding box (OBB)
proto native void GizmoSelectPhysics(Physics physics)
proto native bool GetSurface(SurfaceDetectionParameters params, SurfaceDetectionResult result)
API for surface detection.
Super root of all classes in Enforce script.
Определения EnScript.c:11
Определения EnPhysics.c:326
static Shape DrawBox(vector pos1, vector pos2, int color=0x1fff7f7f)
Определения 3_Game/tools/Debug.c:286
Определения 3_Game/tools/Debug.c:2
Определения EnDebug.c:241
bool CanReachSeatFromSeat(int currentSeat, int nextSeat)
Определения Transport.c:443
ref TIntArray m_InteractActions
Определения 3_Game/Entities/Building.c:234
vector m_fuelPos
Определения Transport.c:61
ref TIntArray m_SingleUseActions
Определения Transport.c:56
override bool IsHealthVisible()
Определения Transport.c:224
override void EEHitBy(TotalDamageResult damageResult, int damageType, EntityAI source, int component, string dmgZone, string ammo, vector modelPos, float speedCoef)
Определения Transport.c:79
int GetAnimInstance()
Определения Transport.c:406
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 OnDriverEnter(Human player)
Определения Transport.c:150
bool DetectFlippedUsingSurface(VehicleFlippedContext ctx, float angleTolerance)
Определения Transport.c:283
float GetActionDistanceFuel()
Определения Transport.c:259
bool DetectFlipped(VehicleFlippedContext ctx)
Override based on vehicle implementation (Car, Boat, modded, etc.)
Определения Transport.c:359
string GetVehicleType()
Определения Transport.c:249
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:229
bool m_EngineZoneReceivedHit
Определения Transport.c:60
bool IsActionFlipped(Man player)
Don't override, may change to native for caching 'DetectFlipped' in the future based on active-ness (...
Определения Transport.c:374
override int GetHideIconMask()
Определения Transport.c:234
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/Entities/Man.c:39
proto native Human CrewGetOut(int posIdx)
Performs transfer of player from vehicle into world from given position.
float GetTransportCameraDistance()
Определения Transport.c:393
override int GetMeleeTargetType()
Определения Transport.c:86
override event GetOwnerStateType()
Определения Transport.c:92
void OnContact(string zoneName, vector localPos, IEntity other, Contact data)
Определения Transport.c:196
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:520
proto native int CrewPositionIndex(int componentIdx)
proto native int CrewMemberIndex(Human player)
float GetMomentum()
Определения Transport.c:239
bool IsAreaAtDoorFree(int currentSeat, float maxAllowedObjHeight, inout vector extents, out vector transform[4])
Определения Transport.c:573
override bool IsTransport()
Определения Transport.c:214
proto native Human CrewDriver()
string GetActionCompNameFuel()
Определения Transport.c:254
VehicleFlippedContext GetFlipContext()
Определения Transport.c:269
override bool OnAction(int action_id, Man player, ParamsReadContext ctx)
Определения Transport.c:542
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:183
void OnUpdate(float dt)
Определения Transport.c:212
bool IsAnyCrewPresent()
Определения Transport.c:382
override event GetMoveType()
Определения Transport.c:98
void OnInput(float dt)
Определения Transport.c:206
proto void CrewTransformWS(int posIdx, out vector mat[4])
Returns crew transformation indside vehicle in world space.
vector GetTransportCameraOffset()
Определения Transport.c:401
proto native int CrewSize()
Returns crew capacity of this vehicle.
bool CrewCanGetThrough(int posIdx)
Определения Transport.c:434
int GetSeatIndexFromDoor(string pDoorSelection)
Определения Transport.c:470
bool IsFlipped()
Don't override, may change to native for caching 'DetectFlipped' in the future based on active-ness (...
Определения Transport.c:365
proto native void CrewGetIn(Human player, int posIdx)
Performs transfer of player from world into vehicle on given position.
ref TIntArray m_ContinuousActions
Определения Transport.c:57
static ref VehicleFlippedContext m_FlippedContext
Shared context across all vehicles for flipping.
Определения Transport.c:54
Shape DebugFreeAreaAtDoor(int currentSeat, float maxAllowedObjHeight=0.5, float horizontalExtents=0.5, float playerHeight=1.7)
Определения Transport.c:630
int GetSeatAnimationType(int posIdx)
Определения Transport.c:416
bool IsAreaAtDoorFree(int currentSeat, float maxAllowedObjHeight=0.5, float horizontalExtents=0.5, float playerHeight=1.7)
Определения Transport.c:618
bool HasEngineZoneReceivedHit()
Определения Transport.c:526
int Get3rdPersonCameraType()
Определения Transport.c:424
ref set< int > m_DeadCrewMemberIndices
Определения Transport.c:64
void Transport()
Определения Transport.c:66
override void GetDebugActions(out TSelectableActionInfoArrayEx outputList)
Определения Transport.c:531
void MarkCrewMemberDead(int crewMemberIndex)
bool IsVitalSparkPlug()
Определения Transport.c:244
override bool IsIgnoredByConstruction()
Определения Transport.c:219
bool CanReachDoorsFromSeat(string pDoorsSelection, int pCurrentSeat)
Определения Transport.c:461
bool CanReachSeatFromDoors(string pSeatSelection, vector pFromPos, float pDistance=1.0)
Определения Transport.c:452
ref set< int > m_UnconsciousCrewMemberIndices
Определения Transport.c:63
proto native void CrewDeath(int posIdx)
Handles death of player in vehicle and awakes its physics if needed.
vector GetRefillPointPosWS()
Определения Transport.c:264
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:156
bool IsIgnoredObject(Object o)
Определения Transport.c:491
proto native Transport GetTransport()
Определения human.c:690
Определения 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:117
Native class for boats - handles physics simulation.
Определения Boat.c:28
void SetData(vector localPos, IEntity other, float impulse)
Определения Transport.c:658
IEntity m_Other
Определения Transport.c:655
vector m_LocalPos
Определения Transport.c:654
float m_Impulse
Определения Transport.c:656
Определения Transport.c:653
Man m_ActionPlayer
Определения Transport.c:669
ref SurfaceDetectionParameters m_SurfaceParams
Определения Transport.c:671
void HandleByCrewMemberState(ECrewMemberState state)
bool m_bIsAction
Определения Transport.c:668
ref SurfaceDetectionResult m_SurfaceResult
Определения Transport.c:672
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:271
static const vector Zero
Определения EnConvert.c:110
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:220
proto void RotationMatrixFromAngles(out vector mat[3])
Creates rotation matrix from angles.
static const vector Up
Определения EnConvert.c:107
Определения EnConvert.c:106
proto native float Random01()
Random number in range of <0,1> - !!! use this only during deterministic simulation (CommandHandler)
Serializer ParamsReadContext
Определения gameplay.c:15
proto native CGame GetGame()
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:711
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/constants.c:454
int ARGB(int a, int r, int g, int b)
Определения proto.c:322