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

◆ EvaluateCrawlTransitionAnimation()

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

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

827 {
828 pAnimType = -1;
829 if ( pComponent == "LeftLeg" && GetHealth(pComponent, "Health") == 0 )
830 pAnimType = 0;
831 else if ( pComponent == "RightLeg" && GetHealth(pComponent, "Health") == 0 )
832 pAnimType = 2;
833
834 if ( pAnimType != -1 )
835 {
836 vector targetDirection = GetDirection();
837 vector toSourceDirection = (pSource.GetPosition() - GetPosition());
838
839 targetDirection[1] = 0;
840 toSourceDirection[1] = 0;
841
842 targetDirection.Normalize();
843 toSourceDirection.Normalize();
844
845 float cosFi = vector.Dot(targetDirection, toSourceDirection);
846 if ( cosFi >= 0 ) // front
847 pAnimType++;
848 }
849
850 return pAnimType != -1;
851 }
proto float Normalize()
Normalizes vector. Returns length.
vector GetPosition()
Get the world position of the Effect.
Определения Effect.c:473

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

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