Skip to content

Commit

Permalink
fix: gamerules
Browse files Browse the repository at this point in the history
  • Loading branch information
oscar-wos committed Dec 23, 2024
1 parent 95bb8d0 commit 3d692ca
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
8 changes: 7 additions & 1 deletion AntiRush.sln
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ VisualStudioVersion = 17.10.34928.147
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AntiRush", "src\AntiRush.csproj", "{9B2DEBE8-1EEF-47E8-B890-D15A3F0FF109}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Menu", ".\Menu\src\Menu.csproj", "{5AC48D94-A9F6-4566-92A4-F78C39A9FCD6}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Menu", "Menu\src\Menu.csproj", "{5AC48D94-A9F6-4566-92A4-F78C39A9FCD6}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSSharpUtils", "CSSharpUtils\CSSharpUtils\CSSharpUtils.csproj", "{FC3C8021-215F-4F0C-A2D7-30C13FD56432}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -21,6 +23,10 @@ Global
{5AC48D94-A9F6-4566-92A4-F78C39A9FCD6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5AC48D94-A9F6-4566-92A4-F78C39A9FCD6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5AC48D94-A9F6-4566-92A4-F78C39A9FCD6}.Release|Any CPU.Build.0 = Release|Any CPU
{FC3C8021-215F-4F0C-A2D7-30C13FD56432}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FC3C8021-215F-4F0C-A2D7-30C13FD56432}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FC3C8021-215F-4F0C-A2D7-30C13FD56432}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FC3C8021-215F-4F0C-A2D7-30C13FD56432}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
1 change: 1 addition & 0 deletions src/AntiRush.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<ItemGroup>
<PackageReference Include="CounterStrikeSharp.API" Version="*" ExcludeAssets="runtime" />
<ProjectReference Include="..\Menu\src\Menu.csproj" />
<ProjectReference Include="..\CSSharpUtils\CSSharpUtils\CSSharpUtils.csproj" />
</ItemGroup>

<ItemGroup>
Expand Down
3 changes: 2 additions & 1 deletion src/Events.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using CounterStrikeSharp.API;
using CounterStrikeSharp.API.Core;
using CounterStrikeSharp.API.Modules.Utils;
using CSSharpUtils.Utils;

namespace AntiRush;

Expand All @@ -11,7 +12,7 @@ private HookResult OnRoundStart(EventRoundStart @event, GameEventInfo info)
_roundStart = Server.CurrentTime;
_bombPlanted = false;

_gameRules ??= Utilities.FindAllEntitiesByDesignerName<CCSGameRulesProxy>("cs_gamerules").First().GameRules!;
_gameRules = GameUtils.GetGameRules();

foreach (var zone in _zones)
{
Expand Down
1 change: 0 additions & 1 deletion src/Listeners.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using CounterStrikeSharp.API;
using AntiRush.Enums;

namespace AntiRush;

Expand Down

0 comments on commit 3d692ca

Please sign in to comment.