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

Replaced most of accesses to CGObjectInstance::pos with anchorPoint()

This commit is contained in:
Ivan Savenko
2024-10-02 16:40:06 +00:00
parent 7694e2da4b
commit a8f8c3f4b1
40 changed files with 142 additions and 150 deletions

View File

@ -112,7 +112,7 @@ void QuestArtifactPlacer::placeQuestArtifacts(vstd::RNG & rand)
logGlobal->trace("Replacing %s at %s with the quest artifact %s",
objectToReplace->getObjectName(),
objectToReplace->getPosition().toString(),
objectToReplace->anchorPos().toString(),
VLC->artifacts()->getById(artifactToPlace)->getNameTranslated());
//Update appearance. Terrain is irrelevant.
@ -121,7 +121,7 @@ void QuestArtifactPlacer::placeQuestArtifacts(vstd::RNG & rand)
auto templates = handler->getTemplates();
//artifactToReplace->appearance = templates.front();
newObj->appearance = templates.front();
newObj->pos = objectToReplace->pos;
newObj->setAnchorPos(objectToReplace->anchorPos());
mapProxy->insertObject(newObj);
mapProxy->removeObject(objectToReplace);
break;