diff --git a/client/adventureMap/AdventureMapInterface.cpp b/client/adventureMap/AdventureMapInterface.cpp index 5d9c0a276..0f7ef98e2 100644 --- a/client/adventureMap/AdventureMapInterface.cpp +++ b/client/adventureMap/AdventureMapInterface.cpp @@ -192,7 +192,7 @@ void AdventureMapInterface::handleMapScrollingUpdate(uint32_t timePassed) Point scrollDelta = scrollDirection * scrollDistance; bool cursorInScrollArea = scrollDelta != Point(0,0); - bool scrollingActive = cursorInScrollArea && isActive() && shortcuts->optionSidePanelActive() && !scrollingWasBlocked; + bool scrollingActive = cursorInScrollArea && shortcuts->optionMapScrollingActive() && !scrollingWasBlocked; bool scrollingBlocked = GH.isKeyboardCtrlDown() || !settings["adventure"]["borderScroll"].Bool(); if (!scrollingWasActive && scrollingBlocked) @@ -323,7 +323,7 @@ void AdventureMapInterface::onEnemyTurnStarted(PlayerColor playerID, bool isHuma mapAudio->onEnemyTurnStarted(); widget->getMinimap()->setAIRadar(!isHuman); widget->getInfoBar()->startEnemyTurn(LOCPLINT->cb->getCurrentPlayer()); - setState(EAdventureState::ENEMY_TURN); + setState(isHuman ? EAdventureState::OTHER_HUMAN_PLAYER_TURN : EAdventureState::AI_PLAYER_TURN); } void AdventureMapInterface::setState(EAdventureState state) diff --git a/client/adventureMap/AdventureMapShortcuts.cpp b/client/adventureMap/AdventureMapShortcuts.cpp index 722814d08..3fb44f0dc 100644 --- a/client/adventureMap/AdventureMapShortcuts.cpp +++ b/client/adventureMap/AdventureMapShortcuts.cpp @@ -461,7 +461,13 @@ bool AdventureMapShortcuts::optionSidePanelActive() return state == EAdventureState::MAKING_TURN || state == EAdventureState::WORLD_VIEW; } +bool AdventureMapShortcuts::optionMapScrollingActive() +{ + return state == EAdventureState::MAKING_TURN || state == EAdventureState::WORLD_VIEW || (state == EAdventureState::OTHER_HUMAN_PLAYER_TURN); +} + bool AdventureMapShortcuts::optionMapViewActive() { - return state == EAdventureState::MAKING_TURN || state == EAdventureState::WORLD_VIEW || state == EAdventureState::CASTING_SPELL; + return state == EAdventureState::MAKING_TURN || state == EAdventureState::WORLD_VIEW || state == EAdventureState::CASTING_SPELL + || (state == EAdventureState::OTHER_HUMAN_PLAYER_TURN); } diff --git a/client/adventureMap/AdventureMapShortcuts.h b/client/adventureMap/AdventureMapShortcuts.h index 770e40fa2..8e86779a7 100644 --- a/client/adventureMap/AdventureMapShortcuts.h +++ b/client/adventureMap/AdventureMapShortcuts.h @@ -81,6 +81,7 @@ public: bool optionInMapView(); bool optionInWorldView(); bool optionSidePanelActive(); + bool optionMapScrollingActive(); bool optionMapViewActive(); void setState(EAdventureState newState); diff --git a/client/adventureMap/AdventureState.h b/client/adventureMap/AdventureState.h index 628e8f976..32bfc2e2d 100644 --- a/client/adventureMap/AdventureState.h +++ b/client/adventureMap/AdventureState.h @@ -14,7 +14,8 @@ enum class EAdventureState NOT_INITIALIZED, HOTSEAT_WAIT, MAKING_TURN, - ENEMY_TURN, + AI_PLAYER_TURN, + OTHER_HUMAN_PLAYER_TURN, CASTING_SPELL, WORLD_VIEW };