The host can send chat messages, fixed client not being passed to ServerRead methods

This commit is contained in:
Regalis
2016-12-09 16:45:08 +02:00
parent e4744e8385
commit bea523187b
4 changed files with 21 additions and 6 deletions
+13 -2
View File
@@ -1200,8 +1200,19 @@ namespace Barotrauma.Networking
if (c.Character != traitor) continue;
traitorClient = c;
break;
}
}
}
public override void SendChatMessage(string message, ChatMessageType? type = null)
{
type = ChatMessageType.Default;
ChatMessage chatMessage = ChatMessage.Create(
gameStarted && myCharacter != null ? myCharacter.Name : name,
message, (ChatMessageType)type, gameStarted ? myCharacter : null);
AddChatMessage(chatMessage);
}
public override void Draw(Microsoft.Xna.Framework.Graphics.SpriteBatch spriteBatch)