From aad864d74e74e89e9d8ec11774d115046a3668cb Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 13 Nov 2011 23:33:45 +0300 Subject: Fix dead mobs and floor items Y sorting position. --- src/actor.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/actor.h') diff --git a/src/actor.h b/src/actor.h index 654141221..9afaff93d 100644 --- a/src/actor.h +++ b/src/actor.h @@ -87,6 +87,12 @@ public: virtual int getPixelY() const { return static_cast(mPos.y); } + /** + * Returns the pixel Y coordinate of the actor for sorting only. + */ + virtual int getSortPixelY() const + { return static_cast(mPos.y) - mYDiff; } + /** * Returns the x coordinate in tiles of the actor. */ @@ -121,6 +127,7 @@ public: protected: Map *mMap; Vector mPos; /**< Position in pixels relative to map. */ + int mYDiff; private: Actors::iterator mMapActor; -- cgit v1.2.3-60-g2f50