summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-02-22 04:17:58 +0300
committerAndrei Karas <akaras@inbox.ru>2016-02-22 04:17:58 +0300
commit5448377e2a38bf1186f17d9ae035cbcc68b9dc11 (patch)
treebf0f719dcf960222c2dde2cb07b18487d3b7002c /src
parentf95e58406341d5672048ed9dca293beea9ee6b2c (diff)
downloadplus-5448377e2a38bf1186f17d9ae035cbcc68b9dc11.tar.gz
plus-5448377e2a38bf1186f17d9ae035cbcc68b9dc11.tar.bz2
plus-5448377e2a38bf1186f17d9ae035cbcc68b9dc11.tar.xz
plus-5448377e2a38bf1186f17d9ae035cbcc68b9dc11.zip
Dont calculate dynamic sort offset.
Probably it should be removed.
Diffstat (limited to 'src')
-rw-r--r--src/being/being.cpp11
-rw-r--r--src/being/being.h1
2 files changed, 3 insertions, 9 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp
index a1163b1b7..5b7bd96bd 100644
--- a/src/being/being.cpp
+++ b/src/being/being.cpp
@@ -1818,16 +1818,11 @@ void Being::logic() restrict2
if (!xOffset && !yOffset)
mNeedPosUpdate = false;
-/*
- mSortOffsetY = (mOldHeight * mapTileSize / 2)
- + (mOffsetY * mapTileSize / 2)
- * (mapTileSize - abs(offset)) / mapTileSize - mFixedOffsetY * mapTileSize / 2;
- const int yOffset2 = yOffset - mSortOffsetY - mFixedOffsetY * mapTileSize / 2;
-*/
const int halfTile = mapTileSize / 2;
const float offset2 = static_cast<float>(mOffsetY * abs(offset)) / 2;
- mSortOffsetY = (mOldHeight - mFixedOffsetY + mOffsetY)
- * halfTile - offset2;
+// mSortOffsetY = (mOldHeight - mFixedOffsetY + mOffsetY)
+// * halfTile - offset2;
+ mSortOffsetY = 0;
const float yOffset3 = (mY + 1) * mapTileSize + yOffset
- (mOldHeight + mOffsetY) * halfTile + offset2;
diff --git a/src/being/being.h b/src/being/being.h
index fb2931009..ed6a17fac 100644
--- a/src/being/being.h
+++ b/src/being/being.h
@@ -892,7 +892,6 @@ class Being notfinal : public ActorSprite,
int getSortPixelY() const restrict2 override A_WARN_UNUSED
{ return CAST_S32(mPos.y) - mYDiff - mSortOffsetY; }
-// { return CAST_S32(mPos.y) - mYDiff - mSortOffsetY + 16; }
void setMap(Map *restrict const map) restrict2 override;