From 3cb233696c51ba355eaad5480b4feba8f0a07652 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Sun, 22 May 2005 13:40:48 +0000 Subject: Fixed little oopsie. --- src/net/protocol.cpp | 7 ++++--- src/net/protocol.h | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'src/net') 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 ... */ -- cgit v1.2.3-70-g09d2