diff --git a/RetakesAllocator/Helpers.cs b/RetakesAllocator/Helpers.cs index fc01f2d..90b14ea 100644 --- a/RetakesAllocator/Helpers.cs +++ b/RetakesAllocator/Helpers.cs @@ -160,6 +160,11 @@ public static bool IsWarmup() { return GetGameRules().WarmupPeriod; } + + public static bool IsFreezeTime() + { + return GetGameRules().FreezePeriod; + } public static double GetVectorDistance(Vector v1, Vector v2) { diff --git a/RetakesAllocator/RetakesAllocator.cs b/RetakesAllocator/RetakesAllocator.cs index 3de731c..5389df4 100644 --- a/RetakesAllocator/RetakesAllocator.cs +++ b/RetakesAllocator/RetakesAllocator.cs @@ -100,7 +100,7 @@ out var selectedWeapon commandInfo.ReplyToCommand($"{MessagePrefix}{result}"); } - if (selectedWeapon is not null) + if (Helpers.IsFreezeTime() && selectedWeapon is not null) { var selectedWeaponRoundType = WeaponHelpers.GetRoundTypeForWeapon(selectedWeapon.Value); if (selectedWeaponRoundType == RoundType.Pistol || selectedWeaponRoundType == _currentRoundType)