summaryrefslogtreecommitdiff
path: root/src/being/flooritem.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-03-05 03:23:24 +0300
committerAndrei Karas <akaras@inbox.ru>2016-03-05 03:23:24 +0300
commit3f43bdd12b50a2ff3afb687fd3d2101865e946f2 (patch)
tree218051a0398f77ea3ca555ba706daea82a32f8e0 /src/being/flooritem.cpp
parent31782ba3cdeced9baa91739c55e9ae819d70d616 (diff)
downloadManaVerse-3f43bdd12b50a2ff3afb687fd3d2101865e946f2.tar.gz
ManaVerse-3f43bdd12b50a2ff3afb687fd3d2101865e946f2.tar.bz2
ManaVerse-3f43bdd12b50a2ff3afb687fd3d2101865e946f2.tar.xz
ManaVerse-3f43bdd12b50a2ff3afb687fd3d2101865e946f2.zip
Use in most places int being positions and not float.
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;