1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-14 17:18:32 -05:00

actually fix the session score concurrency issue

fix rare bug with shared guid kicker plugin
allow hiding of the connection lost notification
This commit is contained in:
RaidMax
2020-04-22 18:46:41 -05:00
parent af441b5987
commit 0e6a7f89b2
10 changed files with 240 additions and 41 deletions

View File

@ -82,36 +82,24 @@ namespace IW4MAdmin.Plugins.Stats.Models
KillStreak = 0;
DeathStreak = 0;
LastScore = 0;
lock (SessionScores)
{
SessionScores.Add(0);
}
SessionScores.Add(0);
Team = IW4Info.Team.None;
}
[NotMapped]
public int SessionScore
{
set
{
SessionScores[SessionScores.Count - 1] = value;
}
set => SessionScores[SessionScores.Count - 1] = value;
get
{
lock (SessionScores)
{
return SessionScores.Sum();
return new List<int>(SessionScores).Sum();
}
}
}
[NotMapped]
public int RoundScore
{
get
{
return SessionScores[SessionScores.Count - 1];
}
}
public int RoundScore => SessionScores[SessionScores.Count - 1];
[NotMapped]
private readonly List<int> SessionScores = new List<int>() { 0 };
[NotMapped]