diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-02-22 04:17:58 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-02-22 04:17:58 +0300 |
commit | 5448377e2a38bf1186f17d9ae035cbcc68b9dc11 (patch) | |
tree | bf0f719dcf960222c2dde2cb07b18487d3b7002c | |
parent | f95e58406341d5672048ed9dca293beea9ee6b2c (diff) | |
download | manaplus-5448377e2a38bf1186f17d9ae035cbcc68b9dc11.tar.gz manaplus-5448377e2a38bf1186f17d9ae035cbcc68b9dc11.tar.bz2 manaplus-5448377e2a38bf1186f17d9ae035cbcc68b9dc11.tar.xz manaplus-5448377e2a38bf1186f17d9ae035cbcc68b9dc11.zip |
Dont calculate dynamic sort offset.
Probably it should be removed.
-rw-r--r-- | src/being/being.cpp | 11 | ||||
-rw-r--r-- | src/being/being.h | 1 |
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; |