summaryrefslogtreecommitdiff
path: root/src/actions
diff options
context:
space:
mode:
authorJoseph Botosh <rumly111@gmail.com>2015-06-05 20:34:19 +0300
committerAndrei Karas <akaras@inbox.ru>2015-07-25 21:38:30 +0300
commitf67a60ea6108e2c70186bf4742c223179ac5f4be (patch)
treec057d9dc5a8c9716b24b5ba2dc4cb576832ee1dc /src/actions
parent760b544fb26dcfc5103a44bf977cd8cd95b0862a (diff)
downloadmv-f67a60ea6108e2c70186bf4742c223179ac5f4be.tar.gz
mv-f67a60ea6108e2c70186bf4742c223179ac5f4be.tar.bz2
mv-f67a60ea6108e2c70186bf4742c223179ac5f4be.tar.xz
mv-f67a60ea6108e2c70186bf4742c223179ac5f4be.zip
add targetingType feature
Diffstat (limited to 'src/actions')
-rw-r--r--src/actions/actions.cpp6
-rw-r--r--src/actions/statusbar.cpp5
-rw-r--r--src/actions/statusbar.h1
3 files changed, 9 insertions, 3 deletions
diff --git a/src/actions/actions.cpp b/src/actions/actions.cpp
index a8d21367e..a4520543c 100644
--- a/src/actions/actions.cpp
+++ b/src/actions/actions.cpp
@@ -807,12 +807,12 @@ impHandler(targetAttack)
target = nullptr;
}
}
- if (!target)
+
+ if (!target && !settings.targetingType)
target = localPlayer->getTarget();
- // A set target has highest priority
+
if (!target)
{
- // Only auto target Monsters
target = actorManager->findNearestLivingBeing(
localPlayer, 90, ActorType::Monster, AllowSort_true);
}
diff --git a/src/actions/statusbar.cpp b/src/actions/statusbar.cpp
index 971bfd0f6..331275ba3 100644
--- a/src/actions/statusbar.cpp
+++ b/src/actions/statusbar.cpp
@@ -80,6 +80,11 @@ impHandler0(changeAttackType)
callYellowBar(changeAttackType);
}
+impHandler0(changeTargetingType)
+{
+ callYellowBar(changeTargetingType);
+}
+
impHandler0(changeFollowMode)
{
callYellowBar(changeFollowMode);
diff --git a/src/actions/statusbar.h b/src/actions/statusbar.h
index 3802a255b..fc304c873 100644
--- a/src/actions/statusbar.h
+++ b/src/actions/statusbar.h
@@ -33,6 +33,7 @@ namespace Actions
decHandler(changeMoveType);
decHandler(changeAttackWeaponType);
decHandler(changeAttackType);
+ decHandler(changeTargetingType);
decHandler(changeFollowMode);
decHandler(changeImitationMode);
decHandler(changeMagicAttackType);