Browse Source

Remove distance early exit.

master
MagicBot 1 year ago
parent
commit
8222cb8530
  1. 11
      src/engine/InterestManagement/InterestManager.java

11
src/engine/InterestManagement/InterestManager.java

@ -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);

Loading…
Cancel
Save