DayZ 1.27
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 void TrapBase()
49 {
50 m_IsInProgress = false;
51 m_NeedActivation = true;
52 m_InitWaitTime = 5; //After this time after deployment, the trap is activated
53 m_DefectRate = 15; //Added damage after trap activation
54 m_DamagePlayers = 25; //How much damage player gets when caught
55 m_DamageOthers = 100; //How much damage others gets when caught
56
59
61
65
66 m_InfoSetup = "#STR_TrapBase0";
67 m_InfoDeactivated = "#STR_TrapBase1";
68 m_InfoDamageManipulation = "#STR_TrapBase2";
69 m_InfoDamage = "#STR_TrapBase3";
70 m_InfoActivationTime = "#STR_TrapBase4" + m_InitWaitTime.ToString() + "#STR_TrapBase5";
71
72 m_UpdateTimer = new ref Timer();
73
74 RegisterNetSyncVariableBool("m_IsActive");
75 RegisterNetSyncVariableBool("m_IsInProgress");
76 }
77
78 void OnUpdate(EntityAI victim);
79
84
87 {
88 super.OnVariablesSynchronized();
89
90 if (GetGame().IsMultiplayer())
91 {
93 SetActive();
94
96 StartActivate(null);
97 }
98 }
99
100 override void EEDelete(EntityAI parent)
101 {
102 super.EEDelete(parent);
103
104 if (GetGame() && m_TrapTrigger)
105 {
107 m_TrapTrigger = null;
108 }
109 }
110
112 {
113 super.OnStoreSave(ctx);
114
115 ctx.Write(m_IsActive);
117 }
118
119 //----------------------------------------------------------------
120 override bool OnStoreLoad(ParamsReadContext ctx, int version)
121 {
122 if ( !super.OnStoreLoad(ctx, version) )
123 return false;
124
125 bool b_is_active = false;
126 if ( !ctx.Read( b_is_active ) )
127 b_is_active = false;
128
129 bool b_is_in_progress = false;
130 if ( !ctx.Read( b_is_in_progress ) )
131 b_is_in_progress = false;
132
133 if ( b_is_active )
134 {
135 SetActive();
136 }
137
138 if (b_is_in_progress && !b_is_active)
139 {
140 StartActivate(null);
141 }
142
143 return true;
144 }
145
146 bool IsActive()
147 {
148 return m_IsActive && m_IsInProgress == false && GetHierarchyRootPlayer() == null;
149 }
150
152 {
153 return !IsActive() && m_IsInProgress == false && GetHierarchyRootPlayer() == null;
154 }
155
156 // trap cannot be taken when is activated
157 override bool IsTakeable()
158 {
159 if ( m_IsInProgress == false && !IsActive() )
160 {
161 return true;
162 }
163
164 return false;
165 }
166
168 {
169 return !IsActive() && GetHierarchyRootPlayer() == null && GetHierarchyParent() == null && m_IsInProgress == false && !IsRuined() && m_NeedActivation;
170 }
171
173 {
174 if ( GetHierarchyRootPlayer() != null && GetHierarchyRootPlayer().GetHumanInventory().GetEntityInHands() == this )
175 {
176 PlayerBase player = PlayerBase.Cast( GetHierarchyRootPlayer() );
177
178 vector player_pos = player.GetPosition();
179 vector aim_pos = player.GetAimPosition();
180
181 if ( vector.DistanceSq( player_pos, aim_pos ) <= ( Math.SqrFloat( 1.5 ) ) )
182 {
183 return IsPlaceableAtPosition( aim_pos );
184 }
185 }
186
187 return false;
188 }
189
191 {
192 if ( position[1] < g_Game.SurfaceGetSeaLevelMax() + 0.03 )
193 {
194 return false;
195 }
196 else if ( GetGame().SurfaceIsPond( position[0], position[2] ) )
197 {
198 return false;
199 }
200
201 return true;
202 }
203
204 void Disarm()
205 {
206 SetInactive(false);
207 RefreshState();
208 GetGame().RPCSingleParam(this, ERPCs.RPC_TRAP_DISARM, null, true);
209
210 OnDisarm();
211 }
212
214 void OnDisarm();
215
217 {
218 if ( GetGame().IsServer() )
219 {
220 if ( m_Timer )
221 {
222 m_Timer.Stop();
223 }
224
225 RefreshState();
226
227 if (m_DamagePlayers > 0)
228 {
229 if (victim)
230 {
231 if ( victim.IsInherited(SurvivorBase))
232 {
233 victim.DecreaseHealth("", "", m_DamagePlayers);
234 }
235 else if (victim.IsInherited(DayZCreatureAI))
236 {
237 victim.DecreaseHealth("", "", m_DamageOthers);
238 }
239 else if (victim.IsInherited(ItemBase))
240 {
241 ItemBase victim_item = ItemBase.Cast(victim);
242 float damage_coef = 1;
243
244 if (victim_item.HasQuantity() && victim_item.GetQuantityMax() != 0 && victim_item.GetQuantity() > 0)
245 {
246 damage_coef = victim_item.GetQuantityMax() / victim_item.GetQuantity(); // Lower quantity increases damage exposure
247 }
248
249 if (damage_coef > 0)
250 {
251 int item_size_x = 1;
252 int item_size_y = 1;
253 GetGame().GetInventoryItemSize(victim_item, item_size_x, item_size_y);
254
255 float add_damage = 300 * damage_coef / Math.Clamp(item_size_x * item_size_y, 1, int.MAX);
256 victim_item.DecreaseHealth("", "", add_damage);
257 }
258 }
259 }
260 }
261
262 Synch(victim);
263 }
264
265 OnSteppedOn(victim);
266 }
267
269 {
270 OnSteppedOut(victim);
271 }
272
274 {
275 SetInactive(false);
276 }
277
278 void OnSteppedOut(EntityAI victim);
279
280 // Synchronizes states
281 protected void Synch(EntityAI victim)
282 {
283 if (GetGame().IsServer())
284 {
285 if (victim && !victim.GetAllowDamage())
286 return;
287
288 Param1<EntityAI> p = new Param1<EntityAI>(victim);
289 GetGame().RPCSingleParam(this, ERPCs.RPC_TRAP_VICTIM, p, true);
290 }
291
292 }
293
294 // On server -> client synchronization
295 override void OnRPC(PlayerIdentity sender, int rpc_type, ParamsReadContext ctx)
296 {
297 super.OnRPC(sender, rpc_type, ctx);
298
299 if ( !GetGame().IsDedicatedServer() )
300 {
301 switch (rpc_type)
302 {
303 case ERPCs.RPC_TRAP_VICTIM:
304 Param1<EntityAI> victim = new Param1<EntityAI>(null);
305
306 if (ctx.Read(victim))
307 {
308 if (victim.param1)
309 SnapOnObject(victim.param1);
310 }
311
312 break;
313
314 case ERPCs.RPC_TRAP_DISARM:
315 OnDisarm();
316 break;
317
318 case SoundTypeTrap.ACTIVATING:
319
320 Param1<bool> p = new Param1<bool>(false);
321
322 bool isActivating = false;
323 if (ctx.Read(p))
324 isActivating = p.param1;
325
326 break;
327 }
328 }
329 }
330
332 {
334 {
335 return;
336 }
337
338 if ( GetGame().IsServer() )
339 {
340 // item is owned by player
341 if ( GetHierarchyRootPlayer() != NULL && m_AnimationPhaseGrounded != "" )
342 {
343 SetAnimationPhase( m_AnimationPhaseSet, 1 );
345 {
346 SetAnimationPhase( m_AnimationPhaseTriggered, 1 );
347 }
348 SetAnimationPhase( m_AnimationPhaseGrounded, 0 );
349 }
350 // item is set active
351 else if ( IsActive() )
352 {
353 if ( m_AnimationPhaseGrounded != "" )
354 {
355 SetAnimationPhase( m_AnimationPhaseGrounded, 1 );
356 }
358 {
359 SetAnimationPhase( m_AnimationPhaseTriggered, 1 );
360 SetAnimationPhase( m_AnimationPhaseSet, 0 );
361 }
362 }
363 // item is inactive and not owned by player (on the ground)
364 else if ( IsInactive() )
365 {
367 {
368 SetAnimationPhase( m_AnimationPhaseGrounded, 1 );
369 }
371 {
372 SetAnimationPhase( m_AnimationPhaseSet, 1 );
373 SetAnimationPhase( m_AnimationPhaseTriggered, 0 );
374 }
375 }
376 }
377 }
378
380 {
381 if (GetGame().IsServer())
382 {
383 if (GetHierarchyRootPlayer() && GetHierarchyRootPlayer().CanDropEntity(this))
384 SetupTrapPlayer(PlayerBase.Cast(GetHierarchyRootPlayer()));
385 }
386 }
387
388 void SetupTrapPlayer( PlayerBase player, bool set_position = true )
389 {
390 if (GetGame().IsServer())
391 {
392 if (set_position)
393 {
394 player.LocalDropEntity(this);
395
396 vector trapPos = player.GetDirection() * 1.5;
397 trapPos[1] = 0;
398 SetPosition(player.GetPosition() + trapPos);
399 }
400
401 if (m_NeedActivation == false)
402 SetActive();
403 }
404 }
405
407 {
408 if ( GetGame().IsServer() )
409 {
410 DecreaseHealth( "", "", m_DefectRate );
411 }
412 }
413
415 {
417
418 m_IsInProgress = false;
419 m_IsActive = true;
420
422 {
423 AddDefect();
424 }
425
426 if (GetGame().IsServer())
427 {
429 RefreshState();
430 SetSynchDirty();
431 }
432
433 OnActivate();
434 }
435
436 void OnActivate();
437
439 {
440 if (GetGame().IsServer())
441 {
443 HideSelection("safety_pin");
444
445 if (m_InitWaitTime > 0)
446 {
447 m_IsInProgress = true;
448 m_Timer.Run(m_InitWaitTime, this, "SetActive");
449
450 SetSynchDirty();
451 }
452 else
453 SetActive();
454 }
455 }
456
457 void StartDeactivate(PlayerBase player);
458
459 void SetInactive(bool stop_timer = true)
460 {
462
463 m_IsActive = false;
464 if (m_Timer && stop_timer)
465 m_Timer.Stop();
466
468 AddDefect();
469
470 SetSynchDirty();
472 RefreshState();
473 }
474
476 {
477 if (Class.CastTo(m_TrapTrigger, GetGame().CreateObjectEx("TrapTrigger", GetPosition(), SPAWN_FLAGS)))
478 {
479 vector mins = "-0.01 -0.05 -0.01";
480 vector maxs = "0.01 0.5 0.01";
481 m_TrapTrigger.SetOrientation(GetOrientation());
482 m_TrapTrigger.SetExtents(mins, maxs);
483 m_TrapTrigger.SetParentObject(this);
485 }
486 }
487
489 {
490 if (m_TrapTrigger)
491 {
492 m_TrapTrigger.SetParentObject(null);
493 m_TrapTrigger.DeleteSafe();
494 }
495 }
496
498 {
499 if (m_TrapTrigger)
500 m_TrapTrigger.SetEnabled();
501 }
502
503 override void OnItemLocationChanged(EntityAI old_owner, EntityAI new_owner)
504 {
505 super.OnItemLocationChanged(old_owner, new_owner);
506
507 if (GetGame().IsServer())
508 {
509 RefreshState();
510
511 // TAKE ACTIVE TRAP FROM VICINITY
512 if (old_owner == NULL && new_owner != NULL && IsActive())
513 {
514 // TAKE INTO HANDS
515 if ( new_owner.IsPlayer() )
516 {
517 SnapOnObject(new_owner);
518 }
519 else if (new_owner.GetHierarchyRootPlayer())
520 {
521 SnapOnObject(new_owner.GetHierarchyRootPlayer());
522 }
523 }
524 }
525
526 }
527
528 override void EEItemAttached(EntityAI item, string slot_name)
529 {
530 super.EEItemAttached(item, slot_name);
531
532 if (GetGame().IsServer())
533 RefreshState();
534 }
535
536 override void EEItemDetached(EntityAI item, string slot_name)
537 {
538 super.EEItemDetached(item, slot_name);
539
540 if (GetGame().IsServer())
541 RefreshState();
542 }
543
544 override void OnPlacementComplete(Man player, vector position = "0 0 0", vector orientation = "0 0 0")
545 {
546 super.OnPlacementComplete(player, position, orientation);
547
548 if (GetGame().IsServer())
549 {
550 SetOrientation(orientation);
551 SetPosition(position);
552 PlaceOnSurface();
553 SetSynchDirty();
554 }
555 }
556
557 override bool CanPutInCargo( EntityAI parent )
558 {
559 if ( !super.CanPutInCargo(parent) )
560 {
561 return false;
562 }
563
564 return IsTakeable();
565 }
566
567 override bool CanPutIntoHands( EntityAI parent )
568 {
569 if ( !super.CanPutIntoHands( parent ) )
570 {
571 return false;
572 }
573
574 return IsTakeable();
575 }
576
577 override bool CanRemoveFromHands( EntityAI parent )
578 {
579 return IsTakeable();
580 }
581
582 override bool CanBePlaced( Man player, vector position )
583 {
584 return IsPlaceableAtPosition( position );
585 }
586
589 {
590 return true;
591 }
592
593 //Set if trap can be disarmed using trap-specific action
595 {
596 return false;
597 }
598
600 void SetDisarmed( bool disarmed )
601 {
602 m_Disarmed = disarmed;
603 }
604
607 {
608 return m_Disarmed;
609 }
610
611 //================================================================
612 // ADVANCED PLACEMENT
613 //================================================================
614
615 override void SetActions()
616 {
617 super.SetActions();
618
620 }
621
622 // HELPERS
624 {
626 vector trapPosXZ = GetPosition();
627 trapPosXZ[1] = 0;
628
629 GameInventory inv = victim.GetInventory();
630 for (int i = 0; i < inv.AttachmentCount(); i++)
631 {
633 EntityAI wheelEntity = inv.GetAttachmentFromIndex(i);
634 if (wheelEntity && wheelEntity.Type() == CarWheel_Ruined)
635 {
636 continue;
637 }
638
640 int slotId;
641 string slotName;
642 wheelEntity.GetInventory().GetCurrentAttachmentSlotInfo(slotId, slotName);
643 slotName.ToLower();
644 if (slotName.Contains("spare"))
645 {
646 continue
647 }
648
650 if (wheelEntity && wheelEntity.IsInherited(CarWheel))
651 {
652 vector entPosXZ = wheelEntity.GetPosition();
653 entPosXZ[1] = 0;
654 if (vector.Distance(trapPosXZ, entPosXZ) < 1)
655 {
656 return wheelEntity;
657 }
658 }
659 }
660
661 return null;
662 }
663
664 protected void DamageClothing(PlayerBase player)
665 {
666 //Array used to find all relevant information about currently equipped clothes
667 array<ClothingBase> equippedClothes = new array<ClothingBase>;
668
669 equippedClothes.Insert(ClothingBase.Cast(player.GetItemOnSlot("LEGS")));
670 equippedClothes.Insert(ClothingBase.Cast(player.GetItemOnSlot("BACK")));
671 equippedClothes.Insert(ClothingBase.Cast(player.GetItemOnSlot("VEST")));
672 equippedClothes.Insert(ClothingBase.Cast(player.GetItemOnSlot("HeadGear")));
673 equippedClothes.Insert(ClothingBase.Cast(player.GetItemOnSlot("Mask")));
674 equippedClothes.Insert(ClothingBase.Cast(player.GetItemOnSlot("BODY")));
675 equippedClothes.Insert(ClothingBase.Cast(player.GetItemOnSlot("FEET")));
676 equippedClothes.Insert(ClothingBase.Cast(player.GetItemOnSlot("GLOVES")));
677
678 //Damage all currently equipped clothes
679 for (int i = 0; i < equippedClothes.Count(); i++)
680 {
681 //If no item is equipped on slot, slot is ignored
682 if (equippedClothes[i] == null)
683 {
684 continue;
685 }
686
687 equippedClothes[i].DecreaseHealth(m_ClothingDmg[i], false);
688 }
689 }
690
692 protected ref EffectSound m_DeployLoopSound; //DEPRECATED in favor of m_DeployLoopSoundEx
693
696}
class LogManager EntityAI
ActionActivateTrapCB ActionContinuousBaseCB ActionActivateTrap()
Определения ActionActivateTrap.c:18
void AddAction(typename actionName)
Определения AdvancedCommunication.c:220
override void OnVariablesSynchronized()
Определения AnniversaryMusicSource.c:42
vector GetOrientation()
Определения AreaDamageManager.c:306
override void EEItemDetached(EntityAI item, string slot_name)
Определения BaseBuildingBase.c:1827
override void EEItemAttached(EntityAI item, string slot_name)
Определения BaseBuildingBase.c:1818
const int ECE_LOCAL
Определения CentralEconomy.c:24
const int ECE_CREATEPHYSICS
Определения CentralEconomy.c:16
PlayerSpawnPreset slotName
void Disarm()
Определения ClockBase.c:199
override void EEDelete(EntityAI parent)
Определения ContaminatedArea.c:57
DayZGame g_Game
Определения DayZGame.c:3868
ref Timer m_Timer
Определения DayZGame.c:705
ERPCs
Определения ERPCs.c:2
const int MAX
Определения EnConvert.c:27
override bool CanPutInCargo(EntityAI parent)
Определения ExplosivesBase.c:277
override bool CanPutIntoHands(EntityAI parent)
Определения ExplosivesBase.c:287
override bool IsTakeable()
Определения ExplosivesBase.c:227
override bool CanRemoveFromHands(EntityAI parent)
Определения ExplosivesBase.c:297
override bool CanBePlaced(Man player, vector position)
Определения FireplaceBase.c:2569
override void OnItemLocationChanged(EntityAI old_owner, EntityAI new_owner)
Определения ItemBase.c:5983
bool m_IsActive
Определения ModifierBase.c:19
bool IsActive()
Определения ModifierBase.c:130
void OnStoreSave(ParamsWriteContext ctx)
Определения ModifiersManager.c:229
bool OnStoreLoad(ParamsReadContext ctx, int version)
Определения ModifiersManager.c:265
override void OnRPC(ParamsReadContext ctx)
Определения PlayerStatBase.c:69
ref Timer m_UpdateTimer
Определения RadialMenu.c:20
string m_AnimationPhaseTriggered
Определения TrapBase.c:34
float m_DefectRate
Определения TrapBase.c:19
void DeferredEnableTrigger()
Определения TrapBase.c:497
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:167
TrapTrigger GetTrapTrigger()
Определения TrapBase.c:80
enum SoundTypeTrap SPAWN_FLAGS
void PlayDeployLoopSound()
void StopDeployLoopSound()
DEPRECATED.
void Synch(EntityAI victim)
keeping "step" here for consistency only
Определения TrapBase.c:281
string m_AnimationPhaseGrounded
Определения TrapBase.c:32
const float UPDATE_TIMER_INTERVAL
Определения TrapBase.c:15
void AddDefect()
Определения TrapBase.c:406
void RefreshState()
Определения TrapBase.c:331
void RemoveFromObject(EntityAI victim)
Определения TrapBase.c:268
void SetActive()
Определения TrapBase.c:414
bool m_NeedActivation
Определения TrapBase.c:18
void SetupTrap()
Определения TrapBase.c:379
ref EffectSound m_DeployLoopSound
DEPRECATED.
Определения TrapBase.c:692
const int DAMAGE_TRIGGER_MINE
Определения TrapBase.c:14
bool m_Disarmed
Определения TrapBase.c:28
EntityAI GetClosestCarWheel(EntityAI victim)
Определения TrapBase.c:623
string m_InfoActivationTime
Определения TrapBase.c:40
string m_AnimationPhaseSet
Определения TrapBase.c:33
bool m_IsInProgress
Определения TrapBase.c:26
bool IsInactive()
Определения TrapBase.c:151
void SnapOnObject(EntityAI victim)
Определения TrapBase.c:216
string m_InfoSetup
Определения TrapBase.c:36
void SetInactive(bool stop_timer=true)
Определения TrapBase.c:459
bool IsPlaceable()
Определения TrapBase.c:172
float m_InitWaitTime
Определения TrapBase.c:17
void DamageClothing(PlayerBase player)
Определения TrapBase.c:664
SoundTypeTrap
Определения TrapBase.c:2
@ ACTIVATING
Определения TrapBase.c:3
bool CanBeClapped()
DEPRECATED Set if trap can be disarmed using ActionClapBearTrapWithThisItem.
Определения TrapBase.c:588
TrapTrigger m_TrapTrigger
Определения TrapBase.c:44
string m_InfoDeactivated
Определения TrapBase.c:37
void SetupTrapPlayer(PlayerBase player, bool set_position=true)
Определения TrapBase.c:388
void SetDisarmed(bool disarmed)
DEPRECATED.
Определения TrapBase.c:600
bool GetDisarmed()
DEPRECATED.
Определения TrapBase.c:606
float m_DamagePlayers
Определения TrapBase.c:20
void TrapBase()
Определения TrapBase.c:48
bool IsPlaceableAtPosition(vector position)
Определения TrapBase.c:190
void StartActivate(PlayerBase player)
Определения TrapBase.c:438
string m_InfoDamage
Определения TrapBase.c:39
bool m_AddActivationDefect
Определения TrapBase.c:23
void DeleteTrigger()
Определения TrapBase.c:488
bool m_AddDeactivationDefect
Определения TrapBase.c:24
float m_DamageOthers
Определения TrapBase.c:21
void StartDeactivate(PlayerBase player)
Определения Trap_TripWire.c:208
proto void GetInventoryItemSize(InventoryItem item, out int width, out int height)
proto native void RPCSingleParam(Object target, int rpc_type, Param param, bool guaranteed, PlayerIdentity recipient=null)
see CGame.RPC
override ScriptCallQueue GetCallQueue(int call_category)
Определения DayZGame.c:1187
proto native void ObjectDelete(Object obj)
Определения InventoryItem.c:310
Определения InventoryItem.c:413
Super root of all classes in Enforce script.
Определения EnScript.c:11
Определения DallasMask.c:2
do not process rotations !
Определения DayZAnimal.c:612
Wrapper class for managing sound through SEffectManager.
Определения EffectSound.c:5
Определения Building.c:6
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
Определения Inventory.c:79
Определения InventoryItem.c:731
Определения EnMath.c:7
Определения PlayerBaseClient.c:2
The class that will be instanced (moddable)
Определения gameplay.c:389
proto void Call(func fn, 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 ...
proto bool Write(void value_out)
proto bool Read(void value_in)
Определения DayZPlayerImplement.c:63
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:217
override void OnPlacementComplete(Man player, vector position="0 0 0", vector orientation="0 0 0")
Определения Trap_Bear.c:228
override bool CanBeDisarmed()
Определения Trap_Bear.c:25
override void SetActions()
Определения Trap_Bear.c:249
override void OnSteppedOut(EntityAI victim)
Определения Trap_Bear.c:125
Определения 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:106
Serializer ParamsReadContext
Определения gameplay.c:15
proto native CGame GetGame()
Serializer ParamsWriteContext
Определения gameplay.c:16
proto native void SetPosition(vector position)
Set the world position of the Effect.
Определения Effect.c:438
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'.
class JsonUndergroundAreaTriggerData GetPosition
Определения UndergroundAreaLoader.c:9
proto native void OnUpdate()
Определения tools.c:349
const int CALL_CATEGORY_SYSTEM
Определения tools.c:8