mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/LCE-Revelations.git
synced 2026-05-22 01:45:11 +00:00
fix: chat color codes not rendering in singleplayer
PlayerConnection::handleChat called FormatChatMessage with applyStyling=false before broadcasting, which stripped all color codes from the message. The client then had nothing left to format. Send the raw message and let the client handle formatting on receive.
This commit is contained in:
@@ -969,7 +969,7 @@ void PlayerConnection::handleChat(shared_ptr<ChatPacket> packet)
|
||||
}
|
||||
#else
|
||||
wstring formatted = L"<" + player->name + L"> " + message;
|
||||
server->getPlayers()->broadcastAll(shared_ptr<ChatPacket>(new ChatPacket(app.FormatChatMessage(formatted, false))));
|
||||
server->getPlayers()->broadcastAll(shared_ptr<ChatPacket>(new ChatPacket(formatted)));
|
||||
#endif
|
||||
chatSpamTickCount += SharedConstants::TICKS_PER_SECOND;
|
||||
if (chatSpamTickCount > SharedConstants::TICKS_PER_SECOND * 10)
|
||||
|
||||
Reference in New Issue
Block a user