Fixed dead/spectator chat. Closes #264

This commit is contained in:
Joonas Rikkonen
2018-02-22 11:34:33 +02:00
parent 23b59dd70b
commit 27ded3e5a3

View File

@@ -186,7 +186,10 @@ namespace Barotrauma.Networking
GameMain.Server.SendChatMessage(denyMsg, c);
return;
}
if (c.Character != null && !c.Character.CanSpeak) return;
//dead characters are allowed to send chat messages,
//we'll just switch the message type to dead chat in SendChatMessage
if (c.Character != null && (!c.Character.CanSpeak && !c.Character.IsDead)) return;
GameMain.Server.SendChatMessage(txt, null, c);
}