mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-26 22:11:43 +00:00
- Fixed: Lost Souls spawned by Pain Elementals were not killed by DF2_KILLBOSSMONST.
SVN r4047 (trunk)
This commit is contained in:
parent
6a1f28e400
commit
9cca4ff71d
2 changed files with 15 additions and 7 deletions
|
@ -79,16 +79,22 @@ DEFINE_ACTION_FUNCTION(AActor, A_BrainDie)
|
|||
// New dmflag: Kill all boss spawned monsters before ending the level.
|
||||
if (dmflags2 & DF2_KILLBOSSMONST)
|
||||
{
|
||||
TThinkerIterator<AActor> it;
|
||||
AActor *mo;
|
||||
while ((mo = it.Next()))
|
||||
int count; // Repeat until we have no more boss-spawned monsters.
|
||||
do // (e.g. Pain Elementals can spawn more to kill upon death.)
|
||||
{
|
||||
if (mo->flags4 & MF4_BOSSSPAWNED)
|
||||
TThinkerIterator<AActor> it;
|
||||
AActor *mo;
|
||||
count = 0;
|
||||
while ((mo = it.Next()))
|
||||
{
|
||||
P_DamageMobj(mo, self, self, mo->health, NAME_None,
|
||||
DMG_NO_ARMOR|DMG_FORCED|DMG_THRUSTLESS|DMG_NO_FACTOR);
|
||||
if (mo->health > 0 && mo->flags4 & MF4_BOSSSPAWNED)
|
||||
{
|
||||
P_DamageMobj(mo, self, self, mo->health, NAME_None,
|
||||
DMG_NO_ARMOR|DMG_FORCED|DMG_THRUSTLESS|DMG_NO_FACTOR);
|
||||
count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
} while (count != 0);
|
||||
}
|
||||
|
||||
G_ExitLevel (0, false);
|
||||
|
|
|
@ -111,6 +111,8 @@ void A_PainShootSkull (AActor *self, angle_t angle, const PClass *spawntype, int
|
|||
|
||||
other = Spawn (spawntype, x, y, z, ALLOW_REPLACE);
|
||||
|
||||
// Transfer boss-spawned flag
|
||||
other->flags4 |= self->flags4 & MF4_BOSSSPAWNED;
|
||||
|
||||
// Check to see if the new Lost Soul's z value is above the
|
||||
// ceiling of its new sector, or below the floor. If so, kill it.
|
||||
|
|
Loading…
Reference in a new issue