From 9315733d04c3fab6b6ad1e3f6d8c4627ffb860b6 Mon Sep 17 00:00:00 2001 From: bones_was_here Date: Mon, 15 Jun 2020 20:28:58 +1000 Subject: [PATCH] Allow vcall timein during a timeout, and reset slowmo if SVQC shuts down during a timeout --- qcsrc/server/command/vote.qc | 2 +- qcsrc/server/g_world.qc | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/qcsrc/server/command/vote.qc b/qcsrc/server/command/vote.qc index 1869a15a89..a34203ffd2 100644 --- a/qcsrc/server/command/vote.qc +++ b/qcsrc/server/command/vote.qc @@ -835,7 +835,7 @@ void VoteCommand_call(int request, entity caller, int argc, string vote_command) { print_to(caller, "^1Only connected clients can vote."); } - else if (timeout_status) + else if (timeout_status && vote_command != "timein") { print_to(caller, "^1You can not call a vote while a timeout is active."); } diff --git a/qcsrc/server/g_world.qc b/qcsrc/server/g_world.qc index 0e9f7fa661..67049e73b2 100644 --- a/qcsrc/server/g_world.qc +++ b/qcsrc/server/g_world.qc @@ -2213,6 +2213,11 @@ void Shutdown() if(world_initialized > 0) { world_initialized = 0; + + // if a timeout is active, reset the slowmo value to normal + if(timeout_status == TIMEOUT_ACTIVE) + cvar_set("slowmo", ftos(orig_slowmo)); + LOG_TRACE("Saving persistent data..."); Ban_SaveBans(); -- 2.39.2