Skip to content

Commit

Permalink
Merge branch 'dev' of github.com:edgegamers/cs2-rockthevote into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
MSWS committed Jun 16, 2024
2 parents 7f1cf88 + f77fb45 commit 89ed69e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,4 @@ jobs:
files: bin/Debug/net8.0/*
prerelease: ${{ env.IS_PRERELEASE }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6 changes: 1 addition & 5 deletions Features/EndOfMapVote.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ public class EndOfMapVote : IPluginDependency<Plugin, Config>
private EndMapVoteManager _voteManager;
private EndOfMapConfig _config = new();
private Timer? _timer;
private bool deathMatch => _gameMode?.GetPrimitiveValue<int>() == 2 && _gameType?.GetPrimitiveValue<int>() == 1;
private ConVar? _gameType;
private ConVar? _gameMode;

Expand Down Expand Up @@ -69,9 +68,6 @@ void KillTimer()

public void OnLoad(Plugin plugin)
{
_gameMode = ConVar.Find("game_mode");
_gameType = ConVar.Find("game_type");

void MaybeStartTimer()
{
KillTimer();
Expand All @@ -93,7 +89,7 @@ void MaybeStartTimer()

if (!_pluginState.DisableCommands && !_gameRules.WarmupRunning && CheckMaxRounds() && _config.Enabled)
StartVote();
else if (deathMatch)
else
{
MaybeStartTimer();
}
Expand Down

0 comments on commit 89ed69e

Please sign in to comment.