summaryrefslogtreecommitdiff
path: root/src/being/flooritem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/being/flooritem.cpp')
-rw-r--r--src/being/flooritem.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/being/flooritem.cpp b/src/being/flooritem.cpp
index a33a5b09b..05352c40f 100644
--- a/src/being/flooritem.cpp
+++ b/src/being/flooritem.cpp
@@ -99,14 +99,18 @@ void FloorItem::postInit(Map *const map, int subX, int subY)
}
mHeightPosDiff = map->getHeightOffset(mX, mY) * 16;
- mPos.x = static_cast<float>(mX * map->getTileWidth()
- + subX + mapTileSize / 2);
- mPos.y = static_cast<float>(mY * map->getTileHeight()
- + subY + mapTileSize - mHeightPosDiff);
+ mPixelX = mX * map->getTileWidth()
+ + subX + mapTileSize / 2;
+ mPixelY = mY * map->getTileHeight()
+ + subY + mapTileSize - mHeightPosDiff;
+ mPos.x = static_cast<float>(mPixelX);
+ mPos.y = static_cast<float>(mPixelY);
mYDiff = 31 - mHeightPosDiff;
}
else
{
+ mPixelX = 0;
+ mPixelY = 0;
mPos.x = 0;
mPos.y = 0;
mYDiff = 31;