mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-17 00:07:41 +02:00
Replaced most of accesses to CGObjectInstance::pos with anchorPoint()
This commit is contained in:
@ -49,9 +49,9 @@ void MapRendererContextState::addObject(const CGObjectInstance * obj)
|
||||
{
|
||||
for(int fy = 0; fy < obj->getHeight(); ++fy)
|
||||
{
|
||||
int3 currTile(obj->pos.x - fx, obj->pos.y - fy, obj->pos.z);
|
||||
int3 currTile(obj->anchorPos().x - fx, obj->anchorPos().y - fy, obj->anchorPos().z);
|
||||
|
||||
if(LOCPLINT->cb->isInTheMap(currTile) && obj->coveringAt(currTile.x, currTile.y))
|
||||
if(LOCPLINT->cb->isInTheMap(currTile) && obj->coveringAt(currTile))
|
||||
{
|
||||
auto & container = objects[currTile.z][currTile.x][currTile.y];
|
||||
|
||||
@ -73,7 +73,7 @@ void MapRendererContextState::addMovingObject(const CGObjectInstance * object, c
|
||||
{
|
||||
for(int y = yFrom; y <= yDest; ++y)
|
||||
{
|
||||
int3 currTile(x, y, object->pos.z);
|
||||
int3 currTile(x, y, object->anchorPos().z);
|
||||
|
||||
if(LOCPLINT->cb->isInTheMap(currTile))
|
||||
{
|
||||
|
Reference in New Issue
Block a user