fix issue with button detection

This commit is contained in:
RaidMax 2020-10-02 16:45:55 -05:00
parent 1484d63b97
commit 59f1699228

View File

@ -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