summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-02-25 11:25:56 -0700
committerJared Adams <jaxad0127@gmail.com>2009-02-25 11:25:56 -0700
commit9673149ea3c28f42f38fc9989faf76d68e72bd20 (patch)
tree8d372f8d934fa22bdff752796a461105d3047bd7
parent7a65eb17a322cb22e7940504797844114fb77d79 (diff)
downloadmana-client-9673149ea3c28f42f38fc9989faf76d68e72bd20.tar.gz
mana-client-9673149ea3c28f42f38fc9989faf76d68e72bd20.tar.bz2
mana-client-9673149ea3c28f42f38fc9989faf76d68e72bd20.tar.xz
mana-client-9673149ea3c28f42f38fc9989faf76d68e72bd20.zip
Don't delete the Being in the NPC class
The BeingManager will clean it up when it's next cleared. One hanging Being isn't too much. A reference count system like resources use might be a better way to handle Beings.
-rw-r--r--src/npc.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/npc.cpp b/src/npc.cpp
index 658334bc..ecac2509 100644
--- a/src/npc.cpp
+++ b/src/npc.cpp
@@ -181,9 +181,6 @@ void NPC::handleDeath()
if (npcTextDialog->isVisible())
npcTextDialog->showCloseButton();
- else if (current_npc) {
- NPC *temp = current_npc;
+ else
current_npc = NULL;
- delete temp;
- }
}