From fb0626ebec688dfd1b4fe4d8c324c2f7b34fada2 Mon Sep 17 00:00:00 2001 From: Ira Rice Date: Mon, 16 Feb 2009 18:26:35 -0700 Subject: Moved target unsetting on NPCs and monsters to the being class. This is done to ensure that the client doesn't crash if the target dies and is removed from the map (since target drawing is based off of the specific target reporting its x and y coordinates). Signed-off-by: Ira Rice --- src/npc.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src/npc.cpp') diff --git a/src/npc.cpp b/src/npc.cpp index 1088a082..5540350a 100644 --- a/src/npc.cpp +++ b/src/npc.cpp @@ -21,7 +21,6 @@ */ #include "animatedsprite.h" -#include "localplayer.h" #include "npc.h" #include "particle.h" #include "text.h" @@ -74,9 +73,6 @@ NPC::NPC(Uint32 id, Uint16 job, Map *map, Network *network): NPC::~NPC() { delete mName; - - if (player_node->getTarget() == this) - player_node->setTarget(NULL); } void NPC::setName(const std::string &name) -- cgit v1.2.3-60-g2f50