summaryrefslogtreecommitdiff
path: root/src/being.cpp
diff options
context:
space:
mode:
authorEugenio Favalli <elvenprogrammer@gmail.com>2005-05-22 13:02:47 +0000
committerEugenio Favalli <elvenprogrammer@gmail.com>2005-05-22 13:02:47 +0000
commit0c6830040481247a96ccc8fe15f9b1022506c0ae (patch)
tree1d19cac108370e3dfdb421ad3f497d02d5ab3e4f /src/being.cpp
parentc669ed4986b0a01abc78f6d793993d9081c6b49e (diff)
downloadmana-0c6830040481247a96ccc8fe15f9b1022506c0ae.tar.gz
mana-0c6830040481247a96ccc8fe15f9b1022506c0ae.tar.bz2
mana-0c6830040481247a96ccc8fe15f9b1022506c0ae.tar.xz
mana-0c6830040481247a96ccc8fe15f9b1022506c0ae.zip
An attemp on auto attack, not bug free for sure
Diffstat (limited to 'src/being.cpp')
-rw-r--r--src/being.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/being.cpp b/src/being.cpp
index 8fe61f14..30e32b7c 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -302,6 +302,9 @@ void Being::logic()
frame = (get_elapsed_time(walk_time) * 4) / aspd;
if (frame >= 4) {
nextStep();
+ if (autoTarget > 0 && this == player_node) {
+ attack(findNode(autoTarget));
+ }
}
break;
}