From 437eecb1f9568a15d5595dffd201c746b9889198 Mon Sep 17 00:00:00 2001 From: B3none Date: Thu, 11 Jan 2024 17:49:36 +0000 Subject: [PATCH] Check warmup period before restarting game / checking if round is ended --- Modules/Helpers.cs | 6 +++++- RetakesPlugin.cs | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Modules/Helpers.cs b/Modules/Helpers.cs index 3233e58..7ccb70c 100644 --- a/Modules/Helpers.cs +++ b/Modules/Helpers.cs @@ -181,7 +181,11 @@ public static void RemoveHelmetAndHeavyArmour(CCSPlayerController player) public static void RestartGame() { - CheckRoundDone(); + if (!GetGameRules().WarmupPeriod) + { + CheckRoundDone(); + } + Server.ExecuteCommand("mp_restartgame 1"); } diff --git a/RetakesPlugin.cs b/RetakesPlugin.cs index d26e013..3995614 100644 --- a/RetakesPlugin.cs +++ b/RetakesPlugin.cs @@ -18,7 +18,7 @@ namespace RetakesPlugin; [MinimumApiVersion(131)] public class RetakesPlugin : BasePlugin { - private const string Version = "1.2.3"; + private const string Version = "1.2.4"; #region Plugin info public override string ModuleName => "Retakes Plugin";