diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-07-29 11:27:29 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-07-29 18:35:05 +0300 |
commit | 3941d588a3233176416edf90d1f248ac4cb0fe5e (patch) | |
tree | b5cb4e2adbdda4e7ee3ae930ea012162badf27e7 /src/being/being.h | |
parent | 3b8a3b84346700abffa52745245310bf3eae6b18 (diff) | |
download | manaverse-3941d588a3233176416edf90d1f248ac4cb0fe5e.tar.gz manaverse-3941d588a3233176416edf90d1f248ac4cb0fe5e.tar.bz2 manaverse-3941d588a3233176416edf90d1f248ac4cb0fe5e.tar.xz manaverse-3941d588a3233176416edf90d1f248ac4cb0fe5e.zip |
Fix sprites draw order with non zero map heights.
Diffstat (limited to 'src/being/being.h')
-rw-r--r-- | src/being/being.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/being/being.h b/src/being/being.h index 776af36dc..c9d343659 100644 --- a/src/being/being.h +++ b/src/being/being.h @@ -872,6 +872,7 @@ class Being notfinal : public ActorSprite, int getSortPixelY() const A_WARN_UNUSED { return static_cast<int>(mPos.y) - mYDiff - mSortOffsetY; } +// { return static_cast<int>(mPos.y) - mYDiff - mSortOffsetY + 16; } void setMap(Map *const map); @@ -1008,10 +1009,12 @@ class Being notfinal : public ActorSprite, Being *mOwner; Particle *mSpecialParticle; - int mX; // position in tiles - int mY; // position in tiles - int mSortOffsetY; // caculated offset in pixels based on mOffsetY - int mOffsetY; // fixed tile height offset in pixels + int mX; // position in tiles + int mY; // position in tiles + int mSortOffsetY; // caculated offset in pixels based on mOffsetY + int mOffsetY; // tile height offset in pixels + // calculated between tiles + int mFixedOffsetY; // fixed tile height offset in pixels for tile uint8_t mOldHeight; int mDamageTaken; |