summaryrefslogtreecommitdiff
path: root/src/being/being.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-09-17 21:33:43 +0300
committerAndrei Karas <akaras@inbox.ru>2013-09-17 21:33:43 +0300
commit293d5be21d3f23102ed6d507fea3dc56a5df8024 (patch)
tree12701e6acf8ae1ff4dcc0efdd21c528231585140 /src/being/being.cpp
parent17f2adad3ba9e6a5c64d2d923d9cbb190f234b6f (diff)
downloadManaVerse-293d5be21d3f23102ed6d507fea3dc56a5df8024.tar.gz
ManaVerse-293d5be21d3f23102ed6d507fea3dc56a5df8024.tar.bz2
ManaVerse-293d5be21d3f23102ed6d507fea3dc56a5df8024.tar.xz
ManaVerse-293d5be21d3f23102ed6d507fea3dc56a5df8024.zip
fix heights offset on spawn time.
Diffstat (limited to 'src/being/being.cpp')
-rw-r--r--src/being/being.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp
index 6d1307fab..5b1e49a8c 100644
--- a/src/being/being.cpp
+++ b/src/being/being.cpp
@@ -3056,3 +3056,18 @@ void Being::setLook(const int look)
if (mType == PLAYER)
setSubtype(mSubType, look);
}
+
+void Being::setTileCoords(const int x, const int y)
+{
+ mX = x;
+ mY = y;
+ if (mMap)
+ mOffsetY = mMap->getHeightOffset(mX, mY);
+}
+
+void Being::setMap(Map *const map)
+{
+ Actor::setMap(map);
+ if (mMap)
+ mOffsetY = mMap->getHeightOffset(mX, mY);
+}