diff options
author | Joseph Botosh <rumly111@gmail.com> | 2015-06-05 20:34:19 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-07-25 21:38:30 +0300 |
commit | f67a60ea6108e2c70186bf4742c223179ac5f4be (patch) | |
tree | c057d9dc5a8c9716b24b5ba2dc4cb576832ee1dc /src/actions | |
parent | 760b544fb26dcfc5103a44bf977cd8cd95b0862a (diff) | |
download | manaverse-f67a60ea6108e2c70186bf4742c223179ac5f4be.tar.gz manaverse-f67a60ea6108e2c70186bf4742c223179ac5f4be.tar.bz2 manaverse-f67a60ea6108e2c70186bf4742c223179ac5f4be.tar.xz manaverse-f67a60ea6108e2c70186bf4742c223179ac5f4be.zip |
add targetingType feature
Diffstat (limited to 'src/actions')
-rw-r--r-- | src/actions/actions.cpp | 6 | ||||
-rw-r--r-- | src/actions/statusbar.cpp | 5 | ||||
-rw-r--r-- | src/actions/statusbar.h | 1 |
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); |