1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-15 01:24:45 +02:00

Use / as command prefix

This commit is contained in:
Dydzio
2023-01-06 22:53:10 +01:00
parent 4157feb2f3
commit 7708885cf9

View File

@ -1155,10 +1155,13 @@ void CInGameConsole::endEnteringText(bool processEnteredText)
LOCPLINT->cb->sendMessage(txt, LOCPLINT->getSelection()); LOCPLINT->cb->sendMessage(txt, LOCPLINT->getSelection());
previouslyEntered.push_back(txt); previouslyEntered.push_back(txt);
if(txt.at(0) == '/')
{
//some commands like gosolo don't work when executed from GUI thread //some commands like gosolo don't work when executed from GUI thread
boost::thread clientCommandThread(ClientCommandManager::processCommand, txt, true); boost::thread clientCommandThread(ClientCommandManager::processCommand, txt.substr(1), true);
clientCommandThread.join(); clientCommandThread.join();
} }
}
enteredText.clear(); enteredText.clear();
auto statusbar = currentStatusBar.lock(); auto statusbar = currentStatusBar.lock();