fix old bug of auto unflag not working
fix wrong thresholds on recoil
This commit is contained in:
parent
8119ff9f83
commit
421e90cf70
@ -205,7 +205,7 @@ namespace IW4MAdmin.Plugins.Stats.Cheat
|
|||||||
var lifeTimeHits = ClientStats.HitLocations.Sum(_loc => _loc.HitCount);
|
var lifeTimeHits = ClientStats.HitLocations.Sum(_loc => _loc.HitCount);
|
||||||
ClientStats.AverageRecoilOffset = (ClientStats.AverageRecoilOffset * (lifeTimeHits - 1) + hitRecoilAverage) / lifeTimeHits;
|
ClientStats.AverageRecoilOffset = (ClientStats.AverageRecoilOffset * (lifeTimeHits - 1) + hitRecoilAverage) / lifeTimeHits;
|
||||||
|
|
||||||
if (sessionAverageRecoilAmount == 0 && HitCount > Thresholds.MediumSampleMinKills)
|
if (sessionAverageRecoilAmount == 0 && HitCount > Thresholds.LowSampleMinKills)
|
||||||
{
|
{
|
||||||
results.Add(new DetectionPenaltyResult()
|
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()
|
results.Add(new DetectionPenaltyResult()
|
||||||
{
|
{
|
||||||
|
@ -569,7 +569,7 @@ namespace IW4MAdmin.Plugins.Stats.Helpers
|
|||||||
{
|
{
|
||||||
DetectionPenaltyResult result = new DetectionPenaltyResult() { ClientPenalty = EFPenalty.PenaltyType.Any };
|
DetectionPenaltyResult result = new DetectionPenaltyResult() { ClientPenalty = EFPenalty.PenaltyType.Any };
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
if (clientDetection.QueuedHits.Count > 0)
|
if (clientDetection.TrackedHits.Count > 0)
|
||||||
#else
|
#else
|
||||||
if (clientDetection.TrackedHits.Count > Detection.MAX_TRACKED_HIT_COUNT)
|
if (clientDetection.TrackedHits.Count > Detection.MAX_TRACKED_HIT_COUNT)
|
||||||
#endif
|
#endif
|
||||||
|
@ -172,14 +172,14 @@ namespace SharedLibraryCore.Services
|
|||||||
{
|
{
|
||||||
var now = DateTime.UtcNow;
|
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.TempBan,
|
||||||
EFPenalty.PenaltyType.Ban,
|
EFPenalty.PenaltyType.Ban
|
||||||
EFPenalty.PenaltyType.Flag
|
|
||||||
}.Contains(p.Type) &&
|
}.Contains(p.Type) &&
|
||||||
p.Active &&
|
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))
|
using (var context = new DatabaseContext(true))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user