summaryrefslogtreecommitdiff
path: root/src/being
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-07-22 00:24:58 +0300
committerAndrei Karas <akaras@inbox.ru>2014-07-22 00:24:58 +0300
commit57e10676912d5506ff3cab9edbb77335828d597c (patch)
tree634144b0d290403c2a157148bab2b79284da50cf /src/being
parent90bfc776dc4975c523c4c35fb0778cd9b77dc164 (diff)
downloadplus-57e10676912d5506ff3cab9edbb77335828d597c.tar.gz
plus-57e10676912d5506ff3cab9edbb77335828d597c.tar.bz2
plus-57e10676912d5506ff3cab9edbb77335828d597c.tar.xz
plus-57e10676912d5506ff3cab9edbb77335828d597c.zip
move "change imitation mode" option into gamemodifiers.
Diffstat (limited to 'src/being')
-rw-r--r--src/being/localplayer.cpp29
-rw-r--r--src/being/localplayer.h7
2 files changed, 2 insertions, 34 deletions
diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp
index baeb75146..d7580b552 100644
--- a/src/being/localplayer.cpp
+++ b/src/being/localplayer.cpp
@@ -115,7 +115,6 @@ LocalPlayer::LocalPlayer(const int id, const uint16_t subtype) :
mGMLevel(0),
mCrazyMoveState(0),
mMoveState(0),
- mImitationMode(config.getIntValue("imitationMode")),
mLastTargetX(0),
mLastTargetY(0),
mHomes(),
@@ -1285,30 +1284,6 @@ std::string LocalPlayer::getMapDrawTypeString()
viewport->getMapDrawType(), debugPathSize));
}
-const unsigned imitationModeSize = 2;
-
-void LocalPlayer::changeImitationMode(const bool forward)
-{
- changeMode(&mImitationMode, imitationModeSize, "imitationMode",
- &LocalPlayer::getImitationModeString, 0, true, forward);
-}
-
-static const char *const imitationModeStrings[] =
-{
- // TRANSLATORS: imitation type in status bar
- N_("(D) default imitation"),
- // TRANSLATORS: imitation type in status bar
- N_("(O) outfits imitation"),
- // TRANSLATORS: imitation type in status bar
- N_("(?) imitation")
-};
-
-std::string LocalPlayer::getImitationModeString()
-{
- return gettext(getVarItem(&imitationModeStrings[0],
- mImitationMode, imitationModeSize));
-}
-
const unsigned awayModeSize = 2;
void LocalPlayer::changeAwayMode()
@@ -3113,7 +3088,7 @@ void LocalPlayer::imitateOutfit(const Being *const player,
if (!player)
return;
- if (mImitationMode == 1 && !mPlayerImitated.empty()
+ if (settings.imitationMode == 1 && !mPlayerImitated.empty()
&& player->getName() == mPlayerImitated)
{
if (sprite < 0 || sprite >= player->getNumberOfLayers())
@@ -3415,7 +3390,7 @@ void LocalPlayer::resetYellowBar()
}
if (mMap)
mMap->setDrawLayersFlags(0);
- mImitationMode = config.resetIntValue("imitationMode");
+ settings.imitationMode = config.resetIntValue("imitationMode");
mDisableGameModifiers = config.resetBoolValue("disableGameModifiers");
UpdateStatusListener::distributeEvent();
diff --git a/src/being/localplayer.h b/src/being/localplayer.h
index 191ed73fe..b7b071c46 100644
--- a/src/being/localplayer.h
+++ b/src/being/localplayer.h
@@ -186,11 +186,6 @@ class LocalPlayer final : public Being,
bool isPathSetByMouse() const A_WARN_UNUSED
{ return mPathSetByMouse; }
- int getImitationMode() const A_WARN_UNUSED
- { return mImitationMode; }
-
- void changeImitationMode(const bool forward);
-
unsigned int getMoveState() const A_WARN_UNUSED
{ return mMoveState; }
@@ -404,8 +399,6 @@ class LocalPlayer final : public Being,
static std::string getMapDrawTypeString();
- std::string getImitationModeString();
-
std::string getAwayModeString();
static std::string getCameraModeString();