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:
@ -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));
|
||||
}
|
||||
|
Reference in New Issue
Block a user