From c85105f5520f873f8c32bfddbf612260025b2ae4 Mon Sep 17 00:00:00 2001 From: Edward Richardson Date: Fri, 31 Oct 2014 22:50:23 +1300 Subject: [PATCH] Added cl_showsecretmessage Controls if secret notifications are displayed (def. true) --- src/p_spec.cpp | 3 ++- wadsrc/static/menudef.txt | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/p_spec.cpp b/src/p_spec.cpp index d58062a7e8..6761915557 100644 --- a/src/p_spec.cpp +++ b/src/p_spec.cpp @@ -714,6 +714,7 @@ void P_SectorDamage(int tag, int amount, FName type, const PClass *protectClass, //============================================================================ CVAR(Bool, showsecretsector, false, 0) +CVAR(Bool, cl_showsecretmessage, true, CVAR_ARCHIVE) void P_GiveSecret(AActor *actor, bool printmessage, bool playsound, int sectornum) { @@ -723,7 +724,7 @@ void P_GiveSecret(AActor *actor, bool printmessage, bool playsound, int sectornu { actor->player->secretcount++; } - if (actor->CheckLocalView (consoleplayer)) + if (cl_showsecretmessage && actor->CheckLocalView(consoleplayer)) { if (printmessage) { diff --git a/wadsrc/static/menudef.txt b/wadsrc/static/menudef.txt index 3d5a3ea3cf..408e534a8c 100644 --- a/wadsrc/static/menudef.txt +++ b/wadsrc/static/menudef.txt @@ -1098,6 +1098,7 @@ OptionMenu MessageOptions Title "MESSAGES" Option "Show messages", "show_messages", "OnOff" Option "Show obituaries", "show_obituaries", "OnOff" + Option "Show secret notifications", "cl_showsecretmessage", "OnOff" Option "Scale text in high res", "con_scaletext", "ScaleValues" Option "Minimum message level", "msg", "MessageLevels" Option "Center messages", "con_centernotify", "OnOff"