From e9a9f2592c9d8919550c46a15f0b43a6bc230422 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 21 Dec 2011 21:46:41 +0300 Subject: Dont load move type from config. --- src/localplayer.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/localplayer.cpp') diff --git a/src/localplayer.cpp b/src/localplayer.cpp index c83082a44..5935dd140 100644 --- a/src/localplayer.cpp +++ b/src/localplayer.cpp @@ -156,7 +156,7 @@ LocalPlayer::LocalPlayer(int id, int subtype): mLastTargetX = 0; mLastTargetY = 0; - mInvertDirection = config.getIntValue("invertMoveDirection"); + mInvertDirection = 0; mCrazyMoveType = config.getIntValue("crazyMoveType"); mCrazyMoveState = 0; mAttackWeaponType = config.getIntValue("attackWeaponType"); @@ -1866,12 +1866,14 @@ void LocalPlayer::moveToHome() static const unsigned invertDirectionSize = 5; void LocalPlayer::changeMode(unsigned *var, unsigned limit, const char *conf, - std::string (LocalPlayer::*func)(), unsigned def) + std::string (LocalPlayer::*func)(), unsigned def, + bool save) { (*var) ++; if (*var >= limit) *var = def; - config.setValue(conf, *var); + if (save) + config.setValue(conf, *var); if (miniStatusWindow) miniStatusWindow->updateStatus(); const std::string str = (this->*func)(); @@ -1883,7 +1885,7 @@ void LocalPlayer::invertDirection() { mMoveState = 0; changeMode(&mInvertDirection, invertDirectionSize, "invertMoveDirection", - &LocalPlayer::getInvertDirectionString); + &LocalPlayer::getInvertDirectionString, 0, false); } static const char *invertDirectionStrings[] = @@ -4122,7 +4124,7 @@ void LocalPlayer::checkNewName(Being *being) void LocalPlayer::resetYellowBar() { - mInvertDirection = config.resetIntValue("invertMoveDirection"); + mInvertDirection = 0; mCrazyMoveType = config.resetIntValue("crazyMoveType"); mMoveToTargetType = config.resetIntValue("moveToTargetType"); mFollowMode = config.resetIntValue("followMode"); -- cgit v1.2.3-60-g2f50