1381 {
1382 int invertHitDir = 0;
1383
1384 pAnimType = 0;
1385 pAnimHitFullbody = false;
1387
1388 switch (pDamageType)
1389 {
1392 if (pSource.IsInherited(DayZInfected))
1393 break;
1394
1398 pAnimHitFullbody = true;
1399 break;
1400
1402 int impactBehaviour = 0;
1403
1404 if (!IsUnconscious() && GetHealth("", "Shock") > 25)
1405 {
1407 if (pComponent == "Torso" || pComponent == "Head")
1408 {
1412 if ((fireDamage > 80.0 || shockDamage > 40.0) && impactBehaviour == 1)
1413 pAnimHitFullbody = true;
1414 }
1415 }
1416
1417 break;
1418
1420 break;
1421
1424 if (pAnimType == 1)
1425 pAnimHitFullbody = true;
1427 return false;
1428
1429 break;
1430 }
1431
1433 vector targetDirection = GetDirection();
1434 vector toSourceDirection = (pSource.GetPosition() -
GetPosition());
1435
1436 targetDirection[1] = 0;
1437 toSourceDirection[1] = 0;
1438
1441
1442 float cosFi = vector.Dot(targetDirection, toSourceDirection);
1443 vector cross = targetDirection * toSourceDirection;
1444
1445 pAnimHitDir = Math.Acos(cosFi) * Math.RAD2DEG;
1446
1447
1448 if (invertHitDir > 0)
1449 pAnimHitDir -= 180;
1450
1451 if (cross[1] < 0)
1452 pAnimHitDir = -pAnimHitDir;
1453
1454 return true;
1455 }
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