diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-12-21 21:46:41 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-12-21 21:46:41 +0300 |
commit | e9a9f2592c9d8919550c46a15f0b43a6bc230422 (patch) | |
tree | edb8223bd9b54c4891f081093c9be05d7e6ba96d /src/localplayer.cpp | |
parent | c56987b081c790819c0f2190613feb855ec68745 (diff) | |
download | manaverse-e9a9f2592c9d8919550c46a15f0b43a6bc230422.tar.gz manaverse-e9a9f2592c9d8919550c46a15f0b43a6bc230422.tar.bz2 manaverse-e9a9f2592c9d8919550c46a15f0b43a6bc230422.tar.xz manaverse-e9a9f2592c9d8919550c46a15f0b43a6bc230422.zip |
Dont load move type from config.
Diffstat (limited to 'src/localplayer.cpp')
-rw-r--r-- | src/localplayer.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
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"); |