21enum DayZInfectedConstantsMovement
29enum DayZInfectedDeathAnims
34 ANIM_DEATH_NECKSTAB = 3
39 proto native
void SetStanceVariation(
int pStanceVariation);
40 proto native
void SetIdleState(
int pIdleState);
41 proto native
void StartTurn(
float pDirection,
int pSpeedType);
42 proto native
bool IsTurning();
51 proto native
bool WasHit();
55 proto native
bool WasLand();
70 void DayZInfectedCommandScript(DayZInfected pInfected) {}
71 void ~DayZInfectedCommandScript() {}
106 proto native DayZInfectedType GetDayZInfectedType();
107 proto native DayZInfectedInputController GetInputController();
108 proto native DayZInfectedCommandMove StartCommand_Move();
109 proto native DayZInfectedCommandVault StartCommand_Vault(
int pType);
110 proto native
void StartCommand_Death(
int pType,
float pDirection);
111 proto native
void StartCommand_Hit(
bool pHeavy,
int pType,
float pDirection);
112 proto native DayZInfectedCommandAttack StartCommand_Attack(
EntityAI pTarget,
int pType,
float pSubtype);
113 proto native
void StartCommand_Crawl(
int pType);
115 proto native
bool CanAttackToPosition(vector pTargetPosition);
117 proto native DayZInfectedCommandMove GetCommand_Move();
118 proto native DayZInfectedCommandVault GetCommand_Vault();
119 proto native DayZInfectedCommandAttack GetCommand_Attack();
122 proto native DayZInfectedCommandScript StartCommand_Script(DayZInfectedCommandScript pInfectedCommand);
123 proto native DayZInfectedCommandScript StartCommand_ScriptInst(
typename pCallbackClass);
124 proto native DayZInfectedCommandScript GetCommand_Script();
127 proto native
void GetTransformWS(out vector pTm[4]);
129 const float LEG_CRIPPLE_THRESHOLD = 74.0;
131 bool m_HeavyHitOverride;
135 void ~DayZInfected();
138 override void EEHitBy(TotalDamageResult damageResult,
int damageType,
EntityAI source,
int component,
string dmgZone,
string ammo, vector modelPos,
float speedCoef)
140 super.EEHitBy(damageResult, damageType, source,
component, dmgZone, ammo, modelPos, speedCoef);
142 int transferShockToDamageCoef =
g_Game.ConfigGetInt(
string.Format(
"%1 %2 DamageApplied transferShockToDamage",
CFG_AMMO, ammo));
143 if (transferShockToDamageCoef == 1)
145 float damage = damageResult.
GetDamage(dmgZone,
"Shock");
146 HandleSpecialZoneDamage(dmgZone, damage);
147 AddHealth(
"",
"Health", -ConvertNonlethalDamage(damage, damageType));
152 if (!m_DeathSyncSent)
154 Man killer = source.GetHierarchyRootPlayer();
158 m_KillerData =
new KillerData();
159 m_KillerData.m_Killer = killer;
160 m_KillerData.m_MurderWeapon = source;
163 if (killer && killer.IsPlayer())
166 if (dmgZone ==
"Head")
168 m_KilledByHeadshot =
true;
169 if (m_KillerData.m_Killer == killer)
170 m_KillerData.m_KillerHiTheBrain =
true;
174 SyncEvents.SendEntityKilled(
this, m_KillerData.m_Killer, m_KillerData.m_MurderWeapon, m_KillerData.m_KillerHiTheBrain);
175 m_DeathSyncSent =
true;
180 override protected float ConvertNonlethalDamage(
float damage,
DamageType damageType)
185 return damage * GameConstants.NL_DAMAGE_CLOSECOMBAT_CONVERSION_INFECTED;
187 return damage * GameConstants.NL_DAMAGE_FIREARM_CONVERSION_INFECTED;
190 return super.ConvertNonlethalDamage(damage, damageType);
193 void HandleSpecialZoneDamage(
string dmgZone,
float damage)
195 if (damage < LEG_CRIPPLE_THRESHOLD)
198 if (dmgZone ==
"LeftLeg" || dmgZone ==
"RightLeg")
199 SetHealth(dmgZone,
"Health",0.0);
201 if (dmgZone ==
"Torso" || dmgZone ==
"Head")
202 m_HeavyHitOverride =
true;
207 return EInventoryIconVisibility.HIDE_VICINITY;
DamageType
exposed from C++ (do not change)
proto native void PrePhys_SetRotation(float pInRot[4])
bool PostPhysUpdate(float pDt)
class DayZCreatureAI extends DayZCreature COMMANDID_ATTACK
proto native void PostPhys_SetPosition(vector pInTransl)
quaternion in world space
class DayZCreatureAI extends DayZCreature COMMANDID_HIT
class DayZAnimalCommandMove extends AnimCommandBase SetFlagFinished(bool pFinished)
DayZAnimalCommandScript fully scriptable command.
proto native bool PrePhys_GetRotation(out float pOutRot[4])
proto native void PostPhys_GetRotation(out float pOutRot[4])
vec3 in world space
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
proto native void PrePhys_SetTranslation(vector pInTransl)
proto native void PostPhys_LockRotation()
quaternion in world space
proto native void PostPhys_GetPosition(out vector pOutTransl)
script function usable in PostPhysUpdate
enum DayZInfectedConstants ANIM_DEATH_BACKSTAB
enum DayZInfectedConstants ANIM_DEATH_DEFAULT
enum DayZInfectedConstants MOVEMENTSTATE_WALK
enum DayZInfectedConstants ANIM_DEATH_IMPULSE
enum DayZInfectedConstants MOVEMENTSTATE_IDLE
@ MINDSTATE_CALM
mind states
enum DayZInfectedConstants MOVEMENTSTATE_RUN
override int GetHideIconMask()
class BoxCollidingParams component
ComponentInfo for BoxCollidingResult.
base class of all commands exposed to script to provide common functionality over animations
do not process rotations !
override void EEHitBy(TotalDamageResult damageResult, int damageType, EntityAI source, int component, string dmgZone, string ammo, vector modelPos, float speedCoef)
proto native float GetDamage(string zoneName, string healthType)
proto native bool WasHit()
is true only once after hit event