DayZ 1.28
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 строка 1521

1522 {
1523 super.EEHitBy(damageResult, damageType, source, component, dmgZone, ammo, modelPos, speedCoef);
1524
1525 m_TransportHitRegistered = false;
1526
1527 if (!IsAlive())
1528 {
1529 int animTypeDeath;
1530 float animHitDirDeath;
1531 if (EvaluateDeathAnimation(damageType, source, ammo, animTypeDeath, animHitDirDeath))
1532 {
1533 SendDeathJuncture(animTypeDeath, animHitDirDeath);
1534 }
1535
1536 if (!m_DeathSyncSent) //checked until the death is evaluated by 'OnCommandHandlerTick' higher up the road
1537 {
1538 Man killer = source.GetHierarchyRootPlayer();
1539
1540 if (!m_KillerData) //only one player is considered killer in the event of crossfire
1541 {
1542 m_KillerData = new KillerData();
1543 m_KillerData.m_Killer = killer;
1544 m_KillerData.m_MurderWeapon = source;
1545 }
1546
1547 if (killer && killer.IsPlayer())
1548 {
1549 // was player killed by headshot?
1550 if (dmgZone == "Brain")
1551 {
1552 m_KilledByHeadshot = true;
1553 if (m_KillerData.m_Killer == killer)
1554 m_KillerData.m_KillerHiTheBrain = true;
1555 }
1556 }
1557 }
1558 }
1559 else
1560 {
1561 int animType;
1562 float animHitDir;
1563 bool animHitFullbody;
1564 if (EvaluateDamageHitAnimation(damageResult, damageType, source, dmgZone, ammo, modelPos, animType, animHitDir, animHitFullbody))
1565 DayZPlayerSyncJunctures.SendDamageHitEx(this, animType, animHitDir, animHitFullbody, damageResult, damageType, source, dmgZone, ammo, modelPos);
1566 else
1567 {
1568 bool skipSoundRequest = false;
1569 if (damageType == DamageType.CUSTOM && GetCommand_Fall())
1570 skipSoundRequest = GetFallDamage().GetLandType() < HumanCommandFall.LANDTYPE_MEDIUM;
1571
1572 if (!skipSoundRequest)
1573 RequestSoundEvent(EPlayerSoundEventID.TAKING_DMG_LIGHT);
1574 }
1575 }
1576
1577 // interupt melee for non-blocked hit or heavy hit
1578 if (animHitFullbody)
1579 {
1580 HumanCommandMelee2 hcm = GetCommand_Melee2();
1581 if (hcm)
1582 hcm.Cancel();
1583 }
1584 }
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:281
void SendDeathJuncture(int pAnimTypeDeath, float pAnimHitDirDeath)
Определения DayZPlayerImplement.c:753
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:1443
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:1414
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().