mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-20 17:31:30 +00:00
[XTarget] Performance Improvement After Corpse Change (#1918)
Removed a conditional that was rendered obsolete by moving the addition of a mob to the auto haters list to fire after an IsValidXTarget check. This made an entity_list call unnecessary. [zone/client.cpp] Removed said unnecessary entity_list call. [zone/client.cpp] Removed a superfluous call to ProcessXTargetAutoHaters [zone/attack.cpp]
This commit is contained in:
parent
d10145fc6f
commit
1a556f4451
@ -1799,7 +1799,6 @@ bool Client::Death(Mob* killerMob, int32 damage, uint16 spell, EQ::skills::Skill
|
|||||||
entity_list.RemoveFromTargets(this, true);
|
entity_list.RemoveFromTargets(this, true);
|
||||||
hate_list.RemoveEntFromHateList(this);
|
hate_list.RemoveEntFromHateList(this);
|
||||||
RemoveAutoXTargets();
|
RemoveAutoXTargets();
|
||||||
ProcessXTargetAutoHaters();
|
|
||||||
|
|
||||||
//remove ourself from all proximities
|
//remove ourself from all proximities
|
||||||
ClearAllProximities();
|
ClearAllProximities();
|
||||||
|
|||||||
@ -7428,20 +7428,12 @@ void Client::ProcessXTargetAutoHaters()
|
|||||||
if (XTargets[i].Type != Auto)
|
if (XTargets[i].Type != Auto)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
auto *mob = entity_list.GetMob(XTargets[i].ID);
|
|
||||||
|
|
||||||
if (XTargets[i].ID != 0 && !GetXTargetAutoMgr()->contains_mob(XTargets[i].ID)) {
|
if (XTargets[i].ID != 0 && !GetXTargetAutoMgr()->contains_mob(XTargets[i].ID)) {
|
||||||
XTargets[i].ID = 0;
|
XTargets[i].ID = 0;
|
||||||
XTargets[i].Name[0] = 0;
|
XTargets[i].Name[0] = 0;
|
||||||
XTargets[i].dirty = true;
|
XTargets[i].dirty = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (XTargets[i].ID != 0 && mob && !mob->IsValidXTarget()) {
|
|
||||||
XTargets[i].ID = 0;
|
|
||||||
XTargets[i].Name[0] = 0;
|
|
||||||
XTargets[i].dirty = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (XTargets[i].ID == 0) {
|
if (XTargets[i].ID == 0) {
|
||||||
empty_slots.push(i);
|
empty_slots.push(i);
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user