From 375d4ec3dae750b15153da4e0ed73bd588169fef Mon Sep 17 00:00:00 2001 From: NickCloud Date: Sat, 9 Mar 2024 11:53:58 +0100 Subject: [PATCH] Preventwin: Also prevent timelimit (#1476) Debug preventwin states "prevent any win condition". I think the time limit is a win condition as well but was not prevented with this. --- CHANGELOG.md | 1 + gamemodes/terrortown/gamemode/server/sv_main.lua | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 164cf3c6f..030e19566 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ All notable changes to TTT2 will be documented here. Inspired by [keep a changel - A crosshair is now also drawn when holding a nade, making it less confusing when looking at entities - Hides item settings in the equipment editor that are only relevant for weapons - The binoculars now use the default crosshair as well +- The ConVar "ttt_debug_preventwin" will now also prevent the time limit from ending the round (by @NickCloudAT) ### Fixed diff --git a/gamemodes/terrortown/gamemode/server/sv_main.lua b/gamemodes/terrortown/gamemode/server/sv_main.lua index 2c3114d75..52ad15807 100644 --- a/gamemodes/terrortown/gamemode/server/sv_main.lua +++ b/gamemodes/terrortown/gamemode/server/sv_main.lua @@ -796,7 +796,7 @@ local function WinChecker() return end - if CurTime() > GetGlobalFloat("ttt_round_end", 0) then + if CurTime() > GetGlobalFloat("ttt_round_end", 0) and not ttt_dbgwin:GetBool() then EndRound(WIN_TIMELIMIT) elseif not ttt_dbgwin:GetBool() then ---