- added GZDoom's option not to count monsters in E1M8-style end of level sectors, but controlled by a dmflag.

SVN r3267 (trunk)
This commit is contained in:
Christoph Oelckers 2011-07-07 21:55:55 +00:00
parent 55bb4afac8
commit ba661308d4
4 changed files with 21 additions and 0 deletions

View file

@ -508,6 +508,7 @@ CVAR (Flag, sv_disallowsuicide, dmflags2, DF2_NOSUICIDE);
CVAR (Flag, sv_noautoaim, dmflags2, DF2_NOAUTOAIM);
CVAR (Flag, sv_dontcheckammo, dmflags2, DF2_DONTCHECKAMMO);
CVAR (Flag, sv_killbossmonst, dmflags2, DF2_KILLBOSSMONST);
CVAR (Flag, sv_nocountendmonst, dmflags2, DF2_NOCOUNTENDMONST);
//==========================================================================
//
// CVAR compatflags

View file

@ -296,6 +296,7 @@ enum
DF2_NOAUTOAIM = 1 << 23, // Players cannot use autoaim.
DF2_DONTCHECKAMMO = 1 << 24, // Don't Check ammo when switching weapons.
DF2_KILLBOSSMONST = 1 << 25, // Kills all monsters spawned by a boss cube when the boss dies
DF2_NOCOUNTENDMONST = 1 << 26, // Do not count monsters in 'end level when dying' sectors towards kill count
};
// [RH] Compatibility flags.

View file

@ -3928,6 +3928,24 @@ void P_SetupLevel (char *lumpname, int position)
}
}
// Don't count monsters in end-of-level sectors if option is on
if (dmflags2 & DF2_NOCOUNTENDMONST)
{
TThinkerIterator<AActor> it;
AActor * mo;
while ((mo=it.Next()))
{
if (mo->flags & MF_COUNTKILL)
{
if (mo->Sector->special == dDamage_End)
{
mo->ClearCounters();
}
}
}
}
T_PreprocessScripts(); // preprocess FraggleScript scripts
// build subsector connect matrix

View file

@ -1107,6 +1107,7 @@ OptionMenu GameplayOptions
Option "Chasecam cheat", "sv_chasecam", "YesNo"
Option "Check ammo for weapon switch", "sv_dontcheckammo", "NoYes"
Option "Killing Romero kills all his spawns", "sv_killbossmonst", "YesNo"
Option "Count monsters in end level sectors", "sv_nocountendmonst", "NoYes"
StaticText " "
StaticText "Deathmatch Settings",1