From 961bd8cb1391ba62e87809e9d3dedc6a2414abcd Mon Sep 17 00:00:00 2001 From: B3none Date: Tue, 9 Jan 2024 18:17:24 +0000 Subject: [PATCH] bumped version to 1.3.1 and fixed bug where the chat message would show if someone tried to defuse and there was an active grenade --- CounterStrikeSharp/.gitignore | 3 --- CounterStrikeSharp/README.md | 2 -- InstadefusePlugin.cs | 20 ++++++++++---------- InstadefusePlugin.csproj | 11 +++++------ 4 files changed, 15 insertions(+), 21 deletions(-) delete mode 100644 CounterStrikeSharp/.gitignore delete mode 100644 CounterStrikeSharp/README.md 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/InstadefusePlugin.cs b/InstadefusePlugin.cs index 0e131bc..2f5ecf0 100644 --- a/InstadefusePlugin.cs +++ b/InstadefusePlugin.cs @@ -10,7 +10,7 @@ namespace InstadefusePlugin; [MinimumApiVersion(129)] public class InstadefusePlugin : BasePlugin { - private const string Version = "1.3.0"; + private const string Version = "1.3.1"; public override string ModuleName => "Instadefuse Plugin"; public override string ModuleVersion => Version; @@ -201,15 +201,6 @@ private void AttemptInstadefuse(CCSPlayerController player) return; } - PrintThreatLevel(); - - if (_heThreat > 0 || _molotovThreat > 0 || _infernoThreat.Any()) - { - Console.WriteLine($"{LogPrefix}Instant Defuse not possible because a grenade threat is active!"); - Server.PrintToChatAll($"{MessagePrefix}Instant Defuse not possible because a grenade threat is active!"); - return; - } - var plantedBomb = FindPlantedBomb(); if (plantedBomb == null) { @@ -228,6 +219,15 @@ private void AttemptInstadefuse(CCSPlayerController player) Console.WriteLine($"{LogPrefix}Terrorists are still alive"); return; } + + PrintThreatLevel(); + + if (_heThreat > 0 || _molotovThreat > 0 || _infernoThreat.Any()) + { + Console.WriteLine($"{LogPrefix}Instant Defuse not possible because a grenade threat is active!"); + Server.PrintToChatAll($"{MessagePrefix}Instant Defuse not possible because a grenade threat is active!"); + return; + } var bombTimeUntilDetonation = plantedBomb.TimerLength - (Server.CurrentTime - _bombPlantedTime); diff --git a/InstadefusePlugin.csproj b/InstadefusePlugin.csproj index ba8b42a..511d23e 100644 --- a/InstadefusePlugin.csproj +++ b/InstadefusePlugin.csproj @@ -6,12 +6,11 @@ - - .\CounterStrikeSharp\addons\counterstrikesharp\api\CounterStrikeSharp.API.dll - - - - + + + + +