20 enum DayZInfectedConstantsMovement
28 enum DayZInfectedDeathAnims
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();
108 proto native DayZInfectedCommandVault StartCommand_Vault(
int pType);
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);
117 proto native DayZInfectedCommandVault GetCommand_Vault();
118 proto native DayZInfectedCommandAttack GetCommand_Attack();
121 proto native DayZInfectedCommandScript
StartCommand_Script(DayZInfectedCommandScript pInfectedCommand);
128 const float LEG_CRIPPLE_THRESHOLD = 74.0;
130 bool m_HeavyHitOverride;
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();
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;