mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-11 20:08:37 +00:00
[Cleanup] Make use of std::abs where possible. (#2739)
# Notes - Resolves https://github.com/EQEmu/Server/issues/338
This commit is contained in:
+3
-3
@@ -2768,9 +2768,9 @@ void Zone::CalculateNpcUpdateDistanceSpread()
|
||||
}
|
||||
}
|
||||
|
||||
int x_spread = int(abs(max_x - min_x));
|
||||
int y_spread = int(abs(max_y - min_y));
|
||||
int combined_spread = int(abs((x_spread + y_spread) / 2));
|
||||
int x_spread = int(std::abs(max_x - min_x));
|
||||
int y_spread = int(std::abs(max_y - min_y));
|
||||
int combined_spread = int(std::abs((x_spread + y_spread) / 2));
|
||||
int update_distance = EQ::ClampLower(int(combined_spread / 4), int(zone->GetMaxMovementUpdateRange()));
|
||||
|
||||
SetNpcPositionUpdateDistance(update_distance);
|
||||
|
||||
Reference in New Issue
Block a user