mirror of
https://github.com/EQEmu/Server.git
synced 2026-04-07 21:32:26 +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();
|
auto it = mob_list.begin();
|
||||||
while (it != mob_list.end()) {
|
while (it != mob_list.end()) {
|
||||||
|
|
||||||
LogEntityManagement(
|
LogEntityManagement(
|
||||||
"Removing mob [{}] from [{}] close list entity_id ({})",
|
"Removing mob [{}] from [{}] close list entity_id ({})",
|
||||||
mob->GetCleanName(),
|
mob->GetCleanName(),
|
||||||
@ -2719,7 +2718,7 @@ void EntityList::ScanCloseMobs(
|
|||||||
if (distance <= scan_range || mob->GetAggroRange() >= scan_range) {
|
if (distance <= scan_range || mob->GetAggroRange() >= scan_range) {
|
||||||
close_mobs.insert(std::pair<uint16, Mob *>(mob->GetID(), mob));
|
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;
|
bool has_mob = false;
|
||||||
|
|
||||||
for (auto &cm: mob->close_mobs) {
|
for (auto &cm: mob->close_mobs) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user