fix old bug of auto unflag not working

fix wrong thresholds on recoil
This commit is contained in:
RaidMax 2019-06-24 18:32:14 -05:00
parent 8119ff9f83
commit 421e90cf70
3 changed files with 7 additions and 7 deletions

View File

@ -205,7 +205,7 @@ namespace IW4MAdmin.Plugins.Stats.Cheat
var lifeTimeHits = ClientStats.HitLocations.Sum(_loc => _loc.HitCount);
ClientStats.AverageRecoilOffset = (ClientStats.AverageRecoilOffset * (lifeTimeHits - 1) + hitRecoilAverage) / lifeTimeHits;
if (sessionAverageRecoilAmount == 0 && HitCount > Thresholds.MediumSampleMinKills)
if (sessionAverageRecoilAmount == 0 && HitCount > Thresholds.LowSampleMinKills)
{
results.Add(new DetectionPenaltyResult()
{
@ -216,7 +216,7 @@ namespace IW4MAdmin.Plugins.Stats.Cheat
});
}
if (ClientStats.AverageRecoilOffset == 0 && HitCount >= Thresholds.LowSampleMinKills)
if (ClientStats.AverageRecoilOffset == 0 && HitCount >= Thresholds.HighSampleMinKills)
{
results.Add(new DetectionPenaltyResult()
{

View File

@ -569,7 +569,7 @@ namespace IW4MAdmin.Plugins.Stats.Helpers
{
DetectionPenaltyResult result = new DetectionPenaltyResult() { ClientPenalty = EFPenalty.PenaltyType.Any };
#if DEBUG
if (clientDetection.QueuedHits.Count > 0)
if (clientDetection.TrackedHits.Count > 0)
#else
if (clientDetection.TrackedHits.Count > Detection.MAX_TRACKED_HIT_COUNT)
#endif

View File

@ -172,14 +172,14 @@ namespace SharedLibraryCore.Services
{
var now = DateTime.UtcNow;
Expression<Func<EFPenalty, bool>> filter = (p) => new EFPenalty.PenaltyType[]
Expression<Func<EFPenalty, bool>> filter = (p) => (new EFPenalty.PenaltyType[]
{
EFPenalty.PenaltyType.TempBan,
EFPenalty.PenaltyType.Ban,
EFPenalty.PenaltyType.Flag
EFPenalty.PenaltyType.Ban
}.Contains(p.Type) &&
p.Active &&
(p.Expires == null || p.Expires > now);
(p.Expires == null || p.Expires > now)) ||
(p.Type ==EFPenalty.PenaltyType.Flag && p.Active);
using (var context = new DatabaseContext(true))
{