From 7d2d874afbe5d6b465e6279595862fc1ded6ed29 Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Mon, 21 Jul 2025 04:31:34 -0400 Subject: [PATCH] - allow voodoo dolls to trigger lock messages --- src/d_main.cpp | 1 + src/doomdef.h | 2 +- src/gamedata/a_keys.cpp | 6 +++++- src/gamedata/g_mapinfo.cpp | 2 ++ src/maploader/compatibility.cpp | 1 + 5 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/d_main.cpp b/src/d_main.cpp index dfe7ba965..a5a8dbbcc 100644 --- a/src/d_main.cpp +++ b/src/d_main.cpp @@ -734,6 +734,7 @@ CVAR (Flag, compat_stayonlift, compatflags2, COMPATF2_STAYONLIFT); CVAR (Flag, compat_nombf21, compatflags2, COMPATF2_NOMBF21); CVAR (Flag, compat_voodoozombies, compatflags2, COMPATF2_VOODOO_ZOMBIES); CVAR (Flag, compat_fdteleport, compatflags2, COMPATF2_FDTELEPORT); +CVAR (Flag, compat_novdolllockmsg, compatflags2, COMPATF2_NOVDOLLLOCKMSG); CVAR(Bool, vid_activeinbackground, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG) diff --git a/src/doomdef.h b/src/doomdef.h index 6727923c3..b40d7a7bd 100644 --- a/src/doomdef.h +++ b/src/doomdef.h @@ -241,7 +241,7 @@ enum : unsigned int COMPATF2_VOODOO_ZOMBIES = 1 << 15, // [RL0] allow playerinfo, playerpawn, and voodoo health to all be different, and skip killing the player's mobj if a voodoo doll dies to allow voodoo zombies COMPATF2_FDTELEPORT = 1 << 16, // Emulate Final Doom's teleporter z glitch. COMPATF2_NOACSARGCHECK = 1 << 17, // Disable arg count checking for ACS - + COMPATF2_NOVDOLLLOCKMSG = 1 << 18, // Voodoo dolls no longer trigger lock messages }; // Emulate old bugs for select maps. These are not exposed by a cvar diff --git a/src/gamedata/a_keys.cpp b/src/gamedata/a_keys.cpp index 369f9c5ed..e81ffea2c 100644 --- a/src/gamedata/a_keys.cpp +++ b/src/gamedata/a_keys.cpp @@ -40,6 +40,7 @@ #include "filesystem.h" #include "v_font.h" #include "vm.h" +#include "g_levellocals.h" //=========================================================================== // @@ -504,7 +505,10 @@ int P_CheckKeys (AActor *owner, int keynum, bool remote, bool quiet) // If we get here, that means the actor isn't holding an appropriate key. - if (owner->CheckLocalView()) + // show a message if we're viewing as the current actor, or if the message was triggered by a voodoo doll of the current player + bool doprintmsg = owner->CheckLocalView() || + (!(owner->Level->i_compatflags2 & COMPATF2_NOVDOLLLOCKMSG) && owner->player && owner->player->mo->CheckLocalView()); + if ( doprintmsg ) { PrintMessage(failtext); diff --git a/src/gamedata/g_mapinfo.cpp b/src/gamedata/g_mapinfo.cpp index 693d1f17e..b5d781a55 100644 --- a/src/gamedata/g_mapinfo.cpp +++ b/src/gamedata/g_mapinfo.cpp @@ -1942,6 +1942,8 @@ MapFlagHandlers[] = { "compat_nombf21", MITYPE_COMPATFLAG, 0, COMPATF2_NOMBF21 }, { "compat_voodoozombies", MITYPE_COMPATFLAG, 0, COMPATF2_VOODOO_ZOMBIES }, { "compat_noacsargcheck", MITYPE_COMPATFLAG, 0, COMPATF2_NOACSARGCHECK }, + { "compat_novdolllockmsg", MITYPE_COMPATFLAG, 0, COMPATF2_NOVDOLLLOCKMSG }, + { "cd_start_track", MITYPE_EATNEXT, 0, 0 }, { "cd_end1_track", MITYPE_EATNEXT, 0, 0 }, { "cd_end2_track", MITYPE_EATNEXT, 0, 0 }, diff --git a/src/maploader/compatibility.cpp b/src/maploader/compatibility.cpp index 1ba18d444..49f2832a9 100644 --- a/src/maploader/compatibility.cpp +++ b/src/maploader/compatibility.cpp @@ -175,6 +175,7 @@ static FCompatOption Options[] = { "voodoozombies", COMPATF2_VOODOO_ZOMBIES, SLOT_COMPAT2 }, { "fdteleport", COMPATF2_FDTELEPORT, SLOT_COMPAT2 }, { "noacsargcheck", COMPATF2_NOACSARGCHECK, SLOT_COMPAT2 }, + { "novdolllockmsg", COMPATF2_NOVDOLLLOCKMSG, SLOT_COMPAT2 }, { NULL, 0, 0 } };