mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 09:31:30 +00:00
Removed a usage of Mob::DistNoRootNoZ and used ComparativeDistanceNoZ instead
This commit is contained in:
parent
f33eb9f8f3
commit
f54c698ffe
@ -158,7 +158,7 @@ Mob* HateList::GetClosestEntOnHateList(Mob *hater) {
|
|||||||
|
|
||||||
auto iterator = list.begin();
|
auto iterator = list.begin();
|
||||||
while (iterator != list.end()) {
|
while (iterator != list.end()) {
|
||||||
this_distance = (*iterator)->entity_on_hatelist->DistNoRootNoZ(*hater);
|
this_distance = ComparativeDistanceNoZ((*iterator)->entity_on_hatelist->GetPosition(), hater->GetPosition());
|
||||||
if ((*iterator)->entity_on_hatelist != nullptr && this_distance <= close_distance) {
|
if ((*iterator)->entity_on_hatelist != nullptr && this_distance <= close_distance) {
|
||||||
close_distance = this_distance;
|
close_distance = this_distance;
|
||||||
close_entity = (*iterator)->entity_on_hatelist;
|
close_entity = (*iterator)->entity_on_hatelist;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user