DayZ 1.29
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 строка 1547

1548 {
1549 super.EEHitBy(damageResult, damageType, source, component, dmgZone, ammo, modelPos, speedCoef);
1550
1551 m_TransportHitRegistered = false;
1552
1553 if (!IsAlive())
1554 {
1555 int animTypeDeath;
1556 float animHitDirDeath;
1557 if (EvaluateDeathAnimation(damageType, source, ammo, animTypeDeath, animHitDirDeath))
1558 {
1559 SendDeathJuncture(animTypeDeath, animHitDirDeath);
1560 }
1561
1562 if (!m_DeathSyncSent) //checked until the death is evaluated by 'OnCommandHandlerTick' higher up the road
1563 {
1564 Man killer = source.GetHierarchyRootPlayer();
1565
1566 if (!m_KillerData) //only one player is considered killer in the event of crossfire
1567 {
1568 m_KillerData = new KillerData();
1569 m_KillerData.m_Killer = killer;
1570 m_KillerData.m_MurderWeapon = source;
1571 }
1572
1573 if (killer && killer.IsPlayer())
1574 {
1575 // was player killed by headshot?
1576 if (dmgZone == "Brain")
1577 {
1578 m_KilledByHeadshot = true;
1579 if (m_KillerData.m_Killer == killer)
1580 m_KillerData.m_KillerHiTheBrain = true;
1581 }
1582 }
1583 }
1584 }
1585 else
1586 {
1587 int animType;
1588 float animHitDir;
1589 bool animHitFullbody;
1590 if (EvaluateDamageHitAnimation(damageResult, damageType, source, dmgZone, ammo, modelPos, animType, animHitDir, animHitFullbody))
1591 DayZPlayerSyncJunctures.SendDamageHitEx(this, animType, animHitDir, animHitFullbody, damageResult, damageType, source, dmgZone, ammo, modelPos);
1592 else
1593 {
1594 bool skipSoundRequest = false;
1595 if (damageType == DamageType.CUSTOM && GetCommand_Fall())
1596 skipSoundRequest = GetFallDamage().GetLandType() < HumanCommandFall.LANDTYPE_MEDIUM;
1597
1598 if (!skipSoundRequest)
1599 RequestSoundEvent(EPlayerSoundEventID.TAKING_DMG_LIGHT);
1600 }
1601 }
1602
1603 // interupt melee for non-blocked hit or heavy hit
1604 if (animHitFullbody)
1605 {
1606 HumanCommandMelee2 hcm = GetCommand_Melee2();
1607 if (hcm)
1608 hcm.Cancel();
1609 }
1610 }
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:259
void SendDeathJuncture(int pAnimTypeDeath, float pAnimHitDirDeath)
Определения DayZPlayerImplement.c:777
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:1469
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:1440
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().