diff options
Diffstat (limited to 'src/being/localplayer.cpp')
-rw-r--r-- | src/being/localplayer.cpp | 29 |
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(); |