diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-07-23 12:00:53 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-07-23 12:00:53 +0300 |
commit | 447d96259ec1b6be3fddad3e5b61b3711030ea18 (patch) | |
tree | 9a1b324ea7b50acb10eba4de5b404a724a94cd49 | |
parent | 648c85816ca9398dd9c672d5d4230bef030e0274 (diff) | |
download | manaplus-447d96259ec1b6be3fddad3e5b61b3711030ea18.tar.gz manaplus-447d96259ec1b6be3fddad3e5b61b3711030ea18.tar.bz2 manaplus-447d96259ec1b6be3fddad3e5b61b3711030ea18.tar.xz manaplus-447d96259ec1b6be3fddad3e5b61b3711030ea18.zip |
Move pseudo away variable into settings.
-rw-r--r-- | src/being/localplayer.cpp | 7 | ||||
-rw-r--r-- | src/being/localplayer.h | 4 | ||||
-rw-r--r-- | src/settings.h | 4 |
3 files changed, 6 insertions, 9 deletions
diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp index 11102a67f..ee7ced8c5 100644 --- a/src/being/localplayer.cpp +++ b/src/being/localplayer.cpp @@ -174,7 +174,6 @@ LocalPlayer::LocalPlayer(const int id, const uint16_t subtype) : mKeepAttacking(false), mPathSetByMouse(false), mWaitPing(false), - mPseudoAwayMode(false), mShowNavigePath(false) { logger->log1("LocalPlayer::LocalPlayer"); @@ -342,7 +341,7 @@ void LocalPlayer::slowLogic() if (mTradebot && shopWindow && !shopWindow->isShopEmpty()) smile |= BeingFlag::SHOP; - if (settings.awayMode || mPseudoAwayMode) + if (settings.awayMode || settings.pseudoAwayMode) smile |= BeingFlag::AWAY; if (mInactive) @@ -2527,7 +2526,7 @@ void LocalPlayer::setAfkMessage(std::string message) void LocalPlayer::setPseudoAway(const std::string &message) { setAfkMessage(message); - mPseudoAwayMode = !mPseudoAwayMode; + settings.pseudoAwayMode = !settings.pseudoAwayMode; } void LocalPlayer::afkRespond(ChatTab *const tab, const std::string &nick) @@ -3326,7 +3325,7 @@ void LocalPlayer::updateStatus() const if (mTradebot && shopWindow && !shopWindow->isShopEmpty()) status |= BeingFlag::SHOP; - if (settings.awayMode || mPseudoAwayMode) + if (settings.awayMode || settings.pseudoAwayMode) status |= BeingFlag::AWAY; if (mInactive) diff --git a/src/being/localplayer.h b/src/being/localplayer.h index 96e6efb88..e26cb7843 100644 --- a/src/being/localplayer.h +++ b/src/being/localplayer.h @@ -236,9 +236,6 @@ class LocalPlayer final : public Being, void setPseudoAway(const std::string &message); - bool getPseudoAway() const A_WARN_UNUSED - { return mPseudoAwayMode; } - void setHalfAway(const bool n) { mInactive = n; } @@ -534,7 +531,6 @@ class LocalPlayer final : public Being, // Tells if the path was set using mouse bool mPathSetByMouse; bool mWaitPing; - bool mPseudoAwayMode; bool mShowNavigePath; }; diff --git a/src/settings.h b/src/settings.h index e607aa241..ab18c5ebe 100644 --- a/src/settings.h +++ b/src/settings.h @@ -72,7 +72,8 @@ class Settings final inputFocused(true), mouseFocused(true), disableGameModifiers(false), - awayMode(false) + awayMode(false), + pseudoAwayMode(false) { } std::string updateHost; @@ -114,6 +115,7 @@ class Settings final bool mouseFocused; bool disableGameModifiers; bool awayMode; + bool pseudoAwayMode; }; extern Settings settings; |