- made AbsorbDamage work iteratively to avoid large stack use in the VM.
This commit is contained in:
parent
ae7b95fc52
commit
cd0d17dbd5
6 changed files with 17 additions and 18 deletions
|
|
@ -1305,7 +1305,7 @@ static int DamageMobj (AActor *target, AActor *inflictor, AActor *source, int da
|
|||
int newdam = damage;
|
||||
if (damage > 0)
|
||||
{
|
||||
player->mo->Inventory->AbsorbDamage(damage, mod, newdam);
|
||||
newdam = player->mo->AbsorbDamage(damage, mod);
|
||||
}
|
||||
if (!telefragDamage || (player->mo->flags7 & MF7_LAXTELEFRAGDMG)) //rawdamage is never modified.
|
||||
{
|
||||
|
|
@ -1385,7 +1385,7 @@ static int DamageMobj (AActor *target, AActor *inflictor, AActor *source, int da
|
|||
if (!(flags & (DMG_NO_ARMOR|DMG_FORCED)) && target->Inventory != NULL && damage > 0)
|
||||
{
|
||||
int newdam = damage;
|
||||
target->Inventory->AbsorbDamage (damage, mod, newdam);
|
||||
newdam = target->AbsorbDamage damage, mod);
|
||||
damage = newdam;
|
||||
if (damage <= 0)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue