diff --git a/src/Events.cs b/src/Events.cs index a243a6f..8fd23a8 100644 --- a/src/Events.cs +++ b/src/Events.cs @@ -12,7 +12,6 @@ private HookResult OnRoundStart(EventRoundStart @event, GameEventInfo info) _bombPlanted = false; _gameRules ??= Utilities.FindAllEntitiesByDesignerName("cs_gamerules").First().GameRules!; - _warmup = _gameRules?.WarmupPeriod; foreach (var zone in _zones) { diff --git a/src/Globals.cs b/src/Globals.cs index 1b8f4a2..a6c296e 100644 --- a/src/Globals.cs +++ b/src/Globals.cs @@ -18,7 +18,6 @@ public partial class AntiRush private readonly List _zones = []; private float _roundStart; private bool _bombPlanted; - private bool _warmup; private float[] _countdown = []; private CCSGameRules? _gameRules; } \ No newline at end of file diff --git a/src/Listeners.cs b/src/Listeners.cs index 5b57d84..2a035c7 100644 --- a/src/Listeners.cs +++ b/src/Listeners.cs @@ -7,7 +7,7 @@ public partial class AntiRush { private void OnTick() { - if (!Config.Warmup && _warmup) + if (!Config.Warmup && _gameRules?.WarmupPeriod) return; if (Config.NoRushTime != 0 && !_bombPlanted)