mirror of
https://github.com/EQEmu/Server.git
synced 2026-04-05 15:22:37 +00:00
Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead
This commit is contained in:
parent
7dce5c4e6f
commit
91221db4c9
@ -1985,7 +1985,7 @@ void EntityList::MessageClose(Mob* sender, bool skipsender, float dist, uint32 t
|
|||||||
|
|
||||||
auto it = client_list.begin();
|
auto it = client_list.begin();
|
||||||
while (it != client_list.end()) {
|
while (it != client_list.end()) {
|
||||||
if (it->second->DistNoRoot(*sender) <= dist2 && (!skipsender || it->second != sender))
|
if (ComparativeDistance(it->second->GetPosition(), sender->GetPosition()) <= dist2 && (!skipsender || it->second != sender))
|
||||||
it->second->Message(type, buffer);
|
it->second->Message(type, buffer);
|
||||||
++it;
|
++it;
|
||||||
}
|
}
|
||||||
@ -2460,7 +2460,7 @@ void EntityList::SendPositionUpdates(Client *client, uint32 cLastUpdate,
|
|||||||
//bool Grouped = client->HasGroup() && mob->IsClient() && (client->GetGroup() == mob->CastToClient()->GetGroup());
|
//bool Grouped = client->HasGroup() && mob->IsClient() && (client->GetGroup() == mob->CastToClient()->GetGroup());
|
||||||
|
|
||||||
//if (range == 0 || (iterator.GetData() == alwayssend) || Grouped || (mob->DistNoRootNoZ(*client) <= range)) {
|
//if (range == 0 || (iterator.GetData() == alwayssend) || Grouped || (mob->DistNoRootNoZ(*client) <= range)) {
|
||||||
if (range == 0 || (it->second == alwayssend) || mob->IsClient() || (mob->DistNoRoot(*client) <= range)) {
|
if (range == 0 || (it->second == alwayssend) || mob->IsClient() || (ComparativeDistance(mob->GetPosition(), client->GetPosition()) <= range)) {
|
||||||
mob->MakeSpawnUpdate(ppu);
|
mob->MakeSpawnUpdate(ppu);
|
||||||
}
|
}
|
||||||
if(mob && mob->IsClient() && mob->GetID()>0) {
|
if(mob && mob->IsClient() && mob->GetID()>0) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user