mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-15 01:24:45 +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 townVisitablePos = t->visitablePos();
|
||||||
int3 correctedPos = townVisitablePos + h->getVisitableOffset();
|
int3 correctedPos = townVisitablePos + h->getVisitableOffset();
|
||||||
|
|
||||||
|
map->removeBlockVisTiles(h);
|
||||||
h->pos = correctedPos;
|
h->pos = correctedPos;
|
||||||
|
map->addBlockVisTiles(h);
|
||||||
|
|
||||||
assert(t->visitableAt(h->visitablePos().x, h->visitablePos().y));
|
assert(t->visitableAt(h->visitablePos().x, h->visitablePos().y));
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user