mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[10616] Simplified trade distance checks, GROUP_UPDATE_FLAG_POSITION flag handling moved out of Map
note: need avoid Map::PlayerRelocation calls now and use Player::SetPosition instead
This commit is contained in:
parent
608815855f
commit
c4ddbead04
6 changed files with 6 additions and 26 deletions
|
|
@ -6055,8 +6055,11 @@ bool Player::SetPosition(float x, float y, float z, float orientation, bool tele
|
|||
z = GetPositionZ();
|
||||
|
||||
// group update
|
||||
if(GetGroup() && (old_x != x || old_y != y))
|
||||
if (GetGroup() && (old_x != x || old_y != y))
|
||||
SetGroupUpdateFlag(GROUP_UPDATE_FLAG_POSITION);
|
||||
|
||||
if (GetTrader() && !IsWithinDistInMap(GetTrader(), INTERACTION_DISTANCE))
|
||||
GetSession()->SendCancelTrade(); // will clode both side trade windows
|
||||
}
|
||||
|
||||
// code block for underwater state update
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue