1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-03-25 21:38:59 +02:00

Fix for mislaced hero rescued from Prison - https://bugs.vcmi.eu/view.php?id=3227

This commit is contained in:
Tomasz Zieliński 2022-09-09 19:22:31 +02:00 committed by Andrii Danylchenko
parent a83753a7d2
commit efb6580958

View File

@ -210,6 +210,11 @@ void CGObjectInstance::setType(si32 ID, si32 subID)
appearance = handler->getTemplates(tile.terType)[0];
else
appearance = handler->getTemplates()[0]; // get at least some appearance since alternative is crash
if (ID == Obj::HERO)
{
//adjust for the prison offset
pos = visitablePos();
}
cb->gameState()->map->addBlockVisTiles(this);
}