DayZ 1.24
Loading...
Searching...
No Matches
DayZAnimal.c
Go to the documentation of this file.
23
24class DayZCreature extends EntityAI
25{
26#ifdef _DAYZ_CREATURE_DEBUG_SHADOW
28#endif
29
31
34
36
37
39
40 //---------------------------------------------------------
41 // helper functions for disabling simulation upon death
44
48
49 //---------------------------------------------------------
50 // bone transforms
51
54
55 override bool IsDayZCreature()
56 {
57 return true;
58 }
59
60 override bool CanBeSkinned()
61 {
62 return true;
63 }
64
66 {
67 return IsRuined();
68 }
69
70 override bool IsManagingArrows()
71 {
72 return true;
73 }
74
76 {
78 GetActionComponentNameList(componentIndex, CachedObjectsArrays.ARRAY_STRING, "fire");
79
80 int pivot = -1;
81
82
83 for (int i = 0; i < CachedObjectsArrays.ARRAY_STRING.Count() && pivot == -1; i++)
85
88
89 if (pivot == -1)
90 GetTransform(parentTransMat);
91 else
92 {
95
100 }
101
102 arrow.GetTransform(arrowTransMat);
104 // orthogonalize matrix - parent might be skewed
106 arrow.SetTransform(arrowTransMat);
107
109 }
110
112 {
113 return true;
114 }
115
116 //-------------------------------------------------------------
120 // these functions are for modded overide in script command mods
121
123 {
124 return false;
125 }
126
128 {
129 return false;
130 }
131
133 {
134 return false;
135 }
136}
137
139{
141
143#ifdef DIAG_DEVELOPER
146#endif
147 proto native void AddDamageSphere(string bone_name, string ammo_name, float radius, float duration, bool invertTeams);
148
156
157 int m_EffectTriggerCount;//how many effect triggers is this AI inside of(overlapping triggers)
158
160
161
163 {
164 RegisterAnimEvents();
165 SetFlags(EntityFlags.TOUCHTRIGGERS, false);
166 }
167
168
170 {
171 m_EffectTriggerCount++;
172 }
173
175 {
176 m_EffectTriggerCount--;
177 }
178
180 {
181 AddDamageSphere(damage_params.m_sBoneName, damage_params.m_sAmmoName, damage_params.m_fRadius, damage_params.m_fDuration, damage_params.m_bInvertTeams);
182 }
183
184 override void EEKilled(Object killer)
185 {
186 super.EEKilled(killer);
187 CreateComponent(COMP_TYPE_BODY_STAGING); // TO DO: This is never called on clients in multiplayer! That's why skinning doesn't work properly in MP. DAYZ-28269
188 }
189
191 {
192 return AnimBootsType.None;
193 }
194
196 {
197 if (so == NULL)
198 return NULL;
199
200 so.SetPosition(GetPosition());
201 AbstractWave wave = GetGame().GetSoundScene().Play3D(so, sob);
202 return wave;
203 }
204
206 {
207 AnimSoundEvent sound_event = GetCreatureAIType().GetSoundEvent(event_id);
208 if (sound_event != NULL)
209 ProcessSoundEvent(sound_event);
210 }
211
213 {
214 AnimSoundVoiceEvent voice_event = GetCreatureAIType().GetSoundVoiceEvent(event_id);
215 if (voice_event != NULL)
216 ProcessSoundVoiceEvent(voice_event);
217 }
218
220 {
221 AnimStepEvent step_event = GetCreatureAIType().GetStepEvent(event_id);
222 if (step_event != NULL)
223 ProcessStepEvent(step_event);
224 }
225
227 {
228 AnimDamageEvent damage_event = GetCreatureAIType().GetDamageEvent(event_id);
229 if (damage_event != NULL)
230 ProcessDamageEvent(damage_event);
231 }
232
233 protected void RegisterAnimEvents()
234 {
235 if (!RegisterAnimationEvent("Sound", "OnSoundEvent"))
236 Print("Error registering anim. event (Sound)");
237
238 if (!RegisterAnimationEvent("SoundVoice", "OnSoundVoiceEvent"))
239 Print("Error registering anim. event (SoundVoice)");
240
241 if (!GetGame().IsDedicatedServer())
242 {
243 if (!RegisterAnimationEvent("Step", "OnStepEvent"))
244 Print("Error registering anim. event (Step)");
245 }
246
247 if (!RegisterAnimationEvent("Damage", "OnDamageEvent"))
248 Print("Error registering anim. event (Damage)");
249 }
250
252 {
253 if (!GetGame().IsDedicatedServer())
254 {
255 SoundObjectBuilder objectBuilder = sound_event.GetSoundBuilder();
256 if (NULL != objectBuilder)
257 {
258 objectBuilder.AddEnvSoundVariables(GetPosition());
259 SoundObject soundObject = objectBuilder.BuildSoundObject();
261 }
262 }
263
264 if (GetGame().IsServer())
265 {
266 if (sound_event.m_NoiseParams != NULL)
267 GetGame().GetNoiseSystem().AddNoise(this, sound_event.m_NoiseParams);
268 }
269 }
270
272 {
273 if (!GetGame().IsDedicatedServer())
274 {
275 SoundObjectBuilder objectBuilder = sound_event.GetSoundBuilder();
276 if (NULL != objectBuilder)
277 {
278 objectBuilder.AddEnvSoundVariables(GetPosition());
279 SoundObject soundObject = objectBuilder.BuildSoundObject();
280 AttenuateSoundIfNecessary(soundObject);
282 }
283 }
284
285 if (GetGame().IsServer())
286 {
287 if (sound_event.m_NoiseParams != NULL)
288 GetGame().GetNoiseSystem().AddNoise(this, sound_event.m_NoiseParams);
289 }
290 }
291
293 {
294 SoundObjectBuilder soundBuilder = step_event.GetSoundBuilder(GetSurfaceType().Hash());
295 if (soundBuilder == NULL)
296 return;
297
298 soundBuilder.AddEnvSoundVariables(GetPosition());
299 SoundObject soundObject = soundBuilder.BuildSoundObject();
300 AttenuateSoundIfNecessary(soundObject);
302
303 //TODO effects
304 }
305
307 {
308 AddDamageSphere(damage_event.m_DamageParams);
309 }
310
312 {
313 if (GetGame().GetPlayer() != NULL && (IsSoundInsideBuilding() != GetGame().GetPlayer().IsSoundInsideBuilding() || GetGame().GetPlayer().IsCameraInsideVehicle()))
314 soundObject.SetKind(WaveKind.WAVEATTALWAYS);
315 else
316 soundObject.SetKind(WaveKind.WAVEEFFECTEX);
317 }
318
320 {
321 return false;
322 }
323
324 // ================
325 // EASTER EGG
326 // ================
327
328 //Used for easter egg sound selection
329 bool IsDanger()
330 {
331 return false;
332 }
333
335 {
336 return "";
337 }
338
340 {
341 return "";
342 }
343
344 // ================
345 // CINEMATIC CONTROLLER
346 // ================
347
349 {
350 m_CinematicPlayer = player;
351 }
352
354 {
355 return true;
356 }
357
359 {
360 if (!m_CinematicPlayer)
361 return super.ModCommandHandlerBefore(pDt, pCurrentCommandID, pCurrentCommandFinished);
362
363 UAInterface input = m_CinematicPlayer.GetInputInterface();
364
366 GetGame().GameScript.CallFunction(this, "GetInputController", controller, 0);
367
368 if (!input || !controller)
369 return super.ModCommandHandlerBefore(pDt, pCurrentCommandID, pCurrentCommandFinished);
370
371 float movementX = input.SyncedValue_ID(UAAimRight) - input.SyncedValue_ID(UAAimLeft);
372
373 float maxTurnSpeed = 100.0;
374 movementX = Math.Clamp(movementX * maxTurnSpeed * pDt, -180, 180);
375
376 if (input.SyncedValue_ID(UALookAround) > 0)
377 movementX = 0;
378
379 bool isJump = input.SyncedValue_ID(UAGetOver) > 0;
380 bool isMove = input.SyncedValue_ID(UAMoveForward) > 0;
381
382 bool isRest = input.SyncedValue_ID(UAMoveBack) > 0;
383 bool isSleep = input.SyncedValue_ID(UAReloadMagazine) > 0;
384
385 float heading = GetOrientation()[0] + movementX;
386
387 int iAlert = 0;
388 float fAlert = 0;
389 int iSpeed = 0;
390 float fSpeed = 0;
391
392 if (isMove)
393 {
394 iAlert = 1;
395 fAlert = 0.2;
396
397 bool isSprint = input.SyncedValue_ID(UATurbo) > 0;
398 bool isJog = input.SyncedValue_ID(UAWalkRunTemp) > 0;
399 bool isWalk = !isSprint && !isJog;
400 if (isSprint)
401 {
403 iSpeed = 3;
404 }
405 else if (isJog)
406 {
408 iSpeed = 2;
409 }
410 else if (isWalk)
411 {
413 iSpeed = 1;
414 }
415 }
416
419 {
420 animalController.OverrideBehaviourSlot(true, DayZAnimalBehaviourSlot.NON_SPECIFIC_THREAT);
421 animalController.OverrideBehaviourAction(true, DayZAnimalBehaviourAction.TRAVELING_INPUT);
422
423 if (!isMove)
424 {
425 if (isRest)
426 {
427 iSpeed = 0;
428 animalController.OverrideBehaviourAction(true, DayZAnimalBehaviourAction.IDLE1_INPUT);
429 }
430
431 if (isSleep)
432 {
433 iSpeed = 0;
434 animalController.OverrideBehaviourAction(true, DayZAnimalBehaviourAction.WALKING_INPUT);
435 }
436 }
437 }
438
439 bool lowVel = GetVelocity(this).Length() < 0.5;
440 if (iSpeed > 0 && lowVel)
441 {
442 iAlert = 4;
443 fAlert = 1.0;
444
445 iSpeed = 3;
446 }
447
449 {
450 switch (iSpeed)
451 {
452 case 0:
453 fSpeed = 0;
454 break;
455 case 1:
456 fSpeed = 2;
457 break;
458 case 2:
459 fSpeed = 3;
460 break;
461 case 3:
462 fSpeed = 5;
463 break;
464 }
465 }
466
467 controller.OverrideTurnSpeed(true, Math.PI2 / pDt);
468 controller.OverrideMovementSpeed(true, fSpeed);
469 controller.OverrideHeading(true, heading * Math.DEG2RAD);
470 controller.OverrideAlertLevel(true, true, iAlert, fAlert);
471
472 if (CinematicCanJump() && isJump)
473 controller.OverrideJump(true, 101, 2.0);
474
475 return true;
476 }
477}
478
480{
487};
488
490{
491
492}
493
495{
496
497}
498
500{
501
502}
503
505{
506
507}
508
510{
511
512}
513
515{
516
517}
518
520{
521
522}
523
525{
526
527}
528
537{
539 //void DayZAnimalCommandScript(DayZAnimal pAnimal)
540
541 //---------------------------------------------------------------
542 // usable everywhere
543
546
547 //---------------------------------------------------------------
548 // PrePhys Update
549
551 proto native bool PrePhys_GetTranslation(out vector pOutTransl); // vec3 in local space !
552 proto native bool PrePhys_GetRotation(out float pOutRot[4]); // quaternion in local space !
553 proto native void PrePhys_SetTranslation(vector pInTransl); // vec3 in local space !
554 proto native void PrePhys_SetRotation(float pInRot[4]); // quaternion in local space !
555
556 //---------------------------------------------------------------
557 // PostPhys Update
558
562 bool PostPhysUpdate(float pDt);
563
570}
571
573{
574
577 protected string m_DefaultHitComponent;
580
582
588
593
596
598 {
599 // testing: animals have no inventory by default
600 //GetInventory().LockInventory(LOCK_FROM_SCRIPT); // Hides animals from vicinity in inventory. Remove this if wanted otherwise.
601
603
605
607 m_DefaultHitPosition = SetDefaultHitPosition(GetDefaultHitPositionComponent());
608 }
609
610 override bool IsHealthVisible()
611 {
612 return false;
613 }
614
615 override bool IsAnimal()
616 {
617 return true;
618 }
619
620 override bool IsInventoryVisible()
621 {
622 return false;
623 }
624
625 override int GetHideIconMask()
626 {
627 return EInventoryIconVisibility.HIDE_VICINITY;
628 /*
629 if (IsAlive())
630 {
631 return EInventoryIconVisibility.HIDE_VICINITY;
632 }
633 return super.GetHideIconMask();
634 */
635 }
636
638 {
640
643 return;
644
645 if (HandleDeath(currentCommandID, inputController))
646 return;
647
649 {
650 if (currentCommandID == DayZAnimalConstants.COMMANDID_ATTACK)
651 SignalAIAttackEnded();
652
654
655 return;
656 }
657
660 return;
661
662 if (HandleDamageHit(currentCommandID))
663 {
664 if (currentCommandID == DayZAnimalConstants.COMMANDID_ATTACK)
665 SignalAIAttackEnded();
666 return;
667 }
668
669 if (currentCommandID == DayZAnimalConstants.COMMANDID_MOVE)
670 {
671 if (inputController.IsJump())
672 {
673 StartCommand_Jump();
674 return;
675 }
676
677 if (inputController.IsAttack())
678 {
679 StartCommand_Attack();
680 SignalAIAttackStarted();
681 return;
682 }
683 }
684
687 return;
688 }
689
690 bool m_DamageHitToProcess = false;
691 int m_DamageHitType = 0;
692 int m_DamageHitDirection = 0;
693
695 {
696 if (inputController.IsDead())
697 {
698 if (currentCommandID == DayZAnimalConstants.COMMANDID_DEATH)
699 return true;
700
701 if (m_DamageHitToProcess)
702 {
703 m_DamageHitToProcess = false;
704
705 StartCommand_Death(m_DamageHitType, m_DamageHitDirection);
706 }
707 else
708 StartCommand_Death(0, 0);
709
710 return true;
711 }
712
713 return false;
714 }
715
717 {
718 if (m_DamageHitToProcess)
719 {
720 m_DamageHitToProcess = false;
721
722 if (currentCommandID != DayZAnimalConstants.COMMANDID_HIT)
723 StartCommand_Hit(m_DamageHitType, m_DamageHitDirection);
724 return true;
725 }
726 return false;
727 }
728
730 {
732 m_TransportHitRegistered = false;
733
734 int transferShockToDamageCoef = g_Game.ConfigGetInt(string.Format("%1 %2 DamageApplied transferShockToDamage", CFG_AMMO, ammo));
736 {
737 //Print("DayZAnimal | EEHitBy | nonlethal hit");
738 AddHealth("", "Health", -ConvertNonlethalDamage(damageResult.GetDamage(dmgZone, "Shock"), damageType));
739 }
740 else
741 {
744 }
745
746 int type = 0;
747 int direction = 0;
748 if (ComputeDamageHitParams(source, dmgZone, ammo, type, direction) == true)
749 QueueDamageHit(type, direction);
750
751 }
752
753 void QueueDamageHit(int type, int direction)
754 {
755 m_DamageHitToProcess = true;
756 m_DamageHitType = type;
757 m_DamageHitDirection = direction;
758 }
759
760 bool ComputeDamageHitParams(EntityAI source, string dmgZone, string ammo, out int type, out int direction)
761 {
762 type = 0; // not used right now
763
764 float angleDeg = ComputeHitDirectionAngleDeg(source);
765 direction = TranslateHitAngleDegToDirectionIndex(angleDeg);
766
767 direction += FindComponentDirectionOffset(dmgZone);
768
769 return true;
770 }
771
773 {
774 vector targetDirection = GetDirection();
775 vector toSourceDirection = (source.GetPosition() - GetPosition());
776
777 targetDirection[1] = 0;
778 toSourceDirection[1] = 0;
779
780 targetDirection.Normalize();
781 toSourceDirection.Normalize();
782
785
787 if (cross[1] < 0)
789
790 return dirAngleDeg;
791 }
792
794 {
795 if (angleDeg >= -20 && angleDeg <= 20) // front
796 return 1;
797 else if (angleDeg < 0) // left
798 return 2;
799
800 return 3; // right
801 }
802
804 {
805 const int directionCount = 4;
806
807 int offset = 0;
808 if (component.Length() == 0)
809 offset = 0;
810 else if (component == "Zone_Head")
812 else if (component == "Zone_Chest" || component == "Zone_Legs_Front" || component == "Zone_Spine_Front" || component == "Zone_Neck")
814 else
816
817 return offset;
818 }
819
820 //-------------------------------------------------------------
824
825 override protected void EOnContact(IEntity other, Contact extra)
826 {
827 if (!IsAlive())
828 return;
829
831 if (transport)
832 {
833 if (GetGame().IsServer())
834 RegisterTransportHit(transport);
835 }
836 }
837
849
850 override string GetHitComponentForAI()
851 {
852 string hitComp;
853
855 return hitComp;
856
857 return GetDefaultHitComponent();
858 }
859
860 override string GetDefaultHitComponent()
861 {
863 }
864
866 {
868 }
869
871 {
872 return m_DefaultHitPosition;
873 }
874
876 {
877 return GetSelectionPositionMS(pSelection);
878 }
879
880 override protected float ConvertNonlethalDamage(float damage, DamageType damageType)
881 {
882 switch (damageType)
883 {
884 case DamageType.CLOSE_COMBAT:
886 case DamageType.FIRE_ARM:
888 }
889
890 return super.ConvertNonlethalDamage(damage, damageType);
891 }
892}
class AnimalBase extends DayZAnimal RegisterHitComponentsForAI()
Definition AnimalBase.c:23
vector GetOrientation()
DamageType
exposed from C++ (do not change)
AnimBootsType
proto native DayZCreatureAnimInterface GetAnimInterface()
proto native void PrePhys_SetRotation(float pInRot[4])
bool PostPhysUpdate(float pDt)
class DayZCreatureAI extends DayZCreature COMMANDID_ATTACK
proto native void SetAnimationInstanceByName(string animation_instance_name, int instance_uuid, float duration)
proto native void PostPhys_SetPosition(vector pInTransl)
quaternion in world space
bool ModCommandHandlerInside(float pDt, int pCurrentCommandID, bool pCurrentCommandFinished)
Definition DayZAnimal.c:127
class DayZCreatureAI extends DayZCreature COMMANDID_HIT
class DayZCreatureAnimInterface RegisterAnimationEvent(string event_name, string function_name)
class DayZAnimalCommandMove extends AnimCommandBase SetFlagFinished(bool pFinished)
DayZAnimalCommandScript fully scriptable command.
override bool HasFixedActionTargetCursorPosition()
Definition DayZAnimal.c:111
proto native void UpdateSimulationPrecision(int simLOD)
proto native bool PrePhys_GetRotation(out float pOutRot[4])
proto native int GetCurrentAnimationInstanceUUID()
proto native bool IsDeathProcessed()
proto native void PostPhys_GetRotation(out float pOutRot[4])
vec3 in world space
class DayZCreatureAI extends DayZCreature COMMANDID_MOVE
override void AddArrow(Object arrow, int componentIndex, vector closeBonePosWS, vector closeBoneRotWS)
Definition DayZAnimal.c:75
proto native int GetBoneIndexByName(string pBoneName)
returns bone index for a name (-1 if pBoneName doesn't exist)
class DayZCreatureAI extends DayZCreature COMMANDID_SCRIPT
proto native bool PrePhys_GetTranslation(out vector pOutTransl)
script function usable in PrePhysUpdate
proto native void PostPhys_SetRotation(float pInRot[4])
vec3 in world space
override bool IsIgnoredByConstruction()
Definition DayZAnimal.c:65
proto native void PrePhys_SetTranslation(vector pInTransl)
proto native void ResetDeath()
proto native void StartDeath()
class DayZCreatureAI extends DayZCreature COMMANDID_JUMP
proto native void PostPhys_LockRotation()
quaternion in world space
override bool CanBeSkinned()
Definition DayZAnimal.c:60
proto native void ResetDeathCooldown()
bool ModCommandHandlerBefore(float pDt, int pCurrentCommandID, bool pCurrentCommandFinished)
Definition DayZAnimal.c:122
class DayZCreatureAI extends DayZCreature COMMANDID_DEATH
override bool IsManagingArrows()
Definition DayZAnimal.c:70
bool ModCommandHandlerAfter(float pDt, int pCurrentCommandID, bool pCurrentCommandFinished)
Definition DayZAnimal.c:132
override bool IsDayZCreature()
Definition DayZAnimal.c:55
proto native void PostPhys_GetPosition(out vector pOutTransl)
script function usable in PostPhysUpdate
proto native bool IsDeathConditionMet()
DayZAnimalBehaviourSlot
defined in C++
DayZAnimalBehaviourAction
defined in C++
DayZGame g_Game
Definition DayZGame.c:3528
void PlaySound()
class BoxCollidingParams component
ComponentInfo for BoxCollidingResult.
PlayerBase GetPlayer()
WaveKind
Definition Sound.c:2
class SoundObjectBuilder SoundObject(SoundParams soundParams)
class JsonUndergroundAreaTriggerData GetPosition
base class of all commands exposed to script to provide common functionality over animations
Definition AnimCommand.c:3
static ref TStringArray ARRAY_STRING
Super root of all classes in Enforce script.
Definition EnScript.c:11
static void RegisterHitComponent(array< ref DayZAIHitComponent > pHitComponents, string pName, float pWeight)
Register Hit Component for AI targeting.
static bool SelectMostProbableHitComponent(array< ref DayZAIHitComponent > pHitComponents, out string pHitComponent)
do not process rotations !
Definition DayZAnimal.c:573
vector SetDefaultHitPosition(string pSelection)
Definition DayZAnimal.c:875
proto native void SignalAIAttackEnded()
bool HandleDeath(int currentCommandID, DayZAnimalInputController inputController)
Definition DayZAnimal.c:694
override bool IsAnimal()
Definition DayZAnimal.c:615
proto native DayZAnimalCommandScript StartCommand_Script(DayZAnimalCommandScript pInfectedCommand)
scripted commands
proto native void StartCommand_Hit(int pType, int pDirection)
proto native void StartCommand_Jump()
proto native DayZAnimalCommandScript GetCommand_Script()
void RegisterHitComponentsForAI()
register hit components for AI melee (used by attacking AI)
Definition DayZAnimal.c:839
int FindComponentDirectionOffset(string component)
Definition DayZAnimal.c:803
bool HandleDamageHit(int currentCommandID)
Definition DayZAnimal.c:716
override string GetDefaultHitPositionComponent()
Definition DayZAnimal.c:865
bool ComputeDamageHitParams(EntityAI source, string dmgZone, string ammo, out int type, out int direction)
Definition DayZAnimal.c:760
void DayZAnimal()
Definition DayZAnimal.c:597
override vector GetDefaultHitPosition()
Definition DayZAnimal.c:870
proto native void StartCommand_Attack()
override void EEHitBy(TotalDamageResult damageResult, int damageType, EntityAI source, int component, string dmgZone, string ammo, vector modelPos, float speedCoef)
Definition DayZAnimal.c:729
override int GetHideIconMask()
Definition DayZAnimal.c:625
override bool IsHealthVisible()
Definition DayZAnimal.c:610
string m_DefaultHitComponent
Definition DayZAnimal.c:577
proto native DayZAnimalInputController GetInputController()
override bool IsInventoryVisible()
Definition DayZAnimal.c:620
override string GetHitComponentForAI()
Definition DayZAnimal.c:850
float ConvertNonlethalDamage(float damage, DamageType damageType)
Definition DayZAnimal.c:880
proto native void StartCommand_Death(int pType, int pDirection)
ref array< ref DayZAIHitComponent > m_HitComponentsForAI
Melee hit components (AI targeting)
Definition DayZAnimal.c:576
proto native DayZAnimalCommandScript StartCommand_ScriptInst(typename pCallbackClass)
void CommandHandler(float dt, int currentCommandID, bool currentCommandFinished)
Definition DayZAnimal.c:637
void EOnContact(IEntity other, Contact extra)
Definition DayZAnimal.c:825
proto native void StartCommand_Move()
override string GetDefaultHitComponent()
Definition DayZAnimal.c:860
vector m_DefaultHitPosition
Definition DayZAnimal.c:579
float ComputeHitDirectionAngleDeg(EntityAI source)
Definition DayZAnimal.c:772
string m_DefaultHitPositionComponent
Definition DayZAnimal.c:578
proto native void SignalAIAttackStarted()
void QueueDamageHit(int type, int direction)
Definition DayZAnimal.c:753
int TranslateHitAngleDegToDirectionIndex(float angleDeg)
Definition DayZAnimal.c:793
proto native TAnimGraphVariable BindVariableFloat(string pVariable)
proto native TAnimGraphTag BindTag(string pTagName)
proto native TAnimGraphVariable BindVariableBool(string pVariable)
proto native TAnimGraphCommand BindCommand(string pCommandName)
returns command index -
proto native TAnimGraphEvent BindEvent(string pEventName)
proto native TAnimGraphVariable BindVariableInt(string pVariable)
void AttenuateSoundIfNecessary(SoundObject soundObject)
Definition DayZAnimal.c:311
proto native AIAgent GetAIAgent()
DayZPlayer m_CinematicPlayer
Definition DayZAnimal.c:159
void OnSoundVoiceEvent(int event_id, string event_user_string)
Definition DayZAnimal.c:212
void ProcessStepEvent(AnimStepEvent step_event)
Definition DayZAnimal.c:292
void ProcessDamageEvent(AnimDamageEvent damage_event)
Definition DayZAnimal.c:306
string CaptureSound()
Definition DayZAnimal.c:334
bool CinematicCanJump()
Definition DayZAnimal.c:353
void OnStepEvent(int event_id, string event_user_string)
Definition DayZAnimal.c:219
bool ResistContaminatedEffect()
Definition DayZAnimal.c:319
AbstractWave PlaySound(SoundObject so, SoundObjectBuilder sob)
Definition DayZAnimal.c:195
bool IsDanger()
Definition DayZAnimal.c:329
proto native DayZCreatureAIType GetCreatureAIType()
void DayZCreatureAI()
Definition DayZAnimal.c:162
int m_EffectTriggerCount
Definition DayZAnimal.c:157
void RegisterAnimEvents()
Definition DayZAnimal.c:233
override bool ModCommandHandlerBefore(float pDt, int pCurrentCommandID, bool pCurrentCommandFinished)
Definition DayZAnimal.c:358
proto native void DestroyAIAgent()
void ProcessSoundVoiceEvent(AnimSoundVoiceEvent sound_event)
Definition DayZAnimal.c:271
void AddDamageSphere(AnimDamageParams damage_params)
Definition DayZAnimal.c:179
void OnDamageEvent(int event_id, string event_user_string)
Definition DayZAnimal.c:226
void DecreaseEffectTriggerCount()
Definition DayZAnimal.c:174
void CinematicTakeControl(DayZPlayer player)
Definition DayZAnimal.c:348
proto native bool IsSoundInsideBuilding()
void ProcessSoundEvent(AnimSoundEvent sound_event)
Definition DayZAnimal.c:251
override void EEKilled(Object killer)
Definition DayZAnimal.c:184
void OnSoundEvent(int event_id, string event_user_string)
Definition DayZAnimal.c:205
void IncreaseEffectTriggerCount()
Definition DayZAnimal.c:169
AnimBootsType GetBootsType()
Definition DayZAnimal.c:190
string ReleaseSound()
Definition DayZAnimal.c:339
proto native void InitAIAgent(AIGroup group)
proto native void AddDamageSphere(string bone_name, string ammo_name, float radius, float duration, bool invertTeams)
Definition EnMath.c:7
Base native class for all motorized wheeled vehicles.
Definition Car.c:75
static float Dot(vector v1, vector v2)
Returns Dot product of vector v1 and vector v2.
Definition EnConvert.c:271
ref array< ref DayZAIHitComponent > m_HitComponentsForAI
Melee hit components (AI targeting)
Definition dayzplayer.c:582
string GetDefaultHitComponent()
Definition dayzplayer.c:492
string m_DefaultHitComponent
Definition dayzplayer.c:583
string GetDefaultHitPositionComponent()
Definition dayzplayer.c:497
string m_DefaultHitPositionComponent
Definition dayzplayer.c:584
proto native CGame GetGame()
const int COMP_TYPE_ANIMAL_BLEEDING
Definition Component.c:11
const int COMP_TYPE_BODY_STAGING
Definition Component.c:10
proto void Print(void var)
Prints content of variable to console/log.
proto native void SetFlags(ShapeFlags flags)
const float NL_DAMAGE_FIREARM_CONVERSION_ANIMALS
Definition constants.c:859
const float NL_DAMAGE_CLOSECOMBAT_CONVERSION_ANIMALS
Definition constants.c:863
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
EntityFlags
Entity flags.
Definition EnEntity.c:114
static proto void YawPitchRollMatrix(vector ang, out vector mat[3])
Creates rotation matrix from angles.
static proto void MatrixInvMultiply4(vector mat0[4], vector mat1[4], out vector res[4])
Invert-transforms matrix.
static proto void MatrixOrthogonalize4(vector mat[4])
Orthogonalizes matrix.
static const float PI2
Definition EnMath.c:13
static proto float Acos(float c)
Returns angle in radians from cosinus.
static proto float Clamp(float value, float min, float max)
Clamps 'value' to 'min' if it is lower than 'min', or to 'max' if it is higher than 'max'.
static const float RAD2DEG
Definition EnMath.c:16
static const float DEG2RAD
Definition EnMath.c:17
const string CFG_AMMO
Definition constants.c:212
proto native vector GetVelocity(notnull IEntity ent)
Returns linear velocity.
proto native void AddChild(Widget child, bool immedUpdate=true)
proto native HumanCommandMove StartCommand_Move()
--— MOVE --—
proto native HumanCommandDeathCallback StartCommand_Death(int pType, float pDirection, typename pCallbackClass, bool pKeepInLocalSpaceAfterLeave=false)
--— Death --—
class HumanInputController TAnimGraphCommand
proto native HumanInputController GetInputController()
returns human input controller