From b5cc00810db1e75e3616f29cc403a0f46f5b91b1 Mon Sep 17 00:00:00 2001 From: Joonas Rikkonen Date: Tue, 23 Apr 2019 11:19:27 +0300 Subject: [PATCH] (175e9b4e6) Show a message box notifying respawning traitors that they're no longer a traitor. Closes #1409 --- .../BarotraumaServer/Source/Networking/RespawnManager.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Barotrauma/BarotraumaServer/Source/Networking/RespawnManager.cs b/Barotrauma/BarotraumaServer/Source/Networking/RespawnManager.cs index 8b489f1a0..593bec08f 100644 --- a/Barotrauma/BarotraumaServer/Source/Networking/RespawnManager.cs +++ b/Barotrauma/BarotraumaServer/Source/Networking/RespawnManager.cs @@ -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;