summaryrefslogtreecommitdiff
path: root/src/being/localplayer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/being/localplayer.cpp')
-rw-r--r--src/being/localplayer.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp
index 55e7baca9..2e09f1690 100644
--- a/src/being/localplayer.cpp
+++ b/src/being/localplayer.cpp
@@ -161,6 +161,7 @@ LocalPlayer::LocalPlayer(const int id, const int subtype) :
mAttackMoving(config.getBoolValue("attackMoving")),
mAttackNext(config.getBoolValue("attackNext")),
mShowJobExp(config.getBoolValue("showJobExp")),
+ mShowServerPos(config.getBoolValue("showserverpos")),
mNextStep(false),
mDisableCrazyMove(false),
mGoingToTarget(false),
@@ -202,6 +203,7 @@ LocalPlayer::LocalPlayer(const int id, const int subtype) :
config.addListener("enableAdvert", this);
config.addListener("tradebot", this);
config.addListener("targetOnlyReachable", this);
+ config.addListener("showserverpos", this);
setShowName(config.getBoolValue("showownname"));
}
@@ -1019,6 +1021,8 @@ void LocalPlayer::optionChanged(const std::string &value)
mTradebot = config.getBoolValue("tradebot");
else if (value == "targetOnlyReachable")
mTargetOnlyReachable = config.getBoolValue("targetOnlyReachable");
+ else if (value == "showserverpos")
+ mShowServerPos = config.getBoolValue("showserverpos");
}
void LocalPlayer::processEvent(const Channels channel,
@@ -3552,14 +3556,15 @@ void LocalPlayer::setRealPos(const int x, const int y)
{
fixPos(1);
- if ((mCrossX || mCrossY) && layer->getTile(mCrossX, mCrossY)
+ if ((mCrossX || mCrossY)
+ && layer->getTile(mCrossX, mCrossY)
&& layer->getTile(mCrossX, mCrossY)->getType() == MapItem::CROSS)
{
layer->setTile(mCrossX, mCrossY, MapItem::EMPTY);
}
- if (!layer->getTile(x, y)
- || layer->getTile(x, y)->getType() == MapItem::EMPTY)
+ if (mShowServerPos && (!layer->getTile(x, y)
+ || layer->getTile(x, y)->getType() == MapItem::EMPTY))
{
if (getTileX() != x && getTileY() != y)
layer->setTile(x, y, MapItem::CROSS);