mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 23:02:08 +00:00
- fixed: AInventory::AbsorbDamage may only be called for positive damage values, otherwise it ends up adding armor points.
This commit is contained in:
parent
db25322b4c
commit
67312b907b
1 changed files with 4 additions and 1 deletions
|
@ -1278,7 +1278,10 @@ 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);
|
||||
if (damage > 0)
|
||||
{
|
||||
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.
|
||||
|
|
Loading…
Reference in a new issue