Location startpoint = Config.PATHFIND_BOOST == 0 ? new Location(x, y, z) : GeoEngine.moveCheckWithCollision(x, y, z, destX, destY, true, refIndex);
Location native_endpoint = new Location(destX, destY, destZ);
Location endpoint = Config.PATHFIND_BOOST != 2 || Math.abs(destZ - z) > 200 ? native_endpoint.clone() : GeoEngine.moveCheckBackwardWithCollision(destX, destY, destZ, startpoint.x, startpoint.y, true, refIndex);
startpoint.world2geo();
native_endpoint.world2geo();
endpoint.world2geo();
startpoint.z = GeoEngine.NgetHeight(startpoint.x, startpoint.y, startpoint.z, refIndex);
endpoint.z = GeoEngine.NgetHeight(endpoint.x, endpoint.y, endpoint.z, refIndex);
int xdiff = Math.abs(endpoint.x - startpoint.x);
int ydiff = Math.abs(endpoint.y - startpoint.y);
if(xdiff == 0 && ydiff == 0)