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:
@ -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]
|
||||
|
Reference in New Issue
Block a user