selects animation type and direction based on damage system data
direction
См. определение в файле DayZPlayerImplement.c строка 1456
1457 {
1458 bool doPhxImpulse =
g_Game.ConfigGetInt(
"cfgAmmo " + pAmmoType +
" doPhxImpulse") > 0;
1459
1461 if (doPhxImpulse)
1463
1465 vector targetDirection = GetDirection();
1466 vector toSourceDirection = (pSource.GetPosition() -
GetPosition());
1467
1468 targetDirection[1] = 0;
1469 toSourceDirection[1] = 0;
1470
1473
1474 float cosFi = vector.Dot(targetDirection, toSourceDirection);
1475 vector cross = targetDirection * toSourceDirection;
1476
1477 pAnimHitDir = Math.Acos(cosFi) * Math.RAD2DEG;
1478 if (cross[1] < 0)
1479 pAnimHitDir = -pAnimHitDir;
1480
1481 return true;
1482 }
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().