selects animation type and direction based on damage system data
direction
См. определение в файле DayZPlayerImplement.c строка 1440
1441 {
1442 bool doPhxImpulse =
g_Game.ConfigGetInt(
"cfgAmmo " + pAmmoType +
" doPhxImpulse") > 0;
1443
1445 if (doPhxImpulse)
1447
1449 vector targetDirection = GetDirection();
1450 vector toSourceDirection = (pSource.GetPosition() -
GetPosition());
1451
1452 targetDirection[1] = 0;
1453 toSourceDirection[1] = 0;
1454
1457
1458 float cosFi = vector.Dot(targetDirection, toSourceDirection);
1459 vector cross = targetDirection * toSourceDirection;
1460
1461 pAnimHitDir = Math.Acos(cosFi) * Math.RAD2DEG;
1462 if (cross[1] < 0)
1463 pAnimHitDir = -pAnimHitDir;
1464
1465 return true;
1466 }
proto float Normalize()
Normalizes vector. Returns length.
DayZPlayerConstants
defined in C++
vector GetPosition()
Get the world position of the Effect.
Перекрестные ссылки Math::Acos(), vector::Dot(), g_Game, GetPosition(), vector::Normalize() и Math::RAD2DEG.
Используется в EEHitBy().