From c6edd615acfff0406eac16a2a1e93f2235268b69 Mon Sep 17 00:00:00 2001 From: Dydzio Date: Tue, 17 Sep 2024 21:49:21 +0200 Subject: [PATCH] Block possibility to move hero if shift-clicking on path end --- client/adventureMap/AdventureMapInterface.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/adventureMap/AdventureMapInterface.cpp b/client/adventureMap/AdventureMapInterface.cpp index 381e26c86..a781bc869 100644 --- a/client/adventureMap/AdventureMapInterface.cpp +++ b/client/adventureMap/AdventureMapInterface.cpp @@ -555,7 +555,8 @@ void AdventureMapInterface::onTileLeftClicked(const int3 &targetPosition) else //still here? we need to move hero if we clicked end of already selected path or calculate a new path otherwise { if(LOCPLINT->localState->hasPath(currentHero) && - LOCPLINT->localState->getPath(currentHero).endPos() == targetPosition)//we'll be moving + LOCPLINT->localState->getPath(currentHero).endPos() == targetPosition && + !GH.isKeyboardShiftDown())//we'll be moving { assert(!CGI->mh->hasOngoingAnimations()); if(!CGI->mh->hasOngoingAnimations() && LOCPLINT->localState->getPath(currentHero).nextNode().turns == 0)