summaryrefslogtreecommitdiff
path: root/src/actor.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-11-13 23:33:45 +0300
committerAndrei Karas <akaras@inbox.ru>2011-11-13 23:33:45 +0300
commitaad864d74e74e89e9d8ec11774d115046a3668cb (patch)
tree36636714c652a8891f8618763017438855c7dbb1 /src/actor.h
parent1da8072253138fe2b6f4139cf3b2488edaff74c4 (diff)
downloadManaVerse-aad864d74e74e89e9d8ec11774d115046a3668cb.tar.gz
ManaVerse-aad864d74e74e89e9d8ec11774d115046a3668cb.tar.bz2
ManaVerse-aad864d74e74e89e9d8ec11774d115046a3668cb.tar.xz
ManaVerse-aad864d74e74e89e9d8ec11774d115046a3668cb.zip
Fix dead mobs and floor items Y sorting position.
Diffstat (limited to 'src/actor.h')
-rw-r--r--src/actor.h7
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;