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:
@ -120,7 +120,7 @@ size_t MapRendererBaseContext::objectGroupIndex(ObjectInstanceID objectID) const
|
||||
Point MapRendererBaseContext::objectImageOffset(ObjectInstanceID objectID, const int3 & coordinates) const
|
||||
{
|
||||
const CGObjectInstance * object = getObject(objectID);
|
||||
int3 offsetTiles(object->getPosition() - coordinates);
|
||||
int3 offsetTiles(object->anchorPos() - coordinates);
|
||||
return Point(offsetTiles) * Point(32, 32);
|
||||
}
|
||||
|
||||
@ -498,7 +498,7 @@ size_t MapRendererWorldViewContext::overlayImageIndex(const int3 & coordinates)
|
||||
{
|
||||
const auto * object = getObject(objectID);
|
||||
|
||||
if(!object->visitableAt(coordinates.x, coordinates.y))
|
||||
if(!object->visitableAt(coordinates))
|
||||
continue;
|
||||
|
||||
ObjectPosInfo info(object);
|
||||
|
Reference in New Issue
Block a user