summaryrefslogtreecommitdiff
path: root/src/net/protocol.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-05-22 13:40:48 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-05-22 13:40:48 +0000
commit3cb233696c51ba355eaad5480b4feba8f0a07652 (patch)
tree2b1b8a06cbb5e60f11d3aa5e4855ab426e1d00e1 /src/net/protocol.cpp
parent347246d6719e12e426f5681085493dc0227345ed (diff)
downloadmana-3cb233696c51ba355eaad5480b4feba8f0a07652.tar.gz
mana-3cb233696c51ba355eaad5480b4feba8f0a07652.tar.bz2
mana-3cb233696c51ba355eaad5480b4feba8f0a07652.tar.xz
mana-3cb233696c51ba355eaad5480b4feba8f0a07652.zip
Fixed little oopsie.
Diffstat (limited to 'src/net/protocol.cpp')
-rw-r--r--src/net/protocol.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/net/protocol.cpp b/src/net/protocol.cpp
index 4b94a66c..0187f69e 100644
--- a/src/net/protocol.cpp
+++ b/src/net/protocol.cpp
@@ -241,14 +241,15 @@ int attack(unsigned short x, unsigned short y, unsigned char direction)
attack(target);
return target->id;
}
-
+
// Implement charging attacks here
char_info->lastAttackTime = 0;
-
+
return 0;
}
-void attack(Being *target) {
+void attack(Being *target)
+{
int dist_x = target->x - player_node->x;
int dist_y = target->y - player_node->y;
if (abs(dist_y) >= abs(dist_x)) {