From 98340751b0827db35868a51cddacb0b8aec4608b Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sun, 19 Jul 2020 01:34:25 -0500 Subject: [PATCH] Sanity check on adding self to other lists --- zone/entity.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/zone/entity.cpp b/zone/entity.cpp index b00735e4a..2c8216101 100644 --- a/zone/entity.cpp +++ b/zone/entity.cpp @@ -2657,7 +2657,6 @@ bool EntityList::RemoveMobFromCloseLists(Mob *mob) auto it = mob_list.begin(); while (it != mob_list.end()) { - LogEntityManagement( "Removing mob [{}] from [{}] close list entity_id ({})", mob->GetCleanName(), @@ -2719,7 +2718,7 @@ void EntityList::ScanCloseMobs( if (distance <= scan_range || mob->GetAggroRange() >= scan_range) { close_mobs.insert(std::pair(mob->GetID(), mob)); - if (add_self_to_other_lists) { + if (add_self_to_other_lists && scanning_mob->GetID() > 0) { bool has_mob = false; for (auto &cm: mob->close_mobs) {