summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
Diffstat (limited to 'src/net')
-rw-r--r--src/net/beinghandler.cpp2
-rw-r--r--src/net/buysellhandler.cpp2
-rw-r--r--src/net/playerhandler.cpp4
3 files changed, 4 insertions, 4 deletions
diff --git a/src/net/beinghandler.cpp b/src/net/beinghandler.cpp
index f757308c..3e746eb5 100644
--- a/src/net/beinghandler.cpp
+++ b/src/net/beinghandler.cpp
@@ -214,7 +214,7 @@ void BeingHandler::handleMessage(MessageIn *msg)
player_node->stopAttack();
if (dstBeing == current_npc)
- current_npc = NULL;
+ current_npc->handleDeath();
if (msg->readInt8() == 1)
dstBeing->setAction(Being::DEAD);
diff --git a/src/net/buysellhandler.cpp b/src/net/buysellhandler.cpp
index 67c79ec4..a2442d70 100644
--- a/src/net/buysellhandler.cpp
+++ b/src/net/buysellhandler.cpp
@@ -107,7 +107,7 @@ void BuySellHandler::handleMessage(MessageIn *msg)
}
else {
chatWindow->chatLog(_("Nothing to sell"), BY_SERVER);
- current_npc = 0;
+ if (current_npc) current_npc->handleDeath();
}
break;
diff --git a/src/net/playerhandler.cpp b/src/net/playerhandler.cpp
index e142dd91..74e959da 100644
--- a/src/net/playerhandler.cpp
+++ b/src/net/playerhandler.cpp
@@ -86,7 +86,7 @@ namespace {
buyDialog->setVisible(false);
sellDialog->setVisible(false);
buySellDialog->setVisible(false);
- current_npc = 0;
+ if (current_npc) current_npc->handleDeath();
}
} deathListener;
}
@@ -140,7 +140,7 @@ void PlayerHandler::handleMessage(MessageIn *msg)
// Switch the actual map, deleting the previous one if necessary
engine->changeMap(mapPath);
- current_npc = 0;
+ if (current_npc) current_npc->handleDeath();
float scrollOffsetX = 0.0f;
float scrollOffsetY = 0.0f;