mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-26 03:52:01 +02:00
Do not hide minimap on human player turn
This commit is contained in:
parent
8b61c0d59b
commit
4e80356bea
@ -183,7 +183,10 @@ void CPlayerInterface::playerStartsTurn(PlayerColor player)
|
||||
if (player != playerID && LOCPLINT == this)
|
||||
{
|
||||
waitWhileDialog();
|
||||
adventureInt->onEnemyTurnStarted(player);
|
||||
|
||||
bool isHuman = cb->getStartInfo()->playerInfos.count(player) && cb->getStartInfo()->playerInfos.at(player).isControlledByHuman();
|
||||
|
||||
adventureInt->onEnemyTurnStarted(player, isHuman);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -309,13 +309,13 @@ void AdventureMapInterface::onHotseatWaitStarted(PlayerColor playerID)
|
||||
setState(EAdventureState::HOTSEAT_WAIT);
|
||||
}
|
||||
|
||||
void AdventureMapInterface::onEnemyTurnStarted(PlayerColor playerID)
|
||||
void AdventureMapInterface::onEnemyTurnStarted(PlayerColor playerID, bool isHuman)
|
||||
{
|
||||
if(settings["session"]["spectate"].Bool())
|
||||
return;
|
||||
|
||||
mapAudio->onEnemyTurnStarted();
|
||||
widget->getMinimap()->setAIRadar(true);
|
||||
widget->getMinimap()->setAIRadar(!isHuman);
|
||||
widget->getInfoBar()->startEnemyTurn(LOCPLINT->cb->getCurrentPlayer());
|
||||
setState(EAdventureState::ENEMY_TURN);
|
||||
}
|
||||
|
@ -115,7 +115,7 @@ public:
|
||||
void onHotseatWaitStarted(PlayerColor playerID);
|
||||
|
||||
/// Called by PlayerInterface when AI or remote human player starts his turn
|
||||
void onEnemyTurnStarted(PlayerColor playerID);
|
||||
void onEnemyTurnStarted(PlayerColor playerID, bool isHuman);
|
||||
|
||||
/// Called by PlayerInterface when local human player starts his turn
|
||||
void onPlayerTurnStarted(PlayerColor playerID);
|
||||
|
@ -231,7 +231,7 @@ void CMinimap::setAIRadar(bool on)
|
||||
redraw();
|
||||
}
|
||||
|
||||
void CMinimap::updateTiles(std::unordered_set<int3> positions)
|
||||
void CMinimap::updateTiles(const std::unordered_set<int3> & positions)
|
||||
{
|
||||
if(minimap)
|
||||
{
|
||||
|
@ -68,6 +68,6 @@ public:
|
||||
|
||||
void showAll(Canvas & to) override;
|
||||
|
||||
void updateTiles(std::unordered_set<int3> positions);
|
||||
void updateTiles(const std::unordered_set<int3> & positions);
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user