1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-25 00:37:24 +02:00

Fixed remaining regressions

This commit is contained in:
Ivan Savenko
2023-04-19 17:38:25 +03:00
parent bb08a0afc8
commit 80b37a3019
5 changed files with 43 additions and 22 deletions

View File

@ -415,7 +415,7 @@ void ClientCommandManager::handleTellCommand(std::istringstream& singleWordBuffe
void ClientCommandManager::handleMpCommand()
{
if(const CGHeroInstance* h = adventureInt->getCurrentHero())
if(const CGHeroInstance* h = LOCPLINT->localState->getCurrentHero())
printCommandMessage(std::to_string(h->movement) + "; max: " + std::to_string(h->maxMovePoints(true)) + "/" + std::to_string(h->maxMovePoints(false)) + "\n");
}
@ -601,7 +601,7 @@ void ClientCommandManager::processCommand(const std::string & message, bool call
else if(commandName == "tell")
handleTellCommand(singleWordBuffer);
else if(commandName == "mp" && adventureInt)
else if(commandName == "mp" && LOCPLINT)
handleMpCommand();
else if (commandName == "set")