1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-10 07:13:58 -05:00

don't count bots on master list

don't save every ac snapshot oops..
This commit is contained in:
RaidMax
2019-06-16 12:19:23 -05:00
parent 475861a769
commit d5ece456d8
3 changed files with 20 additions and 14 deletions

View File

@ -569,6 +569,7 @@ namespace IW4MAdmin.Plugins.Stats.Helpers
if (Plugin.Config.Configuration().EnableAntiCheat && !attacker.IsBot && attacker.ClientId != victim.ClientId)
{
DetectionPenaltyResult result = new DetectionPenaltyResult() { ClientPenalty = EFPenalty.PenaltyType.Any };
#if DEBUG
if (clientDetection.QueuedHits.Count > 0)
#else
@ -580,10 +581,12 @@ namespace IW4MAdmin.Plugins.Stats.Helpers
clientDetection.QueuedHits = clientDetection.QueuedHits.OrderBy(_hits => _hits.TimeOffset).ToList();
var oldestHit = clientDetection.QueuedHits.First();
clientDetection.QueuedHits.RemoveAt(0);
await ApplyPenalty(clientDetection.ProcessHit(oldestHit, isDamage), attacker, ctx);
result = clientDetection.ProcessHit(oldestHit, isDamage);
await ApplyPenalty(result, attacker, ctx);
}
await ApplyPenalty(clientDetection.ProcessTotalRatio(clientStats), attacker, ctx);
result = clientDetection.ProcessTotalRatio(clientStats);
await ApplyPenalty(result , attacker, ctx);
}
else
@ -591,7 +594,7 @@ namespace IW4MAdmin.Plugins.Stats.Helpers
clientDetection.QueuedHits.Add(hit);
}
if (clientDetection.Tracker.HasChanges)
if (clientDetection.Tracker.HasChanges && result.ClientPenalty != EFPenalty.PenaltyType.Any)
{
SaveTrackedSnapshots(clientDetection, ctx);
}