summaryrefslogtreecommitdiff
path: root/src/being/localplayer.cpp
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/localplayer.cpp
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/localplayer.cpp')
-rw-r--r--src/being/localplayer.cpp29
1 files changed, 2 insertions, 27 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();