mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-15 08:21:28 +00:00
[Hotfix] ScanCloseMobs - Ensure scanning mob has an entity ID
This commit is contained in:
parent
77de9619b5
commit
3f0f95976c
@ -2945,6 +2945,14 @@ void EntityList::RemoveAuraFromMobs(Mob *aura)
|
|||||||
// entity list (zone wide)
|
// entity list (zone wide)
|
||||||
void EntityList::ScanCloseMobs(Mob *scanning_mob)
|
void EntityList::ScanCloseMobs(Mob *scanning_mob)
|
||||||
{
|
{
|
||||||
|
if (!scanning_mob) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (scanning_mob->GetID() <= 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
float scan_range = RuleI(Range, MobCloseScanDistance) * RuleI(Range, MobCloseScanDistance);
|
float scan_range = RuleI(Range, MobCloseScanDistance) * RuleI(Range, MobCloseScanDistance);
|
||||||
|
|
||||||
// Reserve memory in m_close_mobs to avoid frequent re-allocations if not already reserved.
|
// Reserve memory in m_close_mobs to avoid frequent re-allocations if not already reserved.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user