mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-15 00:05:02 +02:00
Replaced most of accesses to CGObjectInstance::pos with anchorPoint()
This commit is contained in:
@ -1047,7 +1047,7 @@ void ChangeObjPos::applyGs(CGameState *gs)
|
||||
return;
|
||||
}
|
||||
gs->map->removeBlockVisTiles(obj);
|
||||
obj->pos = nPos + obj->getVisitableOffset();
|
||||
obj->setAnchorPos(nPos + obj->getVisitableOffset());
|
||||
gs->map->addBlockVisTiles(obj);
|
||||
}
|
||||
|
||||
@ -1467,7 +1467,7 @@ void GiveHero::applyGs(CGameState *gs)
|
||||
|
||||
h->setOwner(player);
|
||||
h->setMovementPoints(h->movementPointsLimit(true));
|
||||
h->pos = h->convertFromVisitablePos(oldVisitablePos);
|
||||
h->setAnchorPos(h->convertFromVisitablePos(oldVisitablePos));
|
||||
gs->map->heroesOnMap.emplace_back(h);
|
||||
gs->getPlayerState(h->getOwner())->addOwnedObject(h);
|
||||
|
||||
|
Reference in New Issue
Block a user