20enum DayZInfectedConstantsMovement
28enum DayZInfectedDeathAnims
33 ANIM_DEATH_NECKSTAB = 3
38 proto native
void SetStanceVariation(
int pStanceVariation);
39 proto native
void SetIdleState(
int pIdleState);
40 proto native
void StartTurn(
float pDirection,
int pSpeedType);
41 proto native
bool IsTurning();
50 proto native
bool WasHit();
54 proto native
bool WasLand();
69 void DayZInfectedCommandScript(DayZInfected pInfected) {}
70 void ~DayZInfectedCommandScript() {}
105 proto native DayZInfectedType GetDayZInfectedType();
106 proto native DayZInfectedInputController GetInputController();
107 proto native DayZInfectedCommandMove StartCommand_Move();
108 proto native DayZInfectedCommandVault StartCommand_Vault(
int pType);
109 proto native
void StartCommand_Death(
int pType,
float pDirection);
110 proto native
void StartCommand_Hit(
bool pHeavy,
int pType,
float pDirection);
111 proto native DayZInfectedCommandAttack StartCommand_Attack(
EntityAI pTarget,
int pType,
float pSubtype);
112 proto native
void StartCommand_Crawl(
int pType);
114 proto native
bool CanAttackToPosition(vector pTargetPosition);
116 proto native DayZInfectedCommandMove GetCommand_Move();
117 proto native DayZInfectedCommandVault GetCommand_Vault();
118 proto native DayZInfectedCommandAttack GetCommand_Attack();
121 proto native DayZInfectedCommandScript StartCommand_Script(DayZInfectedCommandScript pInfectedCommand);
122 proto native DayZInfectedCommandScript StartCommand_ScriptInst(
typename pCallbackClass);
123 proto native DayZInfectedCommandScript GetCommand_Script();
126 proto native
void GetTransformWS(out vector pTm[4]);
128 const float LEG_CRIPPLE_THRESHOLD = 74.0;
130 bool m_HeavyHitOverride;
134 void ~DayZInfected();
137 override void EEHitBy(TotalDamageResult damageResult,
int damageType,
EntityAI source,
int component,
string dmgZone,
string ammo, vector modelPos,
float speedCoef)
139 super.EEHitBy(damageResult, damageType, source,
component, dmgZone, ammo, modelPos, speedCoef);
141 int transferShockToDamageCoef =
g_Game.ConfigGetInt(
string.Format(
"%1 %2 DamageApplied transferShockToDamage",
CFG_AMMO, ammo));
142 if (transferShockToDamageCoef == 1)
144 float damage = damageResult.
GetDamage(dmgZone,
"Shock");
145 HandleSpecialZoneDamage(dmgZone, damage);
146 AddHealth(
"",
"Health", -ConvertNonlethalDamage(damage, damageType));
151 if (!m_DeathSyncSent)
153 Man killer = source.GetHierarchyRootPlayer();
157 m_KillerData =
new KillerData();
158 m_KillerData.m_Killer = killer;
159 m_KillerData.m_MurderWeapon = source;
162 if (killer && killer.IsPlayer())
165 if (dmgZone ==
"Head")
167 m_KilledByHeadshot =
true;
168 if (m_KillerData.m_Killer == killer)
169 m_KillerData.m_KillerHiTheBrain =
true;
173 SyncEvents.SendEntityKilled(
this, m_KillerData.m_Killer, m_KillerData.m_MurderWeapon, m_KillerData.m_KillerHiTheBrain);
174 m_DeathSyncSent =
true;
179 override protected float ConvertNonlethalDamage(
float damage,
DamageType damageType)
184 return damage * GameConstants.NL_DAMAGE_CLOSECOMBAT_CONVERSION_INFECTED;
186 return damage * GameConstants.NL_DAMAGE_FIREARM_CONVERSION_INFECTED;
189 return super.ConvertNonlethalDamage(damage, damageType);
192 void HandleSpecialZoneDamage(
string dmgZone,
float damage)
194 if (damage < LEG_CRIPPLE_THRESHOLD)
197 if (dmgZone ==
"LeftLeg" || dmgZone ==
"RightLeg")
198 SetHealth(dmgZone,
"Health",0.0);
200 if (dmgZone ==
"Torso" || dmgZone ==
"Head")
201 m_HeavyHitOverride =
true;
206 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