From 59f169922867908483b8e84109cd4c7683a7ed7c Mon Sep 17 00:00:00 2001 From: RaidMax Date: Fri, 2 Oct 2020 16:45:55 -0500 Subject: [PATCH] fix issue with button detection --- Plugins/Stats/Cheat/Detection.cs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Plugins/Stats/Cheat/Detection.cs b/Plugins/Stats/Cheat/Detection.cs index 9c2c36870..bf689db6a 100644 --- a/Plugins/Stats/Cheat/Detection.cs +++ b/Plugins/Stats/Cheat/Detection.cs @@ -331,18 +331,18 @@ namespace IW4MAdmin.Plugins.Stats.Cheat if (!shouldIgnoreDetection) { validButtonHitCount++; - } - double lastDiff = hit.TimeOffset - hit.TimeSinceLastAttack; - if (validButtonHitCount > 0 && lastDiff <= 0) - { - results.Add(new DetectionPenaltyResult() + double lastDiff = hit.TimeOffset - hit.TimeSinceLastAttack; + if (validButtonHitCount > 0 && lastDiff <= 0) { - ClientPenalty = EFPenalty.PenaltyType.Ban, - Value = lastDiff, - HitCount = HitCount, - Type = DetectionType.Button - }); + results.Add(new DetectionPenaltyResult() + { + ClientPenalty = EFPenalty.PenaltyType.Ban, + Value = lastDiff, + HitCount = HitCount, + Type = DetectionType.Button + }); + } } #endregion