mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-11-16 17:21:24 +00:00
- fixed: damage of amount TELEFRAG_DAMAGE should not be reduced by armors absorbing some damage, it'd lose its magic-ness, that is needed to ensure a guaranteed kill. The same applies to autousing health items.
This commit is contained in:
parent
5ac7e4fc38
commit
83be901ad6
1 changed files with 8 additions and 3 deletions
|
@ -1218,8 +1218,13 @@ int P_DamageMobj (AActor *target, AActor *inflictor, AActor *source, int damage,
|
|||
if (!(flags & DMG_NO_ARMOR) && player->mo->Inventory != NULL)
|
||||
{
|
||||
int newdam = damage;
|
||||
player->mo->Inventory->AbsorbDamage (damage, mod, newdam);
|
||||
damage = newdam;
|
||||
player->mo->Inventory->AbsorbDamage(damage, mod, newdam);
|
||||
if (damage < TELEFRAG_DAMAGE)
|
||||
{
|
||||
// if we are telefragging don't let the damage value go below that magic value. Some further checks would fail otherwise.
|
||||
damage = newdam;
|
||||
}
|
||||
|
||||
if (damage <= 0)
|
||||
{
|
||||
// If MF6_FORCEPAIN is set, make the player enter the pain state.
|
||||
|
@ -1232,7 +1237,7 @@ int P_DamageMobj (AActor *target, AActor *inflictor, AActor *source, int damage,
|
|||
}
|
||||
}
|
||||
|
||||
if (damage >= player->health
|
||||
if (damage >= player->health && damage < TELEFRAG_DAMAGE &&
|
||||
&& (G_SkillProperty(SKILLP_AutoUseHealth) || deathmatch)
|
||||
&& !player->morphTics)
|
||||
{ // Try to use some inventory health
|
||||
|
|
Loading…
Reference in a new issue