mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2024-12-28 15:45:41 +03:00
Fixed of m_lastDamageAmount recording during armor calculation (#857)
This commit is contained in:
parent
e8bff71475
commit
728f1fcc67
@ -1153,9 +1153,6 @@ BOOL EXT_FUNC CBasePlayer::__API_HOOK(TakeDamage)(entvars_t *pevInflictor, entva
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// keep track of amount of damage last sustained
|
|
||||||
m_lastDamageAmount = flDamage;
|
|
||||||
|
|
||||||
// Armor
|
// Armor
|
||||||
// armor doesn't protect against fall or drown damage!
|
// armor doesn't protect against fall or drown damage!
|
||||||
if (pev->armorvalue != 0.0f && !(bitsDamageType & (DMG_DROWN | DMG_FALL)) && IsArmored(m_LastHitGroup))
|
if (pev->armorvalue != 0.0f && !(bitsDamageType & (DMG_DROWN | DMG_FALL)) && IsArmored(m_LastHitGroup))
|
||||||
@ -1194,7 +1191,10 @@ BOOL EXT_FUNC CBasePlayer::__API_HOOK(TakeDamage)(entvars_t *pevInflictor, entva
|
|||||||
{
|
{
|
||||||
Pain(m_LastHitGroup, false);
|
Pain(m_LastHitGroup, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// keep track of amount of damage last sustained
|
||||||
|
m_lastDamageAmount = flDamage;
|
||||||
|
|
||||||
LogAttack(pAttack, this, bTeamAttack, flDamage, armorHit, pev->health - flDamage, pev->armorvalue, GetWeaponName(pevInflictor, pevAttacker));
|
LogAttack(pAttack, this, bTeamAttack, flDamage, armorHit, pev->health - flDamage, pev->armorvalue, GetWeaponName(pevInflictor, pevAttacker));
|
||||||
|
|
||||||
// this cast to INT is critical!!! If a player ends up with 0.5 health, the engine will get that
|
// this cast to INT is critical!!! If a player ends up with 0.5 health, the engine will get that
|
||||||
|
Loading…
Reference in New Issue
Block a user