summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/actionmanager.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/actionmanager.cpp b/src/actionmanager.cpp
index d0fdfeddb..3e675429e 100644
--- a/src/actionmanager.cpp
+++ b/src/actionmanager.cpp
@@ -371,6 +371,18 @@ impHandler0(heal)
{
if (actorSpriteManager)
{
+ if (inputManager.isActionActive(Input::KEY_MOD))
+ {
+ Being *target = player_node->getTarget();
+ if (!target || target->getType() != ActorSprite::PLAYER)
+ {
+ target = actorSpriteManager->findNearestLivingBeing(
+ player_node, 10, ActorSprite::PLAYER);
+ if (target)
+ player_node->setTarget(target);
+ }
+ }
+
actorSpriteManager->healTarget();
if (Game::instance())
Game::instance()->setValidSpeed();