mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[7826] Avoid use GetDistance* that used slow sqrt call where possible, other related speedups.
This commit is contained in:
parent
ff80f14d2d
commit
788cdf9b3a
21 changed files with 158 additions and 93 deletions
|
|
@ -212,7 +212,7 @@ void WorldSession::HandleLootMoneyOpcode( WorldPacket & /*recv_data*/ )
|
|||
Player* playerGroup = itr->getSource();
|
||||
if(!playerGroup)
|
||||
continue;
|
||||
if (player->GetDistance2d(playerGroup) < sWorld.getConfig(CONFIG_GROUP_XP_DISTANCE))
|
||||
if (player->IsWithinDist(playerGroup,sWorld.getConfig(CONFIG_GROUP_XP_DISTANCE),false))
|
||||
playersNear.push_back(playerGroup);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue