forked from MagicBane/Server
Remove distance early exit.
This commit is contained in:
@@ -30,8 +30,6 @@ import org.pmw.tinylog.Logger;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
|
||||||
import static engine.math.FastMath.sqr;
|
|
||||||
|
|
||||||
public enum InterestManager implements Runnable {
|
public enum InterestManager implements Runnable {
|
||||||
|
|
||||||
INTERESTMANAGER;
|
INTERESTMANAGER;
|
||||||
@@ -234,15 +232,6 @@ public enum InterestManager implements Runnable {
|
|||||||
|
|
||||||
private void updateStaticList(PlayerCharacter player, ClientConnection origin) {
|
private void updateStaticList(PlayerCharacter player, ClientConnection origin) {
|
||||||
|
|
||||||
// Only update if we've moved far enough to warrant it
|
|
||||||
|
|
||||||
float distanceSquared = player.getLoc().distanceSquared2D(player.getLastStaticLoc());
|
|
||||||
|
|
||||||
if (distanceSquared > sqr(25))
|
|
||||||
player.setLastStaticLoc(player.getLoc());
|
|
||||||
else
|
|
||||||
return;
|
|
||||||
|
|
||||||
// Get Statics in range
|
// Get Statics in range
|
||||||
HashSet<AbstractWorldObject> toLoad = WorldGrid.getObjectsInRangePartial(player.getLoc(), MBServerStatics.STRUCTURE_LOAD_RANGE,
|
HashSet<AbstractWorldObject> toLoad = WorldGrid.getObjectsInRangePartial(player.getLoc(), MBServerStatics.STRUCTURE_LOAD_RANGE,
|
||||||
MBServerStatics.MASK_STATIC);
|
MBServerStatics.MASK_STATIC);
|
||||||
|
|||||||
Reference in New Issue
Block a user