summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-07-17 11:26:32 +0300
committerAndrei Karas <akaras@inbox.ru>2014-07-17 11:26:32 +0300
commit8edaf89adfcf0375f42cd2c4137d1eab425c2c62 (patch)
tree758ba22fc1b1f27c489bf49acb9e967579fe4465 /src
parent66a46556ddeb7b8dbc061d325b55364839a86a26 (diff)
downloadmanaplus-8edaf89adfcf0375f42cd2c4137d1eab425c2c62.tar.gz
manaplus-8edaf89adfcf0375f42cd2c4137d1eab425c2c62.tar.bz2
manaplus-8edaf89adfcf0375f42cd2c4137d1eab425c2c62.tar.xz
manaplus-8edaf89adfcf0375f42cd2c4137d1eab425c2c62.zip
Allow to set move to target distance from 1 to 9.
Diffstat (limited to 'src')
-rw-r--r--src/being/localplayer.cpp31
-rw-r--r--src/defaults.cpp2
2 files changed, 13 insertions, 20 deletions
diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp
index aed7ff767..8ca76526e 100644
--- a/src/being/localplayer.cpp
+++ b/src/being/localplayer.cpp
@@ -1138,28 +1138,12 @@ void LocalPlayer::moveToTarget(int dist)
{
switch (mMoveToTargetType)
{
- case 1:
- dist = 1;
- break;
- case 2:
- dist = 2;
- break;
- case 3:
- dist = 3;
- break;
- case 4:
- dist = 5;
- break;
- case 5:
- dist = 7;
- break;
- case 6:
- case 7:
+ case 10:
dist = mAttackRange;
if (dist == 1 && serverVersion < 1)
dist = 2;
break;
- case 8:
+ case 11:
dist = mAttackRange - 1;
if (dist < 1)
dist = 1;
@@ -1167,6 +1151,7 @@ void LocalPlayer::moveToTarget(int dist)
dist = 2;
break;
default:
+ dist = mMoveToTargetType;
break;
}
}
@@ -1333,7 +1318,7 @@ std::string LocalPlayer::getCrazyMoveTypeString()
}
}
-static const unsigned moveToTargetTypeSize = 9;
+static const unsigned moveToTargetTypeSize = 13;
void LocalPlayer::changeMoveToTargetType()
{
@@ -1352,10 +1337,18 @@ static const char *const moveToTargetTypeStrings[] =
// TRANSLATORS: move to target type in status bar
N_("(3) moves to target in distance 3"),
// TRANSLATORS: move to target type in status bar
+ N_("(4) moves to target in distance 4"),
+ // TRANSLATORS: move to target type in status bar
N_("(5) moves to target in distance 5"),
// TRANSLATORS: move to target type in status bar
+ N_("(6) moves to target in distance 6"),
+ // TRANSLATORS: move to target type in status bar
N_("(7) moves to target in distance 7"),
// TRANSLATORS: move to target type in status bar
+ N_("(8) moves to target in distance 8"),
+ // TRANSLATORS: move to target type in status bar
+ N_("(9) moves to target in distance 9"),
+ // TRANSLATORS: move to target type in status bar
N_("(A) moves to target in attack range"),
// TRANSLATORS: move to target type in status bar
N_("(a) archer attack range"),
diff --git a/src/defaults.cpp b/src/defaults.cpp
index 386b58c5f..8e2d11eb8 100644
--- a/src/defaults.cpp
+++ b/src/defaults.cpp
@@ -99,7 +99,7 @@ DefaultsData* getConfigDefaults()
AddDEF("imitationMode", 0);
AddDEF("syncPlayerMove", false);
AddDEF("drawPath", false);
- AddDEF("moveToTargetType", 6);
+ AddDEF("moveToTargetType", 10);
AddDEF("crazyMoveProgram", "mumrsonmdmlon");
AddDEF("disableGameModifiers", false);
AddDEF("targetDeadPlayers", false);