summaryrefslogtreecommitdiff
path: root/src/being/localplayer.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-07-21 00:18:41 +0300
committerAndrei Karas <akaras@inbox.ru>2014-07-21 00:18:41 +0300
commitb02b4ce0b656a93fbcaa927b0ba289edfec6e22c (patch)
treea31a6f99778d0cf0b45689584939bd8c391627ae /src/being/localplayer.cpp
parent744b9d6689b67779a1d17c6d3de7cd016ca1033b (diff)
downloadmanaverse-b02b4ce0b656a93fbcaa927b0ba289edfec6e22c.tar.gz
manaverse-b02b4ce0b656a93fbcaa927b0ba289edfec6e22c.tar.bz2
manaverse-b02b4ce0b656a93fbcaa927b0ba289edfec6e22c.tar.xz
manaverse-b02b4ce0b656a93fbcaa927b0ba289edfec6e22c.zip
move "change crazy move" option into gamemodifiers.
Diffstat (limited to 'src/being/localplayer.cpp')
-rw-r--r--src/being/localplayer.cpp34
1 files changed, 2 insertions, 32 deletions
diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp
index df42ffc24..956ff07eb 100644
--- a/src/being/localplayer.cpp
+++ b/src/being/localplayer.cpp
@@ -113,7 +113,6 @@ LocalPlayer::LocalPlayer(const int id, const uint16_t subtype) :
AttributeListener(),
StatListener(),
mGMLevel(0),
- mCrazyMoveType(config.getIntValue("crazyMoveType")),
mCrazyMoveState(0),
mAttackWeaponType(config.getIntValue("attackWeaponType")),
mQuickDropCounter(config.getIntValue("quickDropCounter")),
@@ -1270,35 +1269,6 @@ void LocalPlayer::changeMode(unsigned *restrict const var,
debugMsg(str.substr(4));
}
-static const unsigned crazyMoveTypeSize = 11;
-
-void LocalPlayer::changeCrazyMoveType(const bool forward)
-{
- mCrazyMoveState = 0;
- changeMode(&mCrazyMoveType, crazyMoveTypeSize, "crazyMoveType",
- &LocalPlayer::getCrazyMoveTypeString, 1, true, forward);
-}
-
-std::string LocalPlayer::getCrazyMoveTypeString()
-{
- if (mCrazyMoveType < crazyMoveTypeSize - 1)
- {
- // TRANSLATORS: crazy move type in status bar
- return strprintf(_("(%u) crazy move number %u"),
- mCrazyMoveType, mCrazyMoveType);
- }
- else if (mCrazyMoveType == crazyMoveTypeSize - 1)
- {
- // TRANSLATORS: crazy move type in status bar
- return _("(a) custom crazy move");
- }
- else
- {
- // TRANSLATORS: crazy move type in status bar
- return _("(?) crazy move");
- }
-}
-
static const unsigned moveToTargetTypeSize = 13;
void LocalPlayer::changeMoveToTargetType(const bool forward)
@@ -1787,7 +1757,7 @@ void LocalPlayer::crazyMove()
{
const bool oldDisableCrazyMove = mDisableCrazyMove;
mDisableCrazyMove = true;
- switch (mCrazyMoveType)
+ switch (settings.crazyMoveType)
{
case 1:
crazyMove1();
@@ -3693,7 +3663,7 @@ void LocalPlayer::checkNewName(Being *const being)
void LocalPlayer::resetYellowBar()
{
settings.moveType = 0;
- mCrazyMoveType = config.resetIntValue("crazyMoveType");
+ settings.crazyMoveType = config.resetIntValue("crazyMoveType");
mMoveToTargetType = config.resetIntValue("moveToTargetType");
mFollowMode = config.resetIntValue("followMode");
mAttackWeaponType = config.resetIntValue("attackWeaponType");