From 0dacfaa79be59dd921cdfaeea4eadb39eb817375 Mon Sep 17 00:00:00 2001 From: Tobias Ottenweller Date: Sun, 17 Feb 2013 19:43:34 +0100 Subject: [PATCH] Additional work for Issue #8 --- src/de/craftinc/gates/listeners/PluginPortalListener.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/de/craftinc/gates/listeners/PluginPortalListener.java b/src/de/craftinc/gates/listeners/PluginPortalListener.java index 522fb0c..38706c8 100644 --- a/src/de/craftinc/gates/listeners/PluginPortalListener.java +++ b/src/de/craftinc/gates/listeners/PluginPortalListener.java @@ -37,14 +37,14 @@ public class PluginPortalListener implements Listener Gate closestGate = GateUtil.closestGate(playerLocation); if (closestGate != null) - { + { // Make sure gate and player locations are on the same height (y-value). // Otherwise the distance will be messed up when players are flying. // FIX ME: this could potentially let a nearby nether portal fail! playerLocation.setY(closestGate.getLocation().getY()); double distToClosestGate = closestGate.getLocation().distance(playerLocation); - if (distToClosestGate < 1.0) + if (distToClosestGate <= 5.0) // the player location is often not very accurate { gateAtLocation = closestGate; }