1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-01 00:45:26 +02:00

Update map properly on hero position change

This commit is contained in:
Ivan Savenko
2022-12-04 22:03:25 +02:00
parent b6b6063505
commit 2cc4f59699

View File

@ -1882,7 +1882,10 @@ void CGameState::initVisitingAndGarrisonedHeroes()
{
int3 townVisitablePos = t->visitablePos();
int3 correctedPos = townVisitablePos + h->getVisitableOffset();
map->removeBlockVisTiles(h);
h->pos = correctedPos;
map->addBlockVisTiles(h);
assert(t->visitableAt(h->visitablePos().x, h->visitablePos().y));
}