- added a new dmflag to allow killing all monsters spawned by a boss brain's cubes after killing the brain (for those who like clean level statistics.)
SVN r2385 (trunk)
This commit is contained in:
parent
503b934938
commit
b8db84b6bc
5 changed files with 20 additions and 1 deletions
|
|
@ -76,6 +76,21 @@ DEFINE_ACTION_FUNCTION(AActor, A_BrainDie)
|
|||
if ((deathmatch || alwaysapplydmflags) && (dmflags & DF_NO_EXIT))
|
||||
return;
|
||||
|
||||
// New dmflag: Kill all boss spawned monsters before ending the level.
|
||||
if (dmflags2 & DF2_KILLBOSSMONST)
|
||||
{
|
||||
TThinkerIterator<AActor> it;
|
||||
AActor *mo;
|
||||
while ((mo = it.Next()))
|
||||
{
|
||||
if (mo->flags4 & MF4_BOSSSPAWNED)
|
||||
{
|
||||
P_DamageMobj(mo, self, self, mo->health, NAME_None,
|
||||
DMG_NO_ARMOR|DMG_FORCED|DMG_THRUSTLESS|DMG_NO_FACTOR);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
G_ExitLevel (0, false);
|
||||
}
|
||||
|
||||
|
|
@ -250,6 +265,7 @@ static void SpawnFly(AActor *self, const PClass *spawntype, FSoundID sound)
|
|||
// telefrag anything in this spot
|
||||
P_TeleportMove (newmobj, newmobj->x, newmobj->y, newmobj->z, true);
|
||||
}
|
||||
newmobj->flags4 |= MF4_BOSSSPAWNED;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue