1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Remove client-side chat prediction. (#5055)

Network lag isn't really a big issue with chat and chat prediction makes writing mods harder.
This commit is contained in:
red-001 2017-01-16 23:09:47 +00:00 committed by Loïc Blot
parent d2f5732f89
commit 2f56a00d9e
4 changed files with 17 additions and 4 deletions

View file

@ -1563,10 +1563,13 @@ void Client::typeChatMessage(const std::wstring &message)
}
else
{
LocalPlayer *player = m_env.getLocalPlayer();
assert(player != NULL);
std::wstring name = narrow_to_wide(player->getName());
m_chat_queue.push((std::wstring)L"<" + name + L"> " + message);
// compatibility code
if (m_proto_ver < 29) {
LocalPlayer *player = m_env.getLocalPlayer();
assert(player != NULL);
std::wstring name = narrow_to_wide(player->getName());
m_chat_queue.push((std::wstring)L"<" + name + L"> " + message);
}
}
}