diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e5abccf..2a2c541 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -67,4 +67,4 @@ jobs: files: bin/Debug/net8.0/* prerelease: ${{ env.IS_PRERELEASE }} env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 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(); }