diff options
author | Philipp Sehmisch <tmw@crushnet.org> | 2008-01-24 01:50:13 +0000 |
---|---|---|
committer | Philipp Sehmisch <tmw@crushnet.org> | 2008-01-24 01:50:13 +0000 |
commit | 90c0fb74a317e9c4181d35fead0c7c67e653d9ad (patch) | |
tree | 9a55efeedea9b6e2fdb5f7bc6a6ac59aee846f40 /src/net/beinghandler.cpp | |
parent | 9f70e690ba0fb0eca7b541c29bd9afb0398368e0 (diff) | |
download | mana-90c0fb74a317e9c4181d35fead0c7c67e653d9ad.tar.gz mana-90c0fb74a317e9c4181d35fead0c7c67e653d9ad.tar.bz2 mana-90c0fb74a317e9c4181d35fead0c7c67e653d9ad.tar.xz mana-90c0fb74a317e9c4181d35fead0c7c67e653d9ad.zip |
Fixed broken communication of attack directions.
Diffstat (limited to 'src/net/beinghandler.cpp')
-rw-r--r-- | src/net/beinghandler.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/net/beinghandler.cpp b/src/net/beinghandler.cpp index 37c02dc3..879c8a46 100644 --- a/src/net/beinghandler.cpp +++ b/src/net/beinghandler.cpp @@ -566,7 +566,14 @@ void BeingHandler::handleBeingAttackMessage(MessageIn &msg) if (!being) return; being->setAction(Being::ATTACK); - being->setDirection(msg.readInt8()); + int direction = msg.readInt8(); + switch (direction) + { + case DIRECTION_UP: being->setDirection(Being::UP); break; + case DIRECTION_DOWN: being->setDirection(Being::DOWN); break; + case DIRECTION_LEFT: being->setDirection(Being::LEFT); break; + case DIRECTION_RIGHT: being->setDirection(Being::RIGHT); break; + } } void BeingHandler::handleBeingsDamageMessage(MessageIn &msg) |