mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-26 03:52:01 +02:00
Fix activation of world view on end turn in multiplayer
This commit is contained in:
parent
e8c3252214
commit
dde5cea601
@ -374,7 +374,7 @@ void AdventureMapInterface::onEnemyTurnStarted(PlayerColor playerID, bool isHuma
|
||||
mapAudio->onEnemyTurnStarted();
|
||||
widget->getMinimap()->setAIRadar(!isHuman);
|
||||
widget->getInfoBar()->startEnemyTurn(playerID);
|
||||
setState(isHuman ? EAdventureState::OTHER_HUMAN_PLAYER_TURN : EAdventureState::AI_PLAYER_TURN);
|
||||
setState(isHuman ? EAdventureState::MAKING_TURN : EAdventureState::AI_PLAYER_TURN);
|
||||
}
|
||||
|
||||
void AdventureMapInterface::setState(EAdventureState state)
|
||||
|
@ -518,7 +518,7 @@ bool AdventureMapShortcuts::optionCanVisitObject()
|
||||
auto * hero = LOCPLINT->localState->getCurrentHero();
|
||||
auto objects = LOCPLINT->cb->getVisitableObjs(hero->visitablePos());
|
||||
|
||||
assert(vstd::contains(objects,hero));
|
||||
//assert(vstd::contains(objects,hero));
|
||||
return objects.size() > 1; // there is object other than our hero
|
||||
}
|
||||
|
||||
@ -553,26 +553,25 @@ bool AdventureMapShortcuts::optionSpellcasting()
|
||||
|
||||
bool AdventureMapShortcuts::optionInMapView()
|
||||
{
|
||||
return state == EAdventureState::MAKING_TURN || state == EAdventureState::OTHER_HUMAN_PLAYER_TURN;
|
||||
return state == EAdventureState::MAKING_TURN;
|
||||
}
|
||||
|
||||
bool AdventureMapShortcuts::optionInWorldView()
|
||||
{
|
||||
return state == EAdventureState::WORLD_VIEW || state == EAdventureState::OTHER_HUMAN_PLAYER_TURN;
|
||||
return state == EAdventureState::WORLD_VIEW;
|
||||
}
|
||||
|
||||
bool AdventureMapShortcuts::optionSidePanelActive()
|
||||
{
|
||||
return state == EAdventureState::MAKING_TURN || state == EAdventureState::WORLD_VIEW || state == EAdventureState::OTHER_HUMAN_PLAYER_TURN;
|
||||
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;
|
||||
return state == EAdventureState::MAKING_TURN || state == EAdventureState::WORLD_VIEW;
|
||||
}
|
||||
|
||||
bool AdventureMapShortcuts::optionMapViewActive()
|
||||
{
|
||||
return state == EAdventureState::MAKING_TURN || state == EAdventureState::WORLD_VIEW || state == EAdventureState::CASTING_SPELL
|
||||
|| state == EAdventureState::OTHER_HUMAN_PLAYER_TURN;
|
||||
return state == EAdventureState::MAKING_TURN || state == EAdventureState::WORLD_VIEW || state == EAdventureState::CASTING_SPELL;
|
||||
}
|
||||
|
@ -15,7 +15,6 @@ enum class EAdventureState
|
||||
HOTSEAT_WAIT,
|
||||
MAKING_TURN,
|
||||
AI_PLAYER_TURN,
|
||||
OTHER_HUMAN_PLAYER_TURN,
|
||||
CASTING_SPELL,
|
||||
WORLD_VIEW
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user