From ccc872c76f85eb719dae25a6d9ccff25f8740b52 Mon Sep 17 00:00:00 2001 From: Isaac Date: Sat, 30 Mar 2024 02:44:08 -0700 Subject: [PATCH] Check timelimit regardless of gamemode --- Features/EndOfMapVote.cs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Features/EndOfMapVote.cs b/Features/EndOfMapVote.cs index b467eda..c49029b 100644 --- a/Features/EndOfMapVote.cs +++ b/Features/EndOfMapVote.cs @@ -16,7 +16,6 @@ public class EndOfMapVote : IPluginDependency private EndMapVoteManager _voteManager; private EndOfMapConfig _config = new(); private Timer? _timer; - private bool deathMatch => _gameMode?.GetPrimitiveValue() == 2 && _gameType?.GetPrimitiveValue() == 1; private ConVar? _gameType; private ConVar? _gameMode; @@ -69,9 +68,6 @@ void KillTimer() public void OnLoad(Plugin plugin) { - _gameMode = ConVar.Find("game_mode"); - _gameType = ConVar.Find("game_type"); - void MaybeStartTimer() { KillTimer(); @@ -93,7 +89,7 @@ void MaybeStartTimer() if (!_pluginState.DisableCommands && !_gameRules.WarmupRunning && CheckMaxRounds() && _config.Enabled) StartVote(); - else if (deathMatch) + else { MaybeStartTimer(); }