mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-14 09:05:19 +02:00
Merge remote-tracking branch 'oblomov/me_cmd'
This commit is contained in:
20
src/game.cpp
20
src/game.cpp
@@ -114,18 +114,6 @@ struct TextDestChat : public TextDest
|
||||
// Discard empty line
|
||||
if(text == L"")
|
||||
return;
|
||||
|
||||
// Parse command (server command starts with "/#")
|
||||
if(text[0] == L'/' && text[1] != L'#')
|
||||
{
|
||||
std::wstring reply = L"Local: ";
|
||||
|
||||
reply += L"Local commands not yet supported. "
|
||||
L"Server prefix is \"/#\".";
|
||||
|
||||
m_client->addChatMessage(reply);
|
||||
return;
|
||||
}
|
||||
|
||||
// Send to others
|
||||
m_client->sendChatMessage(text);
|
||||
@@ -1332,6 +1320,14 @@ void the_game(
|
||||
&g_menumgr, dest,
|
||||
L""))->drop();
|
||||
}
|
||||
else if(input->wasKeyDown(getKeySetting("keymap_cmd")))
|
||||
{
|
||||
TextDest *dest = new TextDestChat(&client);
|
||||
|
||||
(new GUITextInputMenu(guienv, guiroot, -1,
|
||||
&g_menumgr, dest,
|
||||
L"/"))->drop();
|
||||
}
|
||||
else if(input->wasKeyDown(getKeySetting("keymap_freemove")))
|
||||
{
|
||||
if(g_settings.getBool("free_move"))
|
||||
|
Reference in New Issue
Block a user