DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ EvaluateDamageHitAnimation()

bool DayZInfected::EvaluateDamageHitAnimation ( EntityAI pSource,
string pComponent,
string pAmmoType,
out bool pHeavyHit,
out int pAnimType,
out float pAnimHitDir )
inlineprotected

selects animation type and direction based on damage system data

heavy hit

anim type

direction

shock GetDamage

См. определение в файле ZombieBase.c строка 890

891 {
892 int invertHitDir = 0; //Used to flip the heavy hit animation direction
893
895 pHeavyHit = ((GetGame().ConfigGetInt("cfgAmmo " + pAmmoType + " hitAnimation") > 0) || m_HeavyHitOverride);
896 invertHitDir = GetGame().ConfigGetInt("cfgAmmo " + pAmmoType + " invertHitDir");
897
899 pAnimType = 0; // belly
900
901 if ( !pHeavyHit )
902 {
903 if ( pComponent == "Torso" ) // body
904 pAnimType = 1;
905 else if ( pComponent == "Head" ) // head
906 pAnimType = 2;
907 }
908
910 //pAnimHitDir = ComputeHitDirectionAngle(pSource);
911 pAnimHitDir = ComputeHitDirectionAngleEx(pSource, invertHitDir);
913 //m_ShockDamage = GetGame().ConfigGetFloat( "CfgAmmo " + pAmmoType + " DamageApplied " + "Shock " + "damage");
914 return true;
915 }
proto native int ConfigGetInt(string path)
Get int value from config on path.
float ComputeHitDirectionAngleEx(EntityAI pSource, int invertHitDir=0)
Определения ZombieBase.c:938
proto native CGame GetGame()

Перекрестные ссылки ComputeHitDirectionAngleEx(), CGame::ConfigGetInt() и GetGame().

Используется в EEHitBy().