mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2025-02-22 11:11:25 +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)
|
if (!(flags & DMG_NO_ARMOR) && player->mo->Inventory != NULL)
|
||||||
{
|
{
|
||||||
int newdam = damage;
|
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 (damage < TELEFRAG_DAMAGE)
|
||||||
{
|
{
|
||||||
// if we are telefragging don't let the damage value go below that magic value. Some further checks would fail otherwise.
|
// 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