From 52c0e145bee021ab9912334bb18325379a398ca6 Mon Sep 17 00:00:00 2001 From: toaster Date: Sat, 15 Oct 2022 15:51:57 +0100 Subject: [PATCH] Fix pointlimit messages occouring in singleplayer contexts Still an awful child that hasn't shaped up like their sister cv_timelimit, but this will do for now. --- src/d_netcmd.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/d_netcmd.c b/src/d_netcmd.c index f639d4a81..da9b0e8cb 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -4912,7 +4912,12 @@ void ItemFinder_OnChange(void) */ static void PointLimit_OnChange(void) { - // Don't allow pointlimit in Single Player/Co-Op/Race! + if (K_CanChangeRules(false) == false) + { + return; + } + + // Don't allow pointlimit in non-pointlimited gametypes! if (server && Playing() && !(gametyperules & GTR_POINTLIMIT)) { if (cv_pointlimit.value) @@ -4927,7 +4932,7 @@ static void PointLimit_OnChange(void) cv_pointlimit.value, cv_pointlimit.value > 1 ? "s" : ""); } - else if (netgame || multiplayer) + else CONS_Printf(M_GetText("Point limit disabled\n")); }