diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-05-22 13:40:48 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-05-22 13:40:48 +0000 |
commit | 3cb233696c51ba355eaad5480b4feba8f0a07652 (patch) | |
tree | 2b1b8a06cbb5e60f11d3aa5e4855ab426e1d00e1 | |
parent | 347246d6719e12e426f5681085493dc0227345ed (diff) | |
download | mana-client-3cb233696c51ba355eaad5480b4feba8f0a07652.tar.gz mana-client-3cb233696c51ba355eaad5480b4feba8f0a07652.tar.bz2 mana-client-3cb233696c51ba355eaad5480b4feba8f0a07652.tar.xz mana-client-3cb233696c51ba355eaad5480b4feba8f0a07652.zip |
Fixed little oopsie.
-rw-r--r-- | src/net/protocol.cpp | 7 | ||||
-rw-r--r-- | src/net/protocol.h | 2 |
2 files changed, 6 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)) { diff --git a/src/net/protocol.h b/src/net/protocol.h index 07684298..57321d45 100644 --- a/src/net/protocol.h +++ b/src/net/protocol.h @@ -24,6 +24,8 @@ #ifndef _TMW_PROTOCOL_H #define _TMW_PROTOCOL_H +#include "../being.h" + // Packets from server to client #define SMSG_LOGIN_SUCCESS 0x0073 /**< Logged in, starting location */ #define SMSG_REMOVE_BEING 0x0080 /**< Died, logged out, teleport ... */ |