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

adding Cod4 support (for steam GUID is truncated to 16 characters)

exit properly whoops
add all linked accounts to drop down
consolidate linked admin accounts to the most recently seen one
limited some waits to 5s to hopefully prevent a rare thread lock
This commit is contained in:
RaidMax
2018-05-14 12:55:10 -05:00
parent e817c333a5
commit e695eb54ad
30 changed files with 184 additions and 132 deletions

View File

@ -81,8 +81,8 @@ namespace IW4MAdmin.Plugins.Stats.Cheat
double newAverage = (previousAverage * (hitLoc.HitCount - 1) + realAgainstPredict) / hitLoc.HitCount;
hitLoc.HitOffsetAverage = (float)newAverage;
if (hitLoc.HitOffsetAverage > Thresholds.MaxOffset)
if (hitLoc.HitOffsetAverage > Thresholds.MaxOffset &&
hitLoc.HitCount > 15)
{
Log.WriteDebug("*** Reached Max Lifetime Average for Angle Difference ***");
Log.WriteDebug($"Lifetime Average = {newAverage}");
@ -92,9 +92,10 @@ namespace IW4MAdmin.Plugins.Stats.Cheat
return new DetectionPenaltyResult()
{
ClientPenalty = Penalty.PenaltyType.Flag,
ClientPenalty = Penalty.PenaltyType.Ban,
Value = hitLoc.HitOffsetAverage,
HitCount = hitLoc.HitCount,
Type = DetectionType.Offset
};
}
@ -102,7 +103,8 @@ namespace IW4MAdmin.Plugins.Stats.Cheat
double sessAverage = (AngleDifferenceAverage * (HitCount - 1) + realAgainstPredict) / HitCount;
AngleDifferenceAverage = sessAverage;
if (sessAverage > Thresholds.MaxOffset)
if (sessAverage > Thresholds.MaxOffset &&
HitCount > 15)
{
Log.WriteDebug("*** Reached Max Session Average for Angle Difference ***");
Log.WriteDebug($"Session Average = {sessAverage}");
@ -124,7 +126,6 @@ namespace IW4MAdmin.Plugins.Stats.Cheat
#endif
}
var currentStrain = Strain.GetStrain(kill.ViewAngles, Math.Max(50, kill.TimeOffset - LastOffset));
LastOffset = kill.TimeOffset;
if (currentStrain > ClientStats.MaxStrain)