diff options
author | Ira Rice <irarice@gmail.com> | 2008-09-25 00:15:44 +0000 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2008-09-25 00:15:44 +0000 |
commit | 489a429bea6739dfa25503b9329bd9e33bffb856 (patch) | |
tree | 8112f6fd988fdc0610329b6bc14ee3f9d5801092 /src/net/beinghandler.cpp | |
parent | 2dc8eadff1e67bb70b1772ecc19c9e1e2e40a5b4 (diff) | |
download | mana-489a429bea6739dfa25503b9329bd9e33bffb856.tar.gz mana-489a429bea6739dfa25503b9329bd9e33bffb856.tar.bz2 mana-489a429bea6739dfa25503b9329bd9e33bffb856.tar.xz mana-489a429bea6739dfa25503b9329bd9e33bffb856.zip |
Merged the Tametomo branch into trunk.
Diffstat (limited to 'src/net/beinghandler.cpp')
-rw-r--r-- | src/net/beinghandler.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/net/beinghandler.cpp b/src/net/beinghandler.cpp index fbef02bd..7c9b8afd 100644 --- a/src/net/beinghandler.cpp +++ b/src/net/beinghandler.cpp @@ -23,6 +23,7 @@ #include "beinghandler.h" +#include <iostream> #include <SDL_types.h> #include "messagein.h" @@ -37,6 +38,7 @@ #include "../particle.h" #include "../sound.h" #include "../player_relations.h" +#include "../npc.h" const int EMOTION_TIME = 150; /**< Duration of emotion icon */ @@ -203,8 +205,13 @@ void BeingHandler::handleMessage(MessageIn *msg) break; // If this is player's current target, clear it. - if (player_node->getTarget() == dstBeing) + if (dstBeing == player_node->getTarget()) + { player_node->stopAttack(); + } + + if (dstBeing == current_npc) + current_npc = NULL; if (msg->readInt8() == 1) { @@ -464,7 +471,7 @@ void BeingHandler::handleMessage(MessageIn *msg) msg->readInt8(); // unknown dstBeing->mWalkTime = tick_time; - dstBeing->mFrame = 0; + //dstBeing->mFrame = 0; break; case SMSG_PLAYER_STOP: |