summaryrefslogtreecommitdiff
path: root/src/being
diff options
context:
space:
mode:
Diffstat (limited to 'src/being')
-rw-r--r--src/being/localplayer.cpp11
-rw-r--r--src/being/localplayer.h1
2 files changed, 9 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);
diff --git a/src/being/localplayer.h b/src/being/localplayer.h
index 5664b03b6..e3a235b06 100644
--- a/src/being/localplayer.h
+++ b/src/being/localplayer.h
@@ -651,6 +651,7 @@ class LocalPlayer final : public Being,
bool mAwayMode;
bool mPseudoAwayMode;
bool mShowNavigePath;
+ bool mShowServerPos;
};
extern LocalPlayer *player_node;