summaryrefslogtreecommitdiff
path: root/src/net/beinghandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/beinghandler.cpp')
-rw-r--r--src/net/beinghandler.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/net/beinghandler.cpp b/src/net/beinghandler.cpp
index affdcd56..5b2ac5f4 100644
--- a/src/net/beinghandler.cpp
+++ b/src/net/beinghandler.cpp
@@ -201,10 +201,9 @@ void BeingHandler::handleMessage(MessageIn *msg)
if (!dstBeing)
break;
- if (dstBeing == player_node->getTarget())
- {
+ // If this is player's current target, clear it.
+ if (player_node->getTarget() == dstBeing)
player_node->stopAttack();
- }
if (msg->readInt8() == 1)
{