mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 07:12:02 +00:00
Fixed a case of infinite loop in A_BrainDie
This commit is contained in:
parent
6370594e17
commit
f68d90accb
1 changed files with 5 additions and 1 deletions
|
@ -205,7 +205,11 @@ extend class Actor
|
||||||
if (mo.health > 0 && mo.bBossSpawned)
|
if (mo.health > 0 && mo.bBossSpawned)
|
||||||
{
|
{
|
||||||
mo.DamageMobj(self, self, mo.health, "None", DMG_NO_ARMOR|DMG_FORCED|DMG_THRUSTLESS|DMG_NO_FACTOR);
|
mo.DamageMobj(self, self, mo.health, "None", DMG_NO_ARMOR|DMG_FORCED|DMG_THRUSTLESS|DMG_NO_FACTOR);
|
||||||
count++;
|
|
||||||
|
// [Blue Shadow] If 'mo' is a RandomSpawner or another actor which can't be killed,
|
||||||
|
// it could cause this code to loop indefinitely. So only let it trigger a loop if it
|
||||||
|
// has been actually killed.
|
||||||
|
if (mo.bKilled) count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} while (count != 0);
|
} while (count != 0);
|
||||||
|
|
Loading…
Reference in a new issue