mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-15 01:24:45 +02:00
Do not attempt to move if there are active dialogs
This commit is contained in:
@ -22,6 +22,7 @@
|
|||||||
|
|
||||||
#include "../CCallback.h"
|
#include "../CCallback.h"
|
||||||
|
|
||||||
|
#include "../lib/CondSh.h"
|
||||||
#include "../lib/pathfinder/CGPathNode.h"
|
#include "../lib/pathfinder/CGPathNode.h"
|
||||||
#include "../lib/mapObjects/CGHeroInstance.h"
|
#include "../lib/mapObjects/CGHeroInstance.h"
|
||||||
#include "../lib/networkPacks/PacksForClient.h"
|
#include "../lib/networkPacks/PacksForClient.h"
|
||||||
@ -233,7 +234,7 @@ void HeroMovementController::onMoveHeroApplied()
|
|||||||
assert(currentlyMovingHero);
|
assert(currentlyMovingHero);
|
||||||
const auto * hero = currentlyMovingHero;
|
const auto * hero = currentlyMovingHero;
|
||||||
|
|
||||||
bool canMove = LOCPLINT->localState->hasPath(hero) && LOCPLINT->localState->getPath(hero).nextNode().turns == 0;
|
bool canMove = LOCPLINT->localState->hasPath(hero) && LOCPLINT->localState->getPath(hero).nextNode().turns == 0 && !LOCPLINT->showingDialog->get();
|
||||||
bool wantStop = stoppingMovement;
|
bool wantStop = stoppingMovement;
|
||||||
bool canStop = !canMove || canHeroStopAtNode(LOCPLINT->localState->getPath(hero).currNode());
|
bool canStop = !canMove || canHeroStopAtNode(LOCPLINT->localState->getPath(hero).currNode());
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user