Observers are shown as observers in the RoundEndSummary (#1838)

* Observers are shown as observers in the RoundEndSummary

* Fix typo

Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com>
This commit is contained in:
Exp
2020-08-22 12:45:49 +02:00
committed by GitHub
parent efbd01d0bf
commit 1b634739ac
3 changed files with 24 additions and 10 deletions

View File

@@ -352,6 +352,7 @@ namespace Content.Server.GameTicking
var mind = ply.ContentData().Mind;
if (mind != null)
{
_playersInLobby.TryGetValue(ply, out var status);
var antag = mind.AllRoles.Any(role => role.Antagonist);
var playerEndRoundInfo = new RoundEndPlayerInfo()
{
@@ -360,7 +361,8 @@ namespace Content.Server.GameTicking
Role = antag
? mind.AllRoles.First(role => role.Antagonist).Name
: mind.AllRoles.FirstOrDefault()?.Name ?? Loc.GetString("Unknown"),
Antag = antag
Antag = antag,
Observer = status == PlayerStatus.Observer,
};
listOfPlayerInfo.Add(playerEndRoundInfo);
}