From 178896d6fb4d940052eb9e892baf11cf2e2509a0 Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Wed, 17 Apr 2024 18:32:46 -0400 Subject: [PATCH] - am_overlay turns off the overlay when set to zero --- src/am_map.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/am_map.cpp b/src/am_map.cpp index 8414b598d..61f8a3366 100644 --- a/src/am_map.cpp +++ b/src/am_map.cpp @@ -156,7 +156,15 @@ CUSTOM_CVAR(Int, am_cheat, 0, 0) CVAR(Int, am_rotate, 0, CVAR_ARCHIVE); -CVAR(Int, am_overlay, 0, CVAR_ARCHIVE); +CUSTOM_CVAR(Int, am_overlay, 0, CVAR_ARCHIVE) +{ + // stop overlay if we're told not to use it anymore. + if (automapactive && viewactive && (self == 0)) + { + automapactive = false; + viewactive = true; + } +} CVAR(Bool, am_showsecrets, true, CVAR_ARCHIVE); CVAR(Bool, am_showmonsters, true, CVAR_ARCHIVE); CVAR(Bool, am_showitems, false, CVAR_ARCHIVE);