Skip to content

Commit

Permalink
Merge pull request #7 from oscar-wos/1.0.6
Browse files Browse the repository at this point in the history
1.0.6
  • Loading branch information
oscar-wos authored Aug 12, 2024
2 parents 9f2a8b3 + a9d6f5a commit 92229cf
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
2 changes: 0 additions & 2 deletions src/AntiRush.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ public override void Load(bool isReload)

Server.NextFrame(() =>
{
_gameRules = Utilities.FindAllEntitiesByDesignerName<CCSGameRulesProxy>("cs_gamerules").First().GameRules!;

foreach (var controller in Utilities.GetPlayers())
_playerData[controller] = new PlayerData();

Expand Down
4 changes: 2 additions & 2 deletions src/Events.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ private HookResult OnRoundStart(EventRoundStart @event, GameEventInfo info)
_roundStart = Server.CurrentTime;
_bombPlanted = false;

_gameRules ??= Utilities.FindAllEntitiesByDesignerName<CCSGameRulesProxy>("cs_gamerules").First().GameRules!;
_warmup = _gameRules.WarmupPeriod;
var gameRules = Utilities.FindAllEntitiesByDesignerName<CCSGameRulesProxy>("cs_gamerules").First().GameRules!;
_warmup = gameRules.WarmupPeriod;

foreach (var zone in _zones)
{
Expand Down
1 change: 0 additions & 1 deletion src/Globals.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,4 @@ public partial class AntiRush
private bool _bombPlanted;
private bool _warmup;
private float[] _countdown = [];
private CCSGameRules? _gameRules;
}

0 comments on commit 92229cf

Please sign in to comment.