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

prevent partial client updates from setting things they shouldn't be *cough* mask *cough*

setup shared library for NuGet package
fix a couple things with offset detection calc
get cod4x working again
This commit is contained in:
RaidMax
2019-06-13 19:10:08 -05:00
parent 48c86d8cf5
commit d35d569a99
8 changed files with 43 additions and 28 deletions

View File

@ -127,7 +127,7 @@ namespace IW4MAdmin.Plugins.Stats.Cheat
int totalSessionHits = HitLocationCount.Sum(_hit => _hit.Value.Count);
var weightedSessionAverage = HitLocationCount.Where(_hit => _hit.Value.Count > 0)
.Sum(_hit => _hit.Value.Offset * _hit.Value.Count) / totalHits;
.Sum(_hit => _hit.Value.Offset * _hit.Value.Count) / totalSessionHits;
if (weightedSessionAverage > Thresholds.MaxOffset(totalSessionHits) &&
totalSessionHits > 40)
@ -206,7 +206,7 @@ namespace IW4MAdmin.Plugins.Stats.Cheat
// calculate maximum bone
double currentMaxBoneRatio = (HitLocationCount.Values.Select(v => v.Count / (double)HitCount).Max());
var bone = HitLocationCount.FirstOrDefault(b => b.Value == HitLocationCount.Values.Max()).Key;
var bone = HitLocationCount.FirstOrDefault(b => b.Value.Count == HitLocationCount.Values.Max(_hit => _hit.Count)).Key;
#region HEADSHOT_RATIO
// flag on headshot