1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-05 00:49:09 +02:00

Fix crash, fix invisible boat blocking the tile

This commit is contained in:
Tomasz Zieliński
2023-08-01 18:51:33 +02:00
parent e484066772
commit f6247164ad
5 changed files with 26 additions and 15 deletions

View File

@ -1382,9 +1382,8 @@ void HeroRecruited::applyGs(CGameState * gs) const
auto * boat = dynamic_cast<CGBoat *>(obj);
if (boat)
{
h->boat = boat;
h->attachTo(*boat);
boat->hero = h;
gs->map->removeBlockVisTiles(boat);
h->attachToBoat(boat);
}
}
@ -1419,9 +1418,8 @@ void GiveHero::applyGs(CGameState * gs) const
auto * boat = dynamic_cast<CGBoat *>(obj);
if (boat)
{
h->boat = boat;
h->attachTo(*boat);
boat->hero = h;
gs->map->removeBlockVisTiles(boat);
h->attachToBoat(boat);
}
}