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

◆ GetAttackPitch()

int DayZInfected::GetAttackPitch ( EntityAI target)
inlineprotected

no default hit pos fallback

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

763 {
764 vector attackRefPos;
765
766 attackRefPos = target.GetDefaultHitPosition();
768 if ( attackRefPos != vector.Zero )
769 {
770 attackRefPos = target.ModelToWorld(attackRefPos);
771 }
772 else
773 {
774 attackRefPos = target.GetPosition();
775 }
776
777 // Now we have only erect stance, we need to get head position later too
778 float headPosY = GetPosition()[1];
779 headPosY += 1.8;
780
781 float diff = Math.AbsFloat(attackRefPos[1] - headPosY);
782
783 if ( diff < 0.3 )
784 return 0;
785
786 if ( headPosY > attackRefPos[1] )
787 return -1;
788 else
789 return 1;
790 }
class JsonUndergroundAreaTriggerData GetPosition
Определения UndergroundAreaLoader.c:9

Перекрестные ссылки Math::AbsFloat(), GetPosition и vector::Zero.

Используется в ChaseAttackLogic() и FightAttackLogic().