diff options
author | Matthias Hartmann <hartmann.matthias@gmail.com> | 2005-09-17 16:42:34 +0000 |
---|---|---|
committer | Matthias Hartmann <hartmann.matthias@gmail.com> | 2005-09-17 16:42:34 +0000 |
commit | db1f671668a615c5e1a4f48009708407bbac8d8c (patch) | |
tree | b10ef65f484c27facc224bfc62c360e9caacaa7e /src/net/protocol.cpp | |
parent | 7d7ea134637eb06e194068f157d3eead90115631 (diff) | |
download | mana-client-db1f671668a615c5e1a4f48009708407bbac8d8c.tar.gz mana-client-db1f671668a615c5e1a4f48009708407bbac8d8c.tar.bz2 mana-client-db1f671668a615c5e1a4f48009708407bbac8d8c.tar.xz mana-client-db1f671668a615c5e1a4f48009708407bbac8d8c.zip |
Added PVP
Diffstat (limited to 'src/net/protocol.cpp')
-rw-r--r-- | src/net/protocol.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
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; } |