(175e9b4e6) Show a message box notifying respawning traitors that they're no longer a traitor. Closes #1409

This commit is contained in:
Joonas Rikkonen
2019-04-23 11:19:27 +03:00
parent b02df8dc87
commit b5cc00810d

View File

@@ -182,6 +182,15 @@ namespace Barotrauma.Networking
}
else
{
//tell the respawning client they're no longer a traitor
if (GameMain.Server.TraitorManager != null && clients[i].Character != null)
{
if (GameMain.Server.TraitorManager.TraitorList.Any(t => t.Character == clients[i].Character))
{
GameMain.Server.SendDirectChatMessage(TextManager.Get("traitorrespawnmessage"), clients[i], ChatMessageType.MessageBox);
}
}
clients[i].Character = character;
character.OwnerClientIP = clients[i].Connection.RemoteEndPoint.Address.ToString();
character.OwnerClientName = clients[i].Name;