1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-04 09:42:40 +02:00

Merge pull request #4615 from dydzio0614/adventure-map-selectionmode-fix

Block ability to move on adventure map when holding shift
This commit is contained in:
Ivan Savenko 2024-09-18 15:43:31 +03:00 committed by GitHub
commit 30619c369b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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)