All pastes #32473 Raw Edit

Someone

public text v1 · immutable
#32473 ·published 2005-12-05 05:16 UTC
rendered paste body
public void updateKnownObjects()
    {
        boolean update = false;
        
        synchronized (this)
        {
            Point3D worldPosition = owner.getWorldPosition();
            if (worldPosition.distanceSquaredTo(lastPosition) > MINIMUM_UPDATE_DISTANCE_SQUARED)
            {
                lastPosition.setTo(worldPosition);
                update = true;
            }
        }
        
        if (update)
        {
            forgetDistantObjects();
            findCloseObjects();
        }
    }