DayZ 1.30
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
TrapBase.c
См. документацию.
2{
4}
5
6class TrapBase extends ItemBase
7{
8 #ifdef SERVER
9 protected const int SPAWN_FLAGS = ECE_CREATEPHYSICS;
10 #else
11 protected const int SPAWN_FLAGS = ECE_LOCAL;
12 #endif
13
14 protected const int DAMAGE_TRIGGER_MINE = 75;
15 protected const float UPDATE_TIMER_INTERVAL = 0.05;
16
17 float m_InitWaitTime; //After this time after deployment, the trap is activated
18 bool m_NeedActivation; //If activation of trap is needed
19 float m_DefectRate; //Added damage after trap activation
20 float m_DamagePlayers; //How much damage player gets when caught
21 float m_DamageOthers; //How much damage player gets when caught
22
23 bool m_AddActivationDefect; // Damage trap after activation
24 bool m_AddDeactivationDefect; // Damage trap after deactivation
25 protected bool m_IsActive; // True means that the trap is ready to detonate
26 protected bool m_IsInProgress;
27
28 protected bool m_Disarmed = false;
29
31
35
41
42 protected ref Timer m_Timer;
43 protected ref Timer m_UpdateTimer;
45
47
48 protected bool m_IsFalling = false;
49 protected bool m_FallTriggered = false;
50
51 void TrapBase()
52 {
53 m_IsInProgress = false;
54 m_NeedActivation = true;
55 m_InitWaitTime = 5; //After this time after deployment, the trap is activated
56 m_DefectRate = 15; //Added damage after trap activation
57 m_DamagePlayers = 25; //How much damage player gets when caught
58 m_DamageOthers = 100; //How much damage others gets when caught
59
62
64
68
69 m_InfoSetup = "#STR_TrapBase0";
70 m_InfoDeactivated = "#STR_TrapBase1";
71 m_InfoDamageManipulation = "#STR_TrapBase2";
72 m_InfoDamage = "#STR_TrapBase3";
73 m_InfoActivationTime = "#STR_TrapBase4" + m_InitWaitTime.ToString() + "#STR_TrapBase5";
74
75 m_UpdateTimer = new Timer();
76
77 RegisterNetSyncVariableBool("m_IsActive");
78 RegisterNetSyncVariableBool("m_IsInProgress");
79 RegisterNetSyncVariableBoolSignal("m_FallTriggered"); // one-shot signal to clients for visuall effect
80 }
81
82 void OnUpdate(EntityAI victim);
83
88
91 {
92 super.OnVariablesSynchronized();
93
94 if (g_Game.IsMultiplayer())
95 {
97 SetActive();
98
100 StartActivate(null);
101 }
102
103 if (m_FallTriggered && !g_Game.IsDedicatedServer())
104 {
106 }
107 }
108
109 override void EEDelete(EntityAI parent)
110 {
111 super.EEDelete(parent);
112
113 if (g_Game && m_TrapTrigger)
114 {
115 g_Game.ObjectDelete(m_TrapTrigger);
116 m_TrapTrigger = null;
117 }
118 }
119
121 {
122 super.OnStoreSave(ctx);
123
124 ctx.Write(m_IsActive);
126 }
127
128 //----------------------------------------------------------------
129 override bool OnStoreLoad(ParamsReadContext ctx, int version)
130 {
131 if ( !super.OnStoreLoad(ctx, version) )
132 return false;
133
134 bool b_is_active = false;
135 if ( !ctx.Read( b_is_active ) )
136 b_is_active = false;
137
138 bool b_is_in_progress = false;
139 if ( !ctx.Read( b_is_in_progress ) )
140 b_is_in_progress = false;
141
142 if ( b_is_active )
143 {
144 SetActive();
145 }
146
147 if (b_is_in_progress && !b_is_active)
148 {
149 StartActivate(null);
150 }
151
152 return true;
153 }
154
155 bool IsActive()
156 {
157 return m_IsActive && m_IsInProgress == false && GetHierarchyRootPlayer() == null;
158 }
159
161 {
162 return !IsActive() && m_IsInProgress == false && GetHierarchyRootPlayer() == null;
163 }
164
165 // trap cannot be taken when is activated
166 override bool IsTakeable()
167 {
168 if ( m_IsInProgress == false && !IsActive() )
169 {
170 return true;
171 }
172
173 return false;
174 }
175
177 {
178 return !IsActive() && GetHierarchyRootPlayer() == null && GetHierarchyParent() == null && m_IsInProgress == false && !IsRuined() && m_NeedActivation;
179 }
180
182 {
183 if ( GetHierarchyRootPlayer() != null && GetHierarchyRootPlayer().GetEntityInHands() == this )
184 {
185 PlayerBase player = PlayerBase.Cast( GetHierarchyRootPlayer() );
186
187 vector player_pos = player.GetPosition();
188 vector aim_pos = player.GetAimPosition();
189
190 if ( vector.DistanceSq( player_pos, aim_pos ) <= ( Math.SqrFloat( 1.5 ) ) )
191 {
192 return IsPlaceableAtPosition( aim_pos );
193 }
194 }
195
196 return false;
197 }
198
200 {
201 if ( position[1] < g_Game.SurfaceGetSeaLevelMax() + 0.03 )
202 {
203 return false;
204 }
205 else if ( g_Game.SurfaceIsPond( position[0], position[2] ) )
206 {
207 return false;
208 }
209
210 return true;
211 }
212
213 void Disarm()
214 {
215 SetInactive(false);
216 RefreshState();
217 g_Game.RPCSingleParam(this, ERPCs.RPC_TRAP_DISARM, null, true);
218
219 OnDisarm();
220 }
221
223 void OnDisarm();
224
226 {
227 if ( g_Game.IsServer() )
228 {
229 if ( m_Timer )
230 {
231 m_Timer.Stop();
232 }
233
234 RefreshState();
235
236 if (m_DamagePlayers > 0)
237 {
238 if (victim)
239 {
240 if ( victim.IsInherited(SurvivorBase))
241 {
242 victim.DecreaseHealth("", "", m_DamagePlayers);
243 }
244 else if (victim.IsInherited(DayZCreatureAI))
245 {
246 victim.DecreaseHealth("", "", m_DamageOthers);
247 }
248 else if (victim.IsInherited(ItemBase))
249 {
250 ItemBase victim_item = ItemBase.Cast(victim);
251 float damage_coef = 1;
252
253 if (victim_item.HasQuantity() && victim_item.GetQuantityMax() != 0 && victim_item.GetQuantity() > 0)
254 {
255 damage_coef = victim_item.GetQuantityMax() / victim_item.GetQuantity(); // Lower quantity increases damage exposure
256 }
257
258 if (damage_coef > 0)
259 {
260 int item_size_x = 1;
261 int item_size_y = 1;
262 g_Game.GetInventoryItemSize(victim_item, item_size_x, item_size_y);
263
264 float add_damage = 300 * damage_coef / Math.Clamp(item_size_x * item_size_y, 1, int.MAX);
265 victim_item.DecreaseHealth("", "", add_damage);
266 }
267 }
268 }
269 }
270
271 Synch(victim);
272 }
273
274 OnSteppedOn(victim);
275 }
276
278 {
279 OnSteppedOut(victim);
280 }
281
283 {
284 SetInactive(false);
285 }
286
287 void OnSteppedOut(EntityAI victim);
288
289 // Synchronizes states
290 protected void Synch(EntityAI victim)
291 {
292 if (g_Game.IsServer())
293 {
294 if (victim && !victim.GetAllowDamage())
295 return;
296
297 Param1<EntityAI> p = new Param1<EntityAI>(victim);
298 g_Game.RPCSingleParam(this, ERPCs.RPC_TRAP_VICTIM, p, true);
299 }
300
301 }
302
303 // On server -> client synchronization
304 override void OnRPC(PlayerIdentity sender, int rpc_type, ParamsReadContext ctx)
305 {
306 super.OnRPC(sender, rpc_type, ctx);
307
308 if ( !g_Game.IsDedicatedServer() )
309 {
310 switch (rpc_type)
311 {
312 case ERPCs.RPC_TRAP_VICTIM:
313 Param1<EntityAI> victim = new Param1<EntityAI>(null);
314
315 if (ctx.Read(victim))
316 {
317 if (victim.param1)
318 SnapOnObject(victim.param1);
319 }
320
321 break;
322
323 case ERPCs.RPC_TRAP_DISARM:
324 OnDisarm();
325 break;
326 }
327 }
328 }
329
331 {
333 {
334 return;
335 }
336
337 if ( g_Game.IsServer() )
338 {
339 // item is owned by player
340 if ( GetHierarchyRootPlayer() != NULL && m_AnimationPhaseGrounded != "" )
341 {
342 SetAnimationPhase( m_AnimationPhaseSet, 1 );
344 {
345 SetAnimationPhase( m_AnimationPhaseTriggered, 1 );
346 }
347 SetAnimationPhase( m_AnimationPhaseGrounded, 0 );
348 }
349 // item is set active
350 else if ( IsActive() )
351 {
352 if ( m_AnimationPhaseGrounded != "" )
353 {
354 SetAnimationPhase( m_AnimationPhaseGrounded, 1 );
355 }
357 {
358 SetAnimationPhase( m_AnimationPhaseTriggered, 1 );
359 SetAnimationPhase( m_AnimationPhaseSet, 0 );
360 }
361 }
362 // item is inactive and not owned by player (on the ground)
363 else if ( IsInactive() )
364 {
366 {
367 SetAnimationPhase( m_AnimationPhaseGrounded, 1 );
368 }
370 {
371 SetAnimationPhase( m_AnimationPhaseSet, 1 );
372 SetAnimationPhase( m_AnimationPhaseTriggered, 0 );
373 }
374 }
375 }
376 }
377
379 {
380 if (g_Game.IsServer())
381 {
382 if (GetHierarchyRootPlayer() && GetHierarchyRootPlayer().CanDropEntity(this))
383 SetupTrapPlayer(PlayerBase.Cast(GetHierarchyRootPlayer()));
384 }
385 }
386
387 void SetupTrapPlayer( PlayerBase player, bool set_position = true )
388 {
389 if (g_Game.IsServer())
390 {
391 if (set_position)
392 {
393 player.LocalDropEntity(this);
394
395 vector trapPos = player.GetDirection() * 1.5;
396 trapPos[1] = 0;
397 SetPosition(player.GetPosition() + trapPos);
398 }
399
400 if (m_NeedActivation == false)
401 SetActive();
402 }
403 }
404
406 {
407 if ( g_Game.IsServer() )
408 {
409 DecreaseHealth( "", "", m_DefectRate );
410 }
411 }
412
414 {
416
417 m_IsInProgress = false;
418 m_IsActive = true;
419
421 {
422 AddDefect();
423 }
424
425 if (g_Game.IsServer())
426 {
428 RefreshState();
429 SetSynchDirty();
430 }
431
432 OnActivate();
433 }
434
435 void OnActivate();
436
438 {
439 if (g_Game.IsServer())
440 {
442 HideSelection("safety_pin");
443
444 if (m_InitWaitTime > 0)
445 {
446 m_IsInProgress = true;
447 m_Timer.Run(m_InitWaitTime, this, "SetActive");
448
449 SetSynchDirty();
450 }
451 else
452 SetActive();
453 }
454 }
455
456 void StartDeactivate(PlayerBase player);
457
458 void SetInactive(bool stop_timer = true)
459 {
461
462 m_IsActive = false;
463 if (m_Timer && stop_timer)
464 m_Timer.Stop();
465
467 AddDefect();
468
469 SetSynchDirty();
471 RefreshState();
472 }
473
475 {
476 if (Class.CastTo(m_TrapTrigger, g_Game.CreateObjectEx("TrapTrigger", GetPosition(), SPAWN_FLAGS)))
477 {
478 vector mins = "-0.01 -0.05 -0.01";
479 vector maxs = "0.01 0.5 0.01";
480 m_TrapTrigger.SetOrientation(GetOrientation());
481 m_TrapTrigger.SetExtents(mins, maxs);
482 m_TrapTrigger.SetParentObject(this);
484 }
485 }
486
488 {
489 if (m_TrapTrigger)
490 {
491 m_TrapTrigger.SetParentObject(null);
492 m_TrapTrigger.DeleteSafe();
493 }
494 }
495
497 {
498 if (m_TrapTrigger)
499 m_TrapTrigger.SetEnabled();
500 }
501
502 override void OnItemLocationChanged(EntityAI old_owner, EntityAI new_owner)
503 {
504 super.OnItemLocationChanged(old_owner, new_owner);
505
506 if (g_Game.IsServer())
507 {
508 RefreshState();
509
510 // TAKE ACTIVE TRAP FROM VICINITY
511 if (old_owner == NULL && new_owner != NULL && IsActive())
512 {
513 // TAKE INTO HANDS
514 if ( new_owner.IsPlayer() )
515 {
516 SnapOnObject(new_owner);
517 }
518 else if (new_owner.GetHierarchyRootPlayer())
519 {
520 SnapOnObject(new_owner.GetHierarchyRootPlayer());
521 }
522 }
523 }
524
525 }
526
527 override void EEItemAttached(EntityAI item, string slot_name)
528 {
529 super.EEItemAttached(item, slot_name);
530
531 if (g_Game.IsServer())
532 RefreshState();
533 }
534
535 override void EEItemDetached(EntityAI item, string slot_name)
536 {
537 super.EEItemDetached(item, slot_name);
538
539 if (g_Game.IsServer())
540 RefreshState();
541 }
542
543 override void OnPlacementComplete(Man player, vector position = "0 0 0", vector orientation = "0 0 0")
544 {
545 super.OnPlacementComplete(player, position, orientation);
546
547 if (g_Game.IsServer())
548 {
549 SetOrientation(orientation);
551 PlaceOnSurface();
552 SetSynchDirty();
553 }
554 }
555
556 override bool CanPutInCargo( EntityAI parent )
557 {
558 if ( !super.CanPutInCargo(parent) )
559 {
560 return false;
561 }
562
563 return IsTakeable();
564 }
565
566 override bool CanPutIntoHands( EntityAI parent )
567 {
568 if ( !super.CanPutIntoHands( parent ) )
569 {
570 return false;
571 }
572
573 return IsTakeable();
574 }
575
576 override bool CanRemoveFromHands( EntityAI parent )
577 {
578 return IsTakeable();
579 }
580
581 override bool CanBePlaced( Man player, vector position )
582 {
584 }
585
588 {
589 return true;
590 }
591
592 //Set if trap can be disarmed using trap-specific action
594 {
595 return false;
596 }
597
599 void SetDisarmed( bool disarmed )
600 {
601 m_Disarmed = disarmed;
602 }
603
606 {
607 return m_Disarmed;
608 }
609
610 //================================================================
611 // ADVANCED PLACEMENT
612 //================================================================
613
614 override void SetActions()
615 {
616 super.SetActions();
617
619 }
620
621 // HELPERS
623 {
625 vector trapPosXZ = GetPosition();
626 trapPosXZ[1] = 0;
627
628 GameInventory inv = victim.GetInventory();
629 for (int i = 0; i < inv.AttachmentCount(); i++)
630 {
632 EntityAI wheelEntity = inv.GetAttachmentFromIndex(i);
633 if (wheelEntity && wheelEntity.Type() == CarWheel_Ruined)
634 {
635 continue;
636 }
637
639 int slotId;
640 string slotName;
641 wheelEntity.GetInventory().GetCurrentAttachmentSlotInfo(slotId, slotName);
642 slotName.ToLower();
643 if (slotName.Contains("spare"))
644 {
645 continue
646 }
647
649 if (wheelEntity && wheelEntity.IsInherited(CarWheel))
650 {
651 vector entPosXZ = wheelEntity.GetPosition();
652 entPosXZ[1] = 0;
653 if (vector.Distance(trapPosXZ, entPosXZ) < 1)
654 {
655 return wheelEntity;
656 }
657 }
658 }
659
660 return null;
661 }
662
663 protected void DamageClothing(PlayerBase player)
664 {
665 //Array used to find all relevant information about currently equipped clothes
666 array<ClothingBase> equippedClothes = new array<ClothingBase>;
667
668 equippedClothes.Insert(ClothingBase.Cast(player.GetItemOnSlot("LEGS")));
669 equippedClothes.Insert(ClothingBase.Cast(player.GetItemOnSlot("BACK")));
670 equippedClothes.Insert(ClothingBase.Cast(player.GetItemOnSlot("VEST")));
671 equippedClothes.Insert(ClothingBase.Cast(player.GetItemOnSlot("HeadGear")));
672 equippedClothes.Insert(ClothingBase.Cast(player.GetItemOnSlot("Mask")));
673 equippedClothes.Insert(ClothingBase.Cast(player.GetItemOnSlot("BODY")));
674 equippedClothes.Insert(ClothingBase.Cast(player.GetItemOnSlot("FEET")));
675 equippedClothes.Insert(ClothingBase.Cast(player.GetItemOnSlot("GLOVES")));
676
677 //Damage all currently equipped clothes
678 for (int i = 0; i < equippedClothes.Count(); i++)
679 {
680 //If no item is equipped on slot, slot is ignored
681 if (equippedClothes[i] == null)
682 {
683 continue;
684 }
685
686 equippedClothes[i].DecreaseHealth(m_ClothingDmg[i], false);
687 }
688 }
689
690 override void OnItemFallRebuilding()
691 {
692 if (!g_Game.IsServer() || m_IsFalling)
693 return;
694
695 m_IsFalling = true;
696 }
697
699 override void EOnContact(IEntity other, Contact extra)
700 {
701 if (!g_Game.IsServer() || !m_IsFalling || m_FallTriggered)
702 return;
703
704 if (m_IsActive)
705 {
706 OnTriggeredByFall(extra);
707 }
708
709 m_FallTriggered = true;
710 }
711
713 protected void OnTriggeredByFall(Contact extra)
714 {
715 if (!g_Game.IsServer() || !m_IsFalling)
716 return;
717
718 SetInactive(true);
719
720 g_Game.GetCallQueue(CALL_CATEGORY_SYSTEM).CallLater(ClearIsFalling, 800);
721 }
722
723 protected void ClearIsFalling()
724 {
725 m_IsFalling = false;
726 }
727
729 protected void OnTriggeredByFallEffectsClient();
730
732 protected ref EffectSound m_DeployLoopSound; //DEPRECATED in favor of m_DeployLoopSoundEx
733
736}
class LogManager EntityAI
ActionActivateTrapCB ActionContinuousBaseCB ActionActivateTrap()
Определения ActionActivateTrap.c:18
void OnItemLocationChanged(ItemBase item)
Определения ActionBase.c:1048
void AddAction(typename actionName)
Определения AdvancedCommunication.c:220
vector GetOrientation()
Определения AreaDamageManager.c:306
override void EEItemDetached(EntityAI item, string slot_name)
Определения BaseBuildingBase.c:1812
override void OnItemFallRebuilding()
@Note for modders: This method and is subject to change!
Определения BaseBuildingBase.c:2470
override void EEItemAttached(EntityAI item, string slot_name)
Определения BaseBuildingBase.c:1803
void OnRPC(PlayerIdentity sender, int rpcType, ParamsReadContext ctx)
Определения BunkerBroadcastComponent.c:182
bool m_IsActive
Определения BunkerBroadcastComponent.c:157
bool IsActive()
Определения BunkerBroadcastComponent.c:255
const int ECE_LOCAL
Определения CentralEconomy.c:25
const int ECE_CREATEPHYSICS
Определения CentralEconomy.c:17
PlayerSpawnPreset slotName
void Disarm()
Определения ClockBase.c:199
bool OnStoreLoad(ParamsReadContext ctx, int version)
Определения CodeLockComponent.c:264
void OnStoreSave(ParamsWriteContext ctx)
Определения CodeLockComponent.c:257
override void EEDelete(EntityAI parent)
Определения ContaminatedArea.c:61
override void OnVariablesSynchronized()
Определения ContaminatedArea_Dynamic.c:94
DayZGame g_Game
Определения DayZGame.c:4074
ref Timer m_Timer
Определения DayZGame.c:723
vector position
Определения DustKickupEffects.c:20
vector orientation
Определения DustKickupEffects.c:21
ERPCs
Определения ERPCs.c:2
const int MAX
Определения EnConvert.c:27
override bool CanPutInCargo(EntityAI parent)
Определения ExplosivesBase.c:259
override bool CanPutIntoHands(EntityAI parent)
Определения ExplosivesBase.c:269
override bool IsTakeable()
Определения ExplosivesBase.c:209
override bool CanRemoveFromHands(EntityAI parent)
Определения ExplosivesBase.c:279
override bool CanBePlaced(Man player, vector position)
Определения FireplaceBase.c:2604
override void EOnContact(IEntity other, Contact extra)
Определения ItemBase.c:1119
ref Timer m_UpdateTimer
Определения RadialMenu.c:20
string m_AnimationPhaseTriggered
Определения TrapBase.c:34
float m_DefectRate
Определения TrapBase.c:19
bool m_IsFalling
Определения TrapBase.c:48
void DeferredEnableTrigger()
Определения TrapBase.c:496
string m_InfoDamageManipulation
Определения TrapBase.c:38
bool m_WasActivatedOrDeactivated
DEPRECATED Used for explosive traps to prevent detonation after destroying through disarm action.
Определения TrapBase.c:30
ref array< int > m_ClothingDmg
Определения TrapBase.c:46
bool IsActivable()
Определения TrapBase.c:176
TrapTrigger GetTrapTrigger()
Определения TrapBase.c:84
enum SoundTypeTrap SPAWN_FLAGS
void PlayDeployLoopSound()
void StopDeployLoopSound()
DEPRECATED.
void Synch(EntityAI victim)
keeping "step" here for consistency only
Определения TrapBase.c:290
string m_AnimationPhaseGrounded
Определения TrapBase.c:32
const float UPDATE_TIMER_INTERVAL
Определения TrapBase.c:15
void AddDefect()
Определения TrapBase.c:405
void RefreshState()
Определения TrapBase.c:330
void RemoveFromObject(EntityAI victim)
Определения TrapBase.c:277
void SetActive()
Определения TrapBase.c:413
bool m_FallTriggered
Определения TrapBase.c:49
bool m_NeedActivation
Определения TrapBase.c:18
void SetupTrap()
Определения TrapBase.c:378
ref EffectSound m_DeployLoopSound
DEPRECATED.
Определения TrapBase.c:732
const int DAMAGE_TRIGGER_MINE
Определения TrapBase.c:14
bool m_Disarmed
Определения TrapBase.c:28
EntityAI GetClosestCarWheel(EntityAI victim)
Определения TrapBase.c:622
string m_InfoActivationTime
Определения TrapBase.c:40
string m_AnimationPhaseSet
Определения TrapBase.c:33
bool m_IsInProgress
Определения TrapBase.c:26
bool IsInactive()
Определения TrapBase.c:160
void SnapOnObject(EntityAI victim)
Определения TrapBase.c:225
string m_InfoSetup
Определения TrapBase.c:36
void SetInactive(bool stop_timer=true)
Определения TrapBase.c:458
bool IsPlaceable()
Определения TrapBase.c:181
float m_InitWaitTime
Определения TrapBase.c:17
void DamageClothing(PlayerBase player)
Определения TrapBase.c:663
SoundTypeTrap
Определения TrapBase.c:2
@ ACTIVATING
Определения TrapBase.c:3
bool CanBeClapped()
DEPRECATED Set if trap can be disarmed using ActionClapBearTrapWithThisItem.
Определения TrapBase.c:587
TrapTrigger m_TrapTrigger
Определения TrapBase.c:44
string m_InfoDeactivated
Определения TrapBase.c:37
void SetupTrapPlayer(PlayerBase player, bool set_position=true)
Определения TrapBase.c:387
void SetDisarmed(bool disarmed)
DEPRECATED.
Определения TrapBase.c:599
void ClearIsFalling()
Определения TrapBase.c:723
bool GetDisarmed()
DEPRECATED.
Определения TrapBase.c:605
float m_DamagePlayers
Определения TrapBase.c:20
void TrapBase()
Определения TrapBase.c:51
bool IsPlaceableAtPosition(vector position)
Определения TrapBase.c:199
void StartActivate(PlayerBase player)
Определения TrapBase.c:437
string m_InfoDamage
Определения TrapBase.c:39
bool m_AddActivationDefect
Определения TrapBase.c:23
void DeleteTrigger()
Определения TrapBase.c:487
bool m_AddDeactivationDefect
Определения TrapBase.c:24
float m_DamageOthers
Определения TrapBase.c:21
void StartDeactivate(PlayerBase player)
Определения Trap_TripWire.c:210
Super root of all classes in Enforce script.
Определения EnScript.c:11
Определения DallasMask.c:2
Определения Contact.c:10
do not process rotations !
Определения DayZAnimal.c:656
Wrapper class for managing sound through SEffectManager.
Определения EffectSound.c:5
proto native EntityAI GetAttachmentFromIndex(int index)
proto native int AttachmentCount()
Returns count of attachments attached to this item.
script counterpart to engine's class Inventory
Определения EnEntity.c:165
Определения EnMath.c:7
Определения PlayerBaseClient.c:2
The class that will be instanced (moddable)
Определения gameplay.c:389
proto bool Write(void value_out)
proto bool Read(void value_in)
Определения SurvivorBase.c:7
Определения DayZPlayerImplement.c:39
override void OnSteppedOn(EntityAI victim)
Определения Trap_Bear.c:67
override void CreateTrigger()
Определения Trap_Bear.c:43
override void OnActivate()
Определения Trap_Bear.c:210
override void OnDisarm()
Определения Trap_Bear.c:219
override void OnTriggeredByFallEffectsClient()
Определения Trap_Bear.c:267
override void OnPlacementComplete(Man player, vector position="0 0 0", vector orientation="0 0 0")
Определения Trap_Bear.c:232
override bool CanBeDisarmed()
Определения Trap_Bear.c:25
override void SetActions()
Определения Trap_Bear.c:253
override void OnSteppedOut(EntityAI victim)
Определения Trap_Bear.c:125
override void OnTriggeredByFall(Contact extra)
Определения Trap_Bear.c:262
Определения Trap_Bear.c:2
Trigger used by traps.
Определения TrapTrigger.c:3
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
static proto native float DistanceSq(vector v1, vector v2)
Returns the square distance between tips of two 3D vectors.
static proto native float Distance(vector v1, vector v2)
Returns the distance between tips of two 3D vectors.
Определения EnConvert.c:119
Serializer ParamsReadContext
Определения gameplay.c:15
Serializer ParamsWriteContext
Определения gameplay.c:16
proto native void SetPosition(vector position)
Set the world position of the Effect.
Определения Effect.c:463
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
static proto float SqrFloat(float f)
Returns squared value.
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'.
vector GetPosition()
Get the world position of the Effect.
Определения Effect.c:473
proto native void OnUpdate()
Определения 3_Game/DayZ/tools/tools.c:349
const int CALL_CATEGORY_SYSTEM
Определения 3_Game/DayZ/tools/tools.c:8