More hatelist fixes. Trying to nail the crash :S

This commit is contained in:
SecretsOTheP
2014-04-22 13:24:07 -04:00
parent dffee38dc6
commit dd1f5f6a11
6 changed files with 9 additions and 11 deletions
-6
View File
@@ -2107,9 +2107,6 @@ bool EntityList::RemoveMob(uint16 delete_id)
if (delete_id == 0)
return true;
//Moved this from ~Mob, because it could cause a crash in some cases where a hate list was still used and that mob was the only one on the hate list.
entity_list.RemoveFromTargets(delete_id, true);
auto it = mob_list.find(delete_id);
if (it != mob_list.end()) {
if (npc_list.count(delete_id))
@@ -2131,9 +2128,6 @@ bool EntityList::RemoveMob(Mob *delete_mob)
if (delete_mob == 0)
return true;
//Moved this from ~Mob, because it could cause a crash in some cases where a hate list was still used and that mob was the only one on the hate list.
entity_list.RemoveFromTargets(delete_mob, true);
auto it = mob_list.begin();
while (it != mob_list.end()) {
if (it->second == delete_mob) {