1470 {
1471 int invertHitDir = 0;
1472
1473 pAnimType = 0;
1474 pAnimHitFullbody = false;
1476
1477 switch (pDamageType)
1478 {
1481 if (pSource.IsInherited(DayZInfected))
1482 break;
1483
1484 pAnimType =
g_Game.ConfigGetInt(
"cfgAmmo " + pAmmoType +
" hitAnimation");
1485 invertHitDir =
g_Game.ConfigGetInt(
"cfgAmmo " + pAmmoType +
" invertHitDir");
1487 pAnimHitFullbody = true;
1488 break;
1489
1491 int impactBehaviour = 0;
1492
1493 if (!IsUnconscious() && GetHealth("", "Shock") > 25)
1494 {
1496 if (pComponent == "Torso" || pComponent == "Head")
1497 {
1498 impactBehaviour =
g_Game.ConfigGetInt(
"cfgAmmo " + pAmmoType +
" impactBehaviour");
1501 if ((fireDamage > 80.0 || shockDamage > 40.0) && impactBehaviour == 1)
1502 pAnimHitFullbody = true;
1503 }
1504 }
1505
1506 break;
1507
1509 break;
1510
1512 pAnimType =
g_Game.ConfigGetInt(
"cfgAmmo " + pAmmoType +
" hitAnimation");
1513 if (pAnimType == 1)
1514 pAnimHitFullbody = true;
1516 return false;
1517
1518 break;
1519 }
1520
1522 vector targetDirection = GetDirection();
1523 vector toSourceDirection = (pSource.GetPosition() -
GetPosition());
1524
1525 targetDirection[1] = 0;
1526 toSourceDirection[1] = 0;
1527
1530
1531 float cosFi = vector.Dot(targetDirection, toSourceDirection);
1532 vector cross = targetDirection * toSourceDirection;
1533
1534 pAnimHitDir = Math.Acos(cosFi) * Math.RAD2DEG;
1535
1536
1537 if (invertHitDir > 0)
1538 pAnimHitDir -= 180;
1539
1540 if (cross[1] < 0)
1541 pAnimHitDir = -pAnimHitDir;
1542
1543 return true;
1544 }
DamageType
exposed from C++ (do not change)
ref DayZPlayerMeleeFightLogic_LightHeavy m_MeleeFightLogic
ref HumanMovementState m_MovementState
time step for gradual update of dead screen visibilibty up to full visbility [s]
proto native float GetHighestDamage(string healthType)
proto float Normalize()
Normalizes vector. Returns length.
vector GetPosition()
Get the world position of the Effect.