summaryrefslogtreecommitdiff
path: root/src/being/being.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-05-18 23:57:51 +0300
committerAndrei Karas <akaras@inbox.ru>2016-05-18 23:57:51 +0300
commitd7de4533368a36b77dbc2dbe21269690d8dc5ee5 (patch)
tree66e83823b788015013834dcc7520b0b6bdba68b5 /src/being/being.h
parentdc0102e6eb4ca9a202e190e6ee84b7141d4e0fe1 (diff)
downloadplus-d7de4533368a36b77dbc2dbe21269690d8dc5ee5.tar.gz
plus-d7de4533368a36b77dbc2dbe21269690d8dc5ee5.tar.bz2
plus-d7de4533368a36b77dbc2dbe21269690d8dc5ee5.tar.xz
plus-d7de4533368a36b77dbc2dbe21269690d8dc5ee5.zip
Fix random one tile desync in SMSG_BEING_MOVE3 packet.
Diffstat (limited to 'src/being/being.h')
-rw-r--r--src/being/being.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/being/being.h b/src/being/being.h
index 0386f3290..296038876 100644
--- a/src/being/being.h
+++ b/src/being/being.h
@@ -136,7 +136,18 @@ class Being notfinal : public ActorSprite,
/**
* Creates a path for the being from current position to ex and ey
*/
- void setDestination(const int dstX, const int dstY) restrict2;
+ void setDestination(const int dstX,
+ const int dstY) restrict2;
+
+ void setCachedDestination(const int dstX,
+ const int dstY) restrict2
+ { mCachedX = dstX; mCachedY = dstY; }
+
+ int getCachedX() const A_WARN_UNUSED
+ { return mCachedX; }
+
+ int getCachedY() const A_WARN_UNUSED
+ { return mCachedY; }
/**
* Returns the destination for this being.
@@ -1170,6 +1181,8 @@ class Being notfinal : public ActorSprite,
int mX; // position in tiles
int mY; // position in tiles
+ int mCachedX;
+ int mCachedY;
int mSortOffsetY; // caculated offset in pixels based on mPixelOffsetY
int mPixelOffsetY; // tile height offset in pixels
// calculated between tiles