DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ EEHitBy()

override void DayZPlayer::EEHitBy ( TotalDamageResult damageResult,
int damageType,
EntityAI source,
int component,
string dmgZone,
string ammo,
vector modelPos,
float speedCoef )
inlineprotected

event from damage system

См. определение в файле DayZPlayerImplement.c строка 1458

1459 {
1460 super.EEHitBy(damageResult, damageType, source, component, dmgZone, ammo, modelPos, speedCoef);
1461
1462 m_TransportHitRegistered = false;
1463
1464 if (!IsAlive())
1465 {
1466 int animTypeDeath;
1467 float animHitDirDeath;
1468 if (EvaluateDeathAnimation(damageType, source, ammo, animTypeDeath, animHitDirDeath))
1469 {
1470 SendDeathJuncture(animTypeDeath, animHitDirDeath);
1471 }
1472
1473 if (!m_DeathSyncSent) //checked until the death is evaluated by 'OnCommandHandlerTick' higher up the road
1474 {
1475 Man killer = source.GetHierarchyRootPlayer();
1476
1477 if (!m_KillerData) //only one player is considered killer in the event of crossfire
1478 {
1479 m_KillerData = new KillerData();
1480 m_KillerData.m_Killer = killer;
1481 m_KillerData.m_MurderWeapon = source;
1482 }
1483
1484 if (killer && killer.IsPlayer())
1485 {
1486 // was player killed by headshot?
1487 if (dmgZone == "Brain")
1488 {
1489 m_KilledByHeadshot = true;
1490 if (m_KillerData.m_Killer == killer)
1491 m_KillerData.m_KillerHiTheBrain = true;
1492 }
1493 }
1494 }
1495 }
1496 else
1497 {
1498 int animType;
1499 float animHitDir;
1500 bool animHitFullbody;
1501 if (EvaluateDamageHitAnimation(damageResult, damageType, source, dmgZone, ammo, modelPos, animType, animHitDir, animHitFullbody))
1502 DayZPlayerSyncJunctures.SendDamageHitEx(this, animType, animHitDir, animHitFullbody, damageResult, damageType, source, dmgZone, ammo, modelPos);
1503 else
1504 {
1505 bool skipSoundRequest = false;
1506 if (damageType == DamageType.CUSTOM && GetCommand_Fall())
1507 skipSoundRequest = GetFallDamage().GetLandType() < HumanCommandFall.LANDTYPE_MEDIUM;
1508
1509 if (!skipSoundRequest)
1510 RequestSoundEvent(EPlayerSoundEventID.TAKING_DMG_LIGHT);
1511 }
1512 }
1513
1514 // interupt melee for non-blocked hit or heavy hit
1515 if (animHitFullbody)
1516 {
1517 HumanCommandMelee2 hcm = GetCommand_Melee2();
1518 if (hcm)
1519 hcm.Cancel();
1520 }
1521 }
DamageType
exposed from C++ (do not change)
Определения DamageSystem.c:11
class BoxCollidingParams component
ComponentInfo for BoxCollidingResult.
EPlayerSoundEventID
Определения PlayerSoundEventHandler.c:3
void RequestSoundEvent(EPlayerSoundEventID id, bool from_server_and_client=false)
DayZPlayerImplementFallDamage GetFallDamage()
Определения DayZPlayerImplement.c:274
void SendDeathJuncture(int pAnimTypeDeath, float pAnimHitDirDeath)
Определения DayZPlayerImplement.c:745
bool EvaluateDamageHitAnimation(TotalDamageResult pDamageResult, int pDamageType, EntityAI pSource, string pComponent, string pAmmoType, vector pModelPos, out int pAnimType, out float pAnimHitDir, out bool pAnimHitFullbody)
selects animation type and direction based on damage system data
Определения DayZPlayerImplement.c:1380
bool EvaluateDeathAnimation(int pDamageType, EntityAI pSource, string pAmmoType, out int pAnimType, out float pAnimHitDir)
selects animation type and direction based on damage system data
Определения DayZPlayerImplement.c:1351
proto native void Cancel()
cancels command melee and goes to HumanCommandMove
class HumanCommandMelee2 HumanCommandFall()
Определения human.c:574
void HumanCommandMelee2()
Определения human.c:575

Перекрестные ссылки HumanCommandMelee2::Cancel(), component, EvaluateDamageHitAnimation(), EvaluateDeathAnimation(), GetFallDamage(), HumanCommandFall(), RequestSoundEvent(), DayZPlayerSyncJunctures::SendDamageHitEx() и SendDeathJuncture().