From db1f671668a615c5e1a4f48009708407bbac8d8c Mon Sep 17 00:00:00 2001 From: Matthias Hartmann Date: Sat, 17 Sep 2005 16:42:34 +0000 Subject: Added PVP --- src/net/protocol.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/net/protocol.cpp') diff --git a/src/net/protocol.cpp b/src/net/protocol.cpp index 2e4089d4..318c446d 100644 --- a/src/net/protocol.cpp +++ b/src/net/protocol.cpp @@ -148,18 +148,22 @@ Being* attack(unsigned short x, unsigned short y, unsigned char direction) { case Being::SOUTH: target = findNode(x, y + 1, Being::MONSTER); + if (!target) target = findNode(x, y + 1, Being::PLAYER); break; case Being::WEST: target = findNode(x - 1, y, Being::MONSTER); + if (!target) target = findNode(x - 1, y, Being::PLAYER); break; case Being::NORTH: target = findNode(x, y - 1, Being::MONSTER); + if (!target) target = findNode(x, y - 1, Being::PLAYER); break; case Being::EAST: target = findNode(x + 1, y, Being::MONSTER); + if (!target) target = findNode(x + 1, y, Being::PLAYER); break; } -- cgit v1.2.3-70-g09d2