1444 {
1445 int invertHitDir = 0;
1446
1447 pAnimType = 0;
1448 pAnimHitFullbody = false;
1450
1451 switch (pDamageType)
1452 {
1455 if (pSource.IsInherited(DayZInfected))
1456 break;
1457
1461 pAnimHitFullbody = true;
1462 break;
1463
1465 int impactBehaviour = 0;
1466
1467 if (!IsUnconscious() && GetHealth("", "Shock") > 25)
1468 {
1470 if (pComponent == "Torso" || pComponent == "Head")
1471 {
1475 if ((fireDamage > 80.0 || shockDamage > 40.0) && impactBehaviour == 1)
1476 pAnimHitFullbody = true;
1477 }
1478 }
1479
1480 break;
1481
1483 break;
1484
1487 if (pAnimType == 1)
1488 pAnimHitFullbody = true;
1490 return false;
1491
1492 break;
1493 }
1494
1496 vector targetDirection = GetDirection();
1497 vector toSourceDirection = (pSource.GetPosition() -
GetPosition());
1498
1499 targetDirection[1] = 0;
1500 toSourceDirection[1] = 0;
1501
1504
1505 float cosFi = vector.Dot(targetDirection, toSourceDirection);
1506 vector cross = targetDirection * toSourceDirection;
1507
1508 pAnimHitDir = Math.Acos(cosFi) * Math.RAD2DEG;
1509
1510
1511 if (invertHitDir > 0)
1512 pAnimHitDir -= 180;
1513
1514 if (cross[1] < 0)
1515 pAnimHitDir = -pAnimHitDir;
1516
1517 return true;
1518 }
DamageType
exposed from C++ (do not change)
proto native int ConfigGetInt(string path)
Get int value from config on path.
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.
proto native CGame GetGame()
class JsonUndergroundAreaTriggerData GetPosition