Reserve language info for translation
This commit is contained in:
parent
a9684f31e6
commit
7c83a4f9f3
@ -1570,7 +1570,8 @@ void ClientLobby::handleClientCommand(const std::string& cmd)
|
||||
{
|
||||
// Send for server command
|
||||
NetworkString* cmd_ns = getNetworkString(1);
|
||||
cmd_ns->addUInt8(LE_COMMAND).encodeString(cmd);
|
||||
const std::string& language = UserConfigParams::m_language;
|
||||
cmd_ns->addUInt8(LE_COMMAND).encodeString(language).encodeString(cmd);
|
||||
sendToServer(cmd_ns, /*reliable*/true);
|
||||
delete cmd_ns;
|
||||
}
|
||||
|
@ -4896,6 +4896,8 @@ bool ServerLobby::checkPeersReady(bool ignore_ai_peer) const
|
||||
void ServerLobby::handleServerCommand(Event* event, STKPeer* peer) const
|
||||
{
|
||||
NetworkString& data = event->data();
|
||||
std::string language;
|
||||
data.decodeString(&language);
|
||||
std::string cmd;
|
||||
data.decodeString(&cmd);
|
||||
auto argv = StringUtils::split(cmd, ' ');
|
||||
|
Loading…
Reference in New Issue
Block a user