- added 'kill baddies' cheat - does the same thing as 'kill monsters' only it ignores friendly monsters

This commit is contained in:
Rachael Alexanderson 2017-07-19 15:02:46 -04:00
commit 5918167fb3
5 changed files with 16 additions and 5 deletions

View file

@ -3592,7 +3592,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_BossDeath)
//
//----------------------------------------------------------------------------
int P_Massacre ()
int P_Massacre (bool baddies)
{
// jff 02/01/98 'em' cheat - kill all monsters
// partially taken from Chi's .46 port
@ -3606,7 +3606,7 @@ int P_Massacre ()
while ( (actor = iterator.Next ()) )
{
if (!(actor->flags2 & MF2_DORMANT) && (actor->flags3 & MF3_ISMONSTER))
if (!(actor->flags2 & MF2_DORMANT) && (actor->flags3 & MF3_ISMONSTER) && (!baddies || !(actor->flags & MF_FRIENDLY)))
{
killcount += actor->Massacre();
}