diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-11-13 23:33:45 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-11-13 23:33:45 +0300 |
commit | aad864d74e74e89e9d8ec11774d115046a3668cb (patch) | |
tree | 36636714c652a8891f8618763017438855c7dbb1 /src/actor.h | |
parent | 1da8072253138fe2b6f4139cf3b2488edaff74c4 (diff) | |
download | manaplus-aad864d74e74e89e9d8ec11774d115046a3668cb.tar.gz manaplus-aad864d74e74e89e9d8ec11774d115046a3668cb.tar.bz2 manaplus-aad864d74e74e89e9d8ec11774d115046a3668cb.tar.xz manaplus-aad864d74e74e89e9d8ec11774d115046a3668cb.zip |
Fix dead mobs and floor items Y sorting position.
Diffstat (limited to 'src/actor.h')
-rw-r--r-- | src/actor.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/actor.h b/src/actor.h index 654141221..9afaff93d 100644 --- a/src/actor.h +++ b/src/actor.h @@ -88,6 +88,12 @@ public: { return static_cast<int>(mPos.y); } /** + * Returns the pixel Y coordinate of the actor for sorting only. + */ + virtual int getSortPixelY() const + { return static_cast<int>(mPos.y) - mYDiff; } + + /** * Returns the x coordinate in tiles of the actor. */ virtual int getTileX() const; @@ -121,6 +127,7 @@ public: protected: Map *mMap; Vector mPos; /**< Position in pixels relative to map. */ + int mYDiff; private: Actors::iterator mMapActor; |