mirror of
https://github.com/EQEmu/Server.git
synced 2026-02-16 12:52:25 +00:00
Sanity check on adding self to other lists
This commit is contained in:
parent
fc6689ec09
commit
98340751b0
@ -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<uint16, Mob *>(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) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user