diff options
author | Kraant <kraant@gmail.com> | 2008-07-30 09:11:08 +0000 |
---|---|---|
committer | Kraant <kraant@gmail.com> | 2008-07-30 09:11:08 +0000 |
commit | 2852d5695820e4ff8598ec4cf391f7049907d527 (patch) | |
tree | 9403204641dbc3706a2cea60115178f7f9d0b6a3 /src/net | |
parent | c9294154cc1a53b12f11806548370b4e7e36b34b (diff) | |
download | mana-client-2852d5695820e4ff8598ec4cf391f7049907d527.tar.gz mana-client-2852d5695820e4ff8598ec4cf391f7049907d527.tar.bz2 mana-client-2852d5695820e4ff8598ec4cf391f7049907d527.tar.xz mana-client-2852d5695820e4ff8598ec4cf391f7049907d527.zip |
Adding patch the stops a segfault from occuring in beinghandler when
a targeted player runs off screen. -- Daniel Thomas
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/beinghandler.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/net/beinghandler.cpp b/src/net/beinghandler.cpp index 00053083..c76d0515 100644 --- a/src/net/beinghandler.cpp +++ b/src/net/beinghandler.cpp @@ -200,6 +200,11 @@ void BeingHandler::handleMessage(MessageIn *msg) if (!dstBeing) break; + if (dstBeing == player_node->getTarget()) + { + player_node->stopAttack(); + } + if (msg->readInt8() == 1) { dstBeing->setAction(Being::DEAD); @@ -209,10 +214,6 @@ void BeingHandler::handleMessage(MessageIn *msg) beingManager->destroyBeing(dstBeing); } - if (dstBeing == player_node->getTarget()) - { - player_node->stopAttack(); - } break; case SMSG_BEING_ACTION: |