diff --git a/CounterStrikeSharp/.gitignore b/CounterStrikeSharp/.gitignore deleted file mode 100644 index 180bd81..0000000 --- a/CounterStrikeSharp/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -* -!.gitignore -!README.md \ No newline at end of file diff --git a/CounterStrikeSharp/README.md b/CounterStrikeSharp/README.md deleted file mode 100644 index 0c1f752..0000000 --- a/CounterStrikeSharp/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# CounterStrikeSharp Directory -This is where you put the development dependencies as mentioned in the README.md \ No newline at end of file diff --git a/RetakesAllocator/Helpers.cs b/RetakesAllocator/Helpers.cs index f71367d..4d1389f 100644 --- a/RetakesAllocator/Helpers.cs +++ b/RetakesAllocator/Helpers.cs @@ -47,7 +47,7 @@ public static ulong GetSteamId(CCSPlayerController? player) public static CsTeam GetTeam(CCSPlayerController player) { - return (CsTeam) player.TeamNum; + return player.Team; } public static void RemoveArmor(CCSPlayerController player) diff --git a/RetakesAllocator/RetakesAllocator.cs b/RetakesAllocator/RetakesAllocator.cs index ee0fc7d..314f1c9 100644 --- a/RetakesAllocator/RetakesAllocator.cs +++ b/RetakesAllocator/RetakesAllocator.cs @@ -16,7 +16,7 @@ namespace RetakesAllocator; -[MinimumApiVersion(142)] +[MinimumApiVersion(147)] public class RetakesAllocator : BasePlugin { public override string ModuleName => "Retakes Allocator Plugin"; @@ -134,7 +134,7 @@ private void HandleWeaponCommand(CCSPlayerController? player, CommandInfo comman } var playerId = Helpers.GetSteamId(player); - var currentTeam = (CsTeam) player!.TeamNum; + var currentTeam = player!.Team; var result = OnWeaponCommandHelper.Handle( Helpers.CommandInfoToArgList(commandInfo), @@ -183,7 +183,7 @@ public void OnAwpCommand(CCSPlayerController? player, CommandInfo commandInfo) } var playerId = Helpers.GetSteamId(player); - var currentTeam = (CsTeam) player!.TeamNum; + var currentTeam = player!.Team; var currentPreferredSetting = Queries.GetUserSettings(playerId) ?.GetWeaponPreference(currentTeam, WeaponAllocationType.Preferred); @@ -209,7 +209,7 @@ public void OnRemoveWeaponCommand(CCSPlayerController? player, CommandInfo comma } var playerId = Helpers.GetSteamId(player); - var currentTeam = (CsTeam) player!.TeamNum; + var currentTeam = player!.Team; var result = OnWeaponCommandHelper.Handle( Helpers.CommandInfoToArgList(commandInfo), @@ -262,7 +262,7 @@ public HookResult OnPostItemPurchase(EventItemPurchase @event, GameEventInfo inf } var item = Utils.ToEnum(@event.Weapon); - var team = (CsTeam) player.TeamNum; + var team = player.Team; var playerId = Helpers.GetSteamId(player); var isPreferred = WeaponHelpers.IsPreferred(team, item); diff --git a/RetakesAllocator/RetakesAllocator.csproj b/RetakesAllocator/RetakesAllocator.csproj index ec7a79d..d08d2ce 100644 --- a/RetakesAllocator/RetakesAllocator.csproj +++ b/RetakesAllocator/RetakesAllocator.csproj @@ -9,9 +9,7 @@ - - ..\CounterStrikeSharp\addons\counterstrikesharp\api\CounterStrikeSharp.API.dll - + diff --git a/RetakesAllocatorCore/PluginInfo.cs b/RetakesAllocatorCore/PluginInfo.cs index 54adae2..3514a0a 100644 --- a/RetakesAllocatorCore/PluginInfo.cs +++ b/RetakesAllocatorCore/PluginInfo.cs @@ -4,7 +4,7 @@ namespace RetakesAllocatorCore; public static class PluginInfo { - public const string Version = "1.2.1"; + public const string Version = "1.2.2"; public static readonly string LogPrefix = $"[RetakesAllocator {Version}] "; public static readonly string MessagePrefix = $"[{ChatColors.Green}Retakes{ChatColors.White}] "; diff --git a/RetakesAllocatorCore/RetakesAllocatorCore.csproj b/RetakesAllocatorCore/RetakesAllocatorCore.csproj index 8069ead..94a11c6 100644 --- a/RetakesAllocatorCore/RetakesAllocatorCore.csproj +++ b/RetakesAllocatorCore/RetakesAllocatorCore.csproj @@ -7,7 +7,7 @@ - + all