diff options
author | Philipp Sehmisch <tmw@crushnet.org> | 2008-03-09 20:41:27 +0000 |
---|---|---|
committer | Philipp Sehmisch <tmw@crushnet.org> | 2008-03-09 20:41:27 +0000 |
commit | 4e2ced304a2013808b2481cceb7622848b073e5b (patch) | |
tree | 2cc2c6cbc3f6e17842919530d583f91256dc86e1 /src/net | |
parent | 15014d358424bf5f74a2d9b7afd08692b591a448 (diff) | |
download | mana-4e2ced304a2013808b2481cceb7622848b073e5b.tar.gz mana-4e2ced304a2013808b2481cceb7622848b073e5b.tar.bz2 mana-4e2ced304a2013808b2481cceb7622848b073e5b.tar.xz mana-4e2ced304a2013808b2481cceb7622848b073e5b.zip |
Implemented possibility to rotate particle emitters. Implemented interpretation of the attacktype parameter of attack messages and visualize monster attacks other than id 1 with a particle effect. Prepared to get attack particle effects and animation types from the monster database.
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/beinghandler.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/net/beinghandler.cpp b/src/net/beinghandler.cpp index 3e55cce9..05795cb1 100644 --- a/src/net/beinghandler.cpp +++ b/src/net/beinghandler.cpp @@ -569,10 +569,11 @@ void BeingHandler::handleBeingsMoveMessage(MessageIn &msg) void BeingHandler::handleBeingAttackMessage(MessageIn &msg) { Being *being = beingManager->findBeing(msg.readInt16()); + int direction = msg.readInt8(); + int attackType = msg.readInt8(); + if (!being) return; - being->setAction(Being::ATTACK); - int direction = msg.readInt8(); switch (direction) { case DIRECTION_UP: being->setDirection(Being::UP); break; @@ -580,6 +581,10 @@ void BeingHandler::handleBeingAttackMessage(MessageIn &msg) case DIRECTION_LEFT: being->setDirection(Being::LEFT); break; case DIRECTION_RIGHT: being->setDirection(Being::RIGHT); break; } + + logger->log("Attacktype: %d", attackType); + + being->setAction(Being::ATTACK, attackType); } void BeingHandler::handleBeingsDamageMessage(MessageIn &msg) |