DayZ 1.30
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 строка 1563

1564 {
1565 super.EEHitBy(damageResult, damageType, source, component, dmgZone, ammo, modelPos, speedCoef);
1566
1567 m_TransportHitRegistered = false;
1568
1569 if (!IsAlive())
1570 {
1571 int animTypeDeath;
1572 float animHitDirDeath;
1573 if (EvaluateDeathAnimation(damageType, source, ammo, animTypeDeath, animHitDirDeath))
1574 {
1575 SendDeathJuncture(animTypeDeath, animHitDirDeath);
1576 }
1577
1578 if (!m_DeathSyncSent) //checked until the death is evaluated by 'OnCommandHandlerTick' higher up the road
1579 {
1580 Man killer = source.GetHierarchyRootPlayer();
1581
1582 if (!m_KillerData) //only one player is considered killer in the event of crossfire
1583 {
1584 m_KillerData = new KillerData();
1585 m_KillerData.m_Killer = killer;
1586 m_KillerData.m_MurderWeapon = source;
1587 }
1588
1589 if (killer && killer.IsPlayer())
1590 {
1591 // was player killed by headshot?
1592 if (dmgZone == "Brain")
1593 {
1594 m_KilledByHeadshot = true;
1595 if (m_KillerData.m_Killer == killer)
1596 m_KillerData.m_KillerHiTheBrain = true;
1597 }
1598 }
1599 }
1600 }
1601 else
1602 {
1603 int animType;
1604 float animHitDir;
1605 bool animHitFullbody;
1606 if (EvaluateDamageHitAnimation(damageResult, damageType, source, dmgZone, ammo, modelPos, animType, animHitDir, animHitFullbody))
1607 DayZPlayerSyncJunctures.SendDamageHitEx(this, animType, animHitDir, animHitFullbody, damageResult, damageType, source, dmgZone, ammo, modelPos);
1608 else
1609 {
1610 bool skipSoundRequest = false;
1611 if (damageType == DamageType.CUSTOM && GetCommand_Fall())
1612 skipSoundRequest = GetFallDamage().GetLandType() < HumanCommandFall.LANDTYPE_MEDIUM;
1613
1614 if (!skipSoundRequest)
1615 RequestSoundEvent(EPlayerSoundEventID.TAKING_DMG_LIGHT);
1616 }
1617 }
1618
1619 // interupt melee for non-blocked hit or heavy hit
1620 if (animHitFullbody)
1621 {
1622 HumanCommandMelee2 hcm = GetCommand_Melee2();
1623 if (hcm)
1624 hcm.Cancel();
1625 }
1626 }
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:262
void SendDeathJuncture(int pAnimTypeDeath, float pAnimHitDirDeath)
Определения DayZPlayerImplement.c:786
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:1485
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:1456
proto native void Cancel()
cancels command melee and goes to HumanCommandMove
class HumanCommandMelee2 HumanCommandFall()
Определения human.c:594
void HumanCommandMelee2()
Определения human.c:595

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