1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-10 15:20:48 -05:00

fixed loader offset

some stat stuff still not working
made seperate parsers
This commit is contained in:
RaidMax
2018-04-11 17:24:21 -05:00
parent 770a61bcfd
commit 15372d0726
16 changed files with 303 additions and 177 deletions

View File

@ -67,6 +67,13 @@ namespace IW4MAdmin.Plugins.Stats.Cheat
float previousAverage = hitLoc.HitOffsetAverage;
double newAverage = (previousAverage * (hitLoc.HitCount - 1) + angle) / hitLoc.HitCount;
hitLoc.HitOffsetAverage = (float)newAverage;
if (hitLoc.HitOffsetAverage == float.NaN)
{
Log.WriteWarning("[Detection::ProcessKill] HitOffsetAvgerage NaN");
Log.WriteDebug($"{previousAverage}-{hitLoc.HitCount}-{hitLoc}-{newAverage}");
hitLoc.HitOffsetAverage = 0f;
}
}
#endregion