mirror of
https://github.com/vcmi/vcmi.git
synced 2025-04-13 11:40:38 +02:00
Merge remote-tracking branch 'upstream/develop' into develop
This commit is contained in:
commit
0d48b6fd19
@ -973,12 +973,11 @@ bool CGameHandler::moveHero(ObjectInstanceID hid, int3 dst, EMovementMode moveme
|
|||||||
doMove(TryMoveHero::TELEPORTATION, guardsCheck, DONT_VISIT_DEST, LEAVING_TILE);
|
doMove(TryMoveHero::TELEPORTATION, guardsCheck, DONT_VISIT_DEST, LEAVING_TILE);
|
||||||
|
|
||||||
// visit town for town portal \ castle gates
|
// visit town for town portal \ castle gates
|
||||||
// do not use generic visitObjectOnTile to avoid double-teleporting
|
// do not visit any other objects, e.g. monoliths to avoid double-teleporting
|
||||||
// if this moveHero call was triggered by teleporter
|
|
||||||
if (objectToVisit)
|
if (objectToVisit)
|
||||||
{
|
{
|
||||||
if (CGTownInstance * town = dynamic_cast<CGTownInstance *>(objectToVisit))
|
if (CGTownInstance * town = dynamic_cast<CGTownInstance *>(objectToVisit))
|
||||||
town->onHeroVisit(h);
|
objectVisited(town, h);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -2143,10 +2142,13 @@ bool CGameHandler::buildStructure(ObjectInstanceID tid, BuildingID requestedID,
|
|||||||
// now when everything is built - reveal tiles for lookout tower
|
// now when everything is built - reveal tiles for lookout tower
|
||||||
changeFogOfWar(t->getSightCenter(), t->getSightRadius(), t->getOwner(), ETileVisibility::REVEALED);
|
changeFogOfWar(t->getSightCenter(), t->getSightRadius(), t->getOwner(), ETileVisibility::REVEALED);
|
||||||
|
|
||||||
if(t->garrisonHero) //garrison hero first - consistent with original H3 Mana Vortex and Battle Scholar Academy levelup windows order
|
if (!force)
|
||||||
objectVisited(t, t->garrisonHero);
|
{
|
||||||
if(t->visitingHero)
|
if(t->garrisonHero) //garrison hero first - consistent with original H3 Mana Vortex and Battle Scholar Academy levelup windows order
|
||||||
objectVisited(t, t->visitingHero);
|
objectVisited(t, t->garrisonHero);
|
||||||
|
if(t->visitingHero)
|
||||||
|
objectVisited(t, t->visitingHero);
|
||||||
|
}
|
||||||
|
|
||||||
checkVictoryLossConditionsForPlayer(t->tempOwner);
|
checkVictoryLossConditionsForPlayer(t->tempOwner);
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user