diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-10 15:10:51 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-10 15:10:51 +0300 |
commit | ed908d9f4f15fadceeb9c1babab95f00b615004b (patch) | |
tree | f4249a6d051ead6bb5e8cada5945a6dd3861c505 /src/being | |
parent | 279ebfc0831051375d8b7cc2b8bf4f60a19397c9 (diff) | |
download | ManaVerse-ed908d9f4f15fadceeb9c1babab95f00b615004b.tar.gz ManaVerse-ed908d9f4f15fadceeb9c1babab95f00b615004b.tar.bz2 ManaVerse-ed908d9f4f15fadceeb9c1babab95f00b615004b.tar.xz ManaVerse-ed908d9f4f15fadceeb9c1babab95f00b615004b.zip |
Improve server side position drawing.
Diffstat (limited to 'src/being')
-rw-r--r-- | src/being/localplayer.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp index 4ef9b7f9d..70600ff2c 100644 --- a/src/being/localplayer.cpp +++ b/src/being/localplayer.cpp @@ -3062,11 +3062,15 @@ void LocalPlayer::setRealPos(const int x, const int y) layer->setTile(mCrossX, mCrossY, MapItemType::EMPTY); } - if (mShowServerPos && (!layer->getTile(x, y) - || layer->getTile(x, y)->getType() == MapItemType::EMPTY)) + if (mShowServerPos) { - if (getTileX() != x && getTileY() != y) - layer->setTile(x, y, MapItemType::CROSS); + const MapItem *const mapItem = layer->getTile(x, y); + + if (!mapItem || mapItem->getType() == MapItemType::EMPTY) + { + if (getTileX() != x && getTileY() != y) + layer->setTile(x, y, MapItemType::CROSS); + } } mCrossX = x; |