Merge branch '2.3' into 2.4-pr
This commit is contained in:
commit
c1a825f8f2
@ -551,18 +551,15 @@ namespace IW4MAdmin.Plugins.Stats.Helpers
|
|||||||
clientStats.HitLocations.Single(hl => hl.Location == hit.HitLoc).HitCount += 1;
|
clientStats.HitLocations.Single(hl => hl.Location == hit.HitLoc).HitCount += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (Plugin.Config.Configuration().StoreClientKills)
|
if (Plugin.Config.Configuration().StoreClientKills)
|
||||||
{
|
|
||||||
lock (_hitCache)
|
|
||||||
{
|
{
|
||||||
_hitCache.Add(hit);
|
_hitCache.Add(hit);
|
||||||
|
|
||||||
if (_hitCache.Count > Detection.MAX_TRACKED_HIT_COUNT)
|
if (_hitCache.Count > Detection.MAX_TRACKED_HIT_COUNT)
|
||||||
{
|
{
|
||||||
|
OnProcessingPenalty.Wait();
|
||||||
using (var ctx = new DatabaseContext())
|
using (var ctx = new DatabaseContext())
|
||||||
{
|
{
|
||||||
ctx.AddRange(_hitCache);
|
ctx.AddRange(_hitCache);
|
||||||
@ -570,7 +567,7 @@ namespace IW4MAdmin.Plugins.Stats.Helpers
|
|||||||
}
|
}
|
||||||
|
|
||||||
_hitCache.Clear();
|
_hitCache.Clear();
|
||||||
}
|
OnProcessingPenalty.Release();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user