mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-10 23:31:13 -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:
@ -3,7 +3,7 @@ var eventParser;
|
||||
|
||||
var plugin = {
|
||||
author: 'FrenchFry, RaidMax',
|
||||
version: 0.4,
|
||||
version: 0.5,
|
||||
name: 'CoD4x Parser',
|
||||
isParser: true,
|
||||
|
||||
@ -21,11 +21,11 @@ var plugin = {
|
||||
rconParser.Configuration.Dvar.Pattern = '^"(.+)" is: "(.+)?" default: "(.+)?" info: "(.+)?"$';
|
||||
rconParser.Configuration.Dvar.AddMapping(109, 2); // DVAR latched value
|
||||
rconParser.Configuration.Dvar.AddMapping(110, 4); // dvar info
|
||||
rconParser.Version = 'CoD4 X 1.8 win_mingw-x86 build 2055 May 2 2017';
|
||||
rconParser.Version = 'CoD4 X - win_mingw-x86 build 963 Mar 12 2019';
|
||||
rconParser.GameName = 1; // IW3
|
||||
|
||||
eventParser.Configuration.GameDirectory = 'main';
|
||||
eventParser.Version = 'CoD4 X 1.8 win_mingw-x86 build 2055 May 2 2017';
|
||||
eventParser.Version = 'CoD4 X - win_mingw-x86 build 963 Mar 12 2019';
|
||||
eventParser.GameName = 1; // IW3
|
||||
eventParser.URLProtocolFormat = 'cod4://{{ip}}:{{port}}';
|
||||
},
|
||||
|
@ -19,7 +19,7 @@ var plugin = {
|
||||
rconParser.Configuration.CommandPrefixes.Kick = 'clientkick {0} "{1}"';
|
||||
rconParser.Configuration.CommandPrefixes.Ban = 'clientkick {0} "{1}"';
|
||||
rconParser.Configuration.CommandPrefixes.TempBan = 'tempbanclient {0} "{1}"';
|
||||
eventParser.Configuration.GameDirectory = 'userraw';
|
||||
eventParser.Configuration.GameDirectory = 'userraw';
|
||||
|
||||
rconParser.Version = 'IW4x (v0.6.0)';
|
||||
rconParser.GameName = 2; // IW4x
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user