26#ifdef _DAYZ_CREATURE_DEBUG_SHADOW
164 RegisterAnimEvents();
171 m_EffectTriggerCount++;
176 m_EffectTriggerCount--;
236 Print(
"Error registering anim. event (Sound)");
239 Print(
"Error registering anim. event (SoundVoice)");
241 if (!
GetGame().IsDedicatedServer())
244 Print(
"Error registering anim. event (Step)");
248 Print(
"Error registering anim. event (Damage)");
253 if (!
GetGame().IsDedicatedServer())
273 if (!
GetGame().IsDedicatedServer())
350 m_CinematicPlayer =
player;
360 if (!m_CinematicPlayer)
472 if (CinematicCanJump() &&
isJump)
651 SignalAIAttackEnded();
665 SignalAIAttackEnded();
679 StartCommand_Attack();
680 SignalAIAttackStarted();
690 bool m_DamageHitToProcess =
false;
691 int m_DamageHitType = 0;
692 int m_DamageHitDirection = 0;
701 if (m_DamageHitToProcess)
703 m_DamageHitToProcess =
false;
718 if (m_DamageHitToProcess)
720 m_DamageHitToProcess =
false;
723 StartCommand_Hit(m_DamageHitType, m_DamageHitDirection);
732 m_TransportHitRegistered =
false;
755 m_DamageHitToProcess =
true;
756 m_DamageHitType = type;
872 return m_DefaultHitPosition;
class AnimalBase extends DayZAnimal RegisterHitComponentsForAI()
DamageType
exposed from C++ (do not change)
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)
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()
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)
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()
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()
proto native void ResetDeathCooldown()
bool ModCommandHandlerBefore(float pDt, int pCurrentCommandID, bool pCurrentCommandFinished)
class DayZCreatureAI extends DayZCreature COMMANDID_DEATH
override bool IsManagingArrows()
bool ModCommandHandlerAfter(float pDt, int pCurrentCommandID, bool pCurrentCommandFinished)
override bool IsDayZCreature()
proto native void PostPhys_GetPosition(out vector pOutTransl)
script function usable in PostPhysUpdate
proto native bool IsDeathConditionMet()
class BoxCollidingParams component
ComponentInfo for BoxCollidingResult.
class SoundObjectBuilder SoundObject(SoundParams soundParams)
class JsonUndergroundAreaTriggerData GetPosition
base class of all commands exposed to script to provide common functionality over animations
static ref TStringArray ARRAY_STRING
Super root of all classes in Enforce script.
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 !
vector SetDefaultHitPosition(string pSelection)
proto native void SignalAIAttackEnded()
bool HandleDeath(int currentCommandID, DayZAnimalInputController inputController)
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)
int FindComponentDirectionOffset(string component)
bool HandleDamageHit(int currentCommandID)
override string GetDefaultHitPositionComponent()
bool ComputeDamageHitParams(EntityAI source, string dmgZone, string ammo, out int type, out int direction)
override vector GetDefaultHitPosition()
proto native void StartCommand_Attack()
override void EEHitBy(TotalDamageResult damageResult, int damageType, EntityAI source, int component, string dmgZone, string ammo, vector modelPos, float speedCoef)
override int GetHideIconMask()
override bool IsHealthVisible()
string m_DefaultHitComponent
proto native DayZAnimalInputController GetInputController()
override bool IsInventoryVisible()
override string GetHitComponentForAI()
float ConvertNonlethalDamage(float damage, DamageType damageType)
proto native void StartCommand_Death(int pType, int pDirection)
ref array< ref DayZAIHitComponent > m_HitComponentsForAI
Melee hit components (AI targeting)
proto native DayZAnimalCommandScript StartCommand_ScriptInst(typename pCallbackClass)
void CommandHandler(float dt, int currentCommandID, bool currentCommandFinished)
void EOnContact(IEntity other, Contact extra)
proto native void StartCommand_Move()
override string GetDefaultHitComponent()
vector m_DefaultHitPosition
float ComputeHitDirectionAngleDeg(EntityAI source)
string m_DefaultHitPositionComponent
proto native void SignalAIAttackStarted()
void QueueDamageHit(int type, int direction)
int TranslateHitAngleDegToDirectionIndex(float angleDeg)
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)
void ~DayZCreatureAnimInterface()
void DayZCreatureAnimInterface()
proto native TAnimGraphVariable BindVariableInt(string pVariable)
void AttenuateSoundIfNecessary(SoundObject soundObject)
proto native AIAgent GetAIAgent()
DayZPlayer m_CinematicPlayer
void OnSoundVoiceEvent(int event_id, string event_user_string)
void ProcessStepEvent(AnimStepEvent step_event)
void ProcessDamageEvent(AnimDamageEvent damage_event)
void OnStepEvent(int event_id, string event_user_string)
bool ResistContaminatedEffect()
AbstractWave PlaySound(SoundObject so, SoundObjectBuilder sob)
proto native DayZCreatureAIType GetCreatureAIType()
void RegisterAnimEvents()
override bool ModCommandHandlerBefore(float pDt, int pCurrentCommandID, bool pCurrentCommandFinished)
proto native void DestroyAIAgent()
void ProcessSoundVoiceEvent(AnimSoundVoiceEvent sound_event)
void AddDamageSphere(AnimDamageParams damage_params)
void OnDamageEvent(int event_id, string event_user_string)
void DecreaseEffectTriggerCount()
void CinematicTakeControl(DayZPlayer player)
proto native bool IsSoundInsideBuilding()
void ProcessSoundEvent(AnimSoundEvent sound_event)
override void EEKilled(Object killer)
void OnSoundEvent(int event_id, string event_user_string)
void IncreaseEffectTriggerCount()
AnimBootsType GetBootsType()
proto native void InitAIAgent(AIGroup group)
proto native void AddDamageSphere(string bone_name, string ammo_name, float radius, float duration, bool invertTeams)
Base native class for all motorized wheeled vehicles.
static float Dot(vector v1, vector v2)
Returns Dot product of vector v1 and vector v2.
ref array< ref DayZAIHitComponent > m_HitComponentsForAI
Melee hit components (AI targeting)
string GetDefaultHitComponent()
string m_DefaultHitComponent
string GetDefaultHitPositionComponent()
string m_DefaultHitPositionComponent
proto native CGame GetGame()
const int COMP_TYPE_ANIMAL_BLEEDING
const int COMP_TYPE_BODY_STAGING
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
const float NL_DAMAGE_CLOSECOMBAT_CONVERSION_ANIMALS
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
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 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
static const float DEG2RAD
proto native vector GetVelocity(notnull IEntity ent)
Returns linear velocity.
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