From 573b2958c66cdc03a489c1d0205b2caca0b0c3f6 Mon Sep 17 00:00:00 2001 From: PaulyB <43163391+3saster@users.noreply.github.com> Date: Fri, 24 Apr 2020 19:16:06 -0700 Subject: [PATCH] Added MTF_NOCOUNT to spawn flags --- src/doomdata.h | 1 + src/playsim/p_mobj.cpp | 13 +++++++++++++ wadsrc/static/zscript/constants.zs | 1 + 3 files changed, 15 insertions(+) diff --git a/src/doomdata.h b/src/doomdata.h index 572ebb61e..d52d82389 100644 --- a/src/doomdata.h +++ b/src/doomdata.h @@ -418,6 +418,7 @@ enum EMapThingFlags MTF_SECRET = 0x080000, // Secret pickup MTF_NOINFIGHTING = 0x100000, + MTF_NOCOUNT = 0x200000, // Removes COUNTKILL/COUNTITEM // BOOM and DOOM compatible versions of some of the above diff --git a/src/playsim/p_mobj.cpp b/src/playsim/p_mobj.cpp index de0ff1b6b..0f6f32e9d 100644 --- a/src/playsim/p_mobj.cpp +++ b/src/playsim/p_mobj.cpp @@ -4664,6 +4664,19 @@ void AActor::HandleSpawnFlags () Level->total_secrets++; } } + if (SpawnFlags & MTF_NOCOUNT) + { + if (flags & MF_COUNTKILL) + { + flags &= ~MF_COUNTKILL; + Level->total_monsters--; + } + if (flags & MF_COUNTITEM) + { + flags &= ~MF_COUNTITEM; + Level->total_items--; + } + } } DEFINE_ACTION_FUNCTION(AActor, HandleSpawnFlags) diff --git a/wadsrc/static/zscript/constants.zs b/wadsrc/static/zscript/constants.zs index 02e6d4fce..725044afe 100644 --- a/wadsrc/static/zscript/constants.zs +++ b/wadsrc/static/zscript/constants.zs @@ -997,6 +997,7 @@ enum EMapThingFlags MTF_SECRET = 0x080000, // Secret pickup MTF_NOINFIGHTING = 0x100000, + MTF_NOCOUNT = 0x200000, // Removes COUNTKILL/COUNTITEM }; enum ESkillProperty