|
@@ -324,13 +324,13 @@ void CPlayerInterface::heroMoved(const TryMoveHero & details, bool verbose)
|
|
|
if (!hero)
|
|
|
return;
|
|
|
|
|
|
- adventureInt->infoBar->requestPopAll();
|
|
|
- if (details.result == TryMoveHero::EMBARK || details.result == TryMoveHero::DISEMBARK)
|
|
|
- {
|
|
|
- if(hero->getRemovalSound() && hero->tempOwner == playerID)
|
|
|
- CCS->soundh->playSound(hero->getRemovalSound().get());
|
|
|
- }
|
|
|
-
|
|
|
+ adventureInt->infoBar->requestPopAll();
|
|
|
+ if (details.result == TryMoveHero::EMBARK || details.result == TryMoveHero::DISEMBARK)
|
|
|
+ {
|
|
|
+ if(hero->getRemovalSound() && hero->tempOwner == playerID)
|
|
|
+ CCS->soundh->playSound(hero->getRemovalSound().get());
|
|
|
+ }
|
|
|
+
|
|
|
adventureInt->minimap->updateTile(hero->convertToVisitablePos(details.start));
|
|
|
adventureInt->minimap->updateTile(hero->convertToVisitablePos(details.end));
|
|
|
|
|
@@ -372,12 +372,12 @@ void CPlayerInterface::heroMoved(const TryMoveHero & details, bool verbose)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if(details.stopMovement()) //hero failed to move
|
|
|
- {
|
|
|
- stillMoveHero.setn(STOP_MOVE);
|
|
|
- adventureInt->heroList->update(hero);
|
|
|
- return;
|
|
|
- }
|
|
|
+ if(details.stopMovement()) //hero failed to move
|
|
|
+ {
|
|
|
+ stillMoveHero.setn(STOP_MOVE);
|
|
|
+ adventureInt->heroList->update(hero);
|
|
|
+ return;
|
|
|
+ }
|
|
|
|
|
|
adventureInt->heroList->redraw();
|
|
|
|
|
@@ -1201,22 +1201,22 @@ void CPlayerInterface::showMapObjectSelectDialog(QueryID askID, const Component
|
|
|
GH.pushInt(wnd);
|
|
|
}
|
|
|
|
|
|
-void CPlayerInterface::tileRevealed(const std::unordered_set<int3, ShashInt3> &pos)
|
|
|
-{
|
|
|
- EVENT_HANDLER_CALLED_BY_CLIENT;
|
|
|
- //FIXME: wait for dialog? Magi hut/eye would benefit from this but may break other areas
|
|
|
- for (auto & po : pos)
|
|
|
- adventureInt->minimap->updateTile(po);
|
|
|
-}
|
|
|
-
|
|
|
-void CPlayerInterface::tileHidden(const std::unordered_set<int3, ShashInt3> &pos)
|
|
|
-{
|
|
|
- EVENT_HANDLER_CALLED_BY_CLIENT;
|
|
|
- for (auto & po : pos)
|
|
|
- adventureInt->minimap->updateTile(po);
|
|
|
-}
|
|
|
-
|
|
|
-void CPlayerInterface::openHeroWindow(const CGHeroInstance *hero)
|
|
|
+void CPlayerInterface::tileRevealed(const std::unordered_set<int3, ShashInt3> &pos)
|
|
|
+{
|
|
|
+ EVENT_HANDLER_CALLED_BY_CLIENT;
|
|
|
+ //FIXME: wait for dialog? Magi hut/eye would benefit from this but may break other areas
|
|
|
+ for (auto & po : pos)
|
|
|
+ adventureInt->minimap->updateTile(po);
|
|
|
+}
|
|
|
+
|
|
|
+void CPlayerInterface::tileHidden(const std::unordered_set<int3, ShashInt3> &pos)
|
|
|
+{
|
|
|
+ EVENT_HANDLER_CALLED_BY_CLIENT;
|
|
|
+ for (auto & po : pos)
|
|
|
+ adventureInt->minimap->updateTile(po);
|
|
|
+}
|
|
|
+
|
|
|
+void CPlayerInterface::openHeroWindow(const CGHeroInstance *hero)
|
|
|
{
|
|
|
boost::unique_lock<boost::recursive_mutex> un(*pim);
|
|
|
GH.pushIntT<CHeroWindow>(hero);
|