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

◆ EvaluateCrawlTransitionAnimation()

bool DayZInfected::EvaluateCrawlTransitionAnimation ( EntityAI pSource,
string pComponent,
string pAmmoType,
out int pAnimType )
inlineprotected

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

815 {
816 pAnimType = -1;
817 if ( pComponent == "LeftLeg" && GetHealth(pComponent, "Health") == 0 )
818 pAnimType = 0;
819 else if ( pComponent == "RightLeg" && GetHealth(pComponent, "Health") == 0 )
820 pAnimType = 2;
821
822 if ( pAnimType != -1 )
823 {
824 vector targetDirection = GetDirection();
825 vector toSourceDirection = (pSource.GetPosition() - GetPosition());
826
827 targetDirection[1] = 0;
828 toSourceDirection[1] = 0;
829
830 targetDirection.Normalize();
831 toSourceDirection.Normalize();
832
833 float cosFi = vector.Dot(targetDirection, toSourceDirection);
834 if ( cosFi >= 0 ) // front
835 pAnimType++;
836 }
837
838 return pAnimType != -1;
839 }
proto float Normalize()
Normalizes vector. Returns length.
class JsonUndergroundAreaTriggerData GetPosition
Определения UndergroundAreaLoader.c:9

Перекрестные ссылки vector::Dot(), GetPosition и vector::Normalize().

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