1486 {
1487 int invertHitDir = 0;
1488
1489 pAnimType = 0;
1490 pAnimHitFullbody = false;
1492
1493 switch (pDamageType)
1494 {
1497 if (pSource.IsInherited(DayZInfected))
1498 break;
1499
1500 pAnimType =
g_Game.ConfigGetInt(
"cfgAmmo " + pAmmoType +
" hitAnimation");
1501 invertHitDir =
g_Game.ConfigGetInt(
"cfgAmmo " + pAmmoType +
" invertHitDir");
1503 pAnimHitFullbody = true;
1504 break;
1505
1507 int impactBehaviour = 0;
1508
1509 if (!IsUnconscious() && GetHealth("", "Shock") > 25)
1510 {
1512 if (pComponent == "Torso" || pComponent == "Head")
1513 {
1514 impactBehaviour =
g_Game.ConfigGetInt(
"cfgAmmo " + pAmmoType +
" impactBehaviour");
1517 if ((fireDamage > 80.0 || shockDamage > 40.0) && impactBehaviour == 1)
1518 pAnimHitFullbody = true;
1519 }
1520 }
1521
1522 break;
1523
1525 break;
1526
1528 pAnimType =
g_Game.ConfigGetInt(
"cfgAmmo " + pAmmoType +
" hitAnimation");
1529 if (pAnimType == 1)
1530 pAnimHitFullbody = true;
1532 return false;
1533
1534 break;
1535 }
1536
1538 vector targetDirection = GetDirection();
1539 vector toSourceDirection = (pSource.GetPosition() -
GetPosition());
1540
1541 targetDirection[1] = 0;
1542 toSourceDirection[1] = 0;
1543
1546
1547 float cosFi = vector.Dot(targetDirection, toSourceDirection);
1548 vector cross = targetDirection * toSourceDirection;
1549
1550 pAnimHitDir = Math.Acos(cosFi) * Math.RAD2DEG;
1551
1552
1553 if (invertHitDir > 0)
1554 pAnimHitDir -= 180;
1555
1556 if (cross[1] < 0)
1557 pAnimHitDir = -pAnimHitDir;
1558
1559 return true;
1560 }
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.