Disable pathfinding when no geodata are loaded.

This commit is contained in:
MobiusDev
2017-10-20 23:30:05 +00:00
parent 7b86cf9467
commit 38c11f3a55
5 changed files with 60 additions and 20 deletions

View File

@@ -107,12 +107,20 @@ public class GeoEngine
_log.info("GeoEngine: Loaded " + loaded + " geodata files."); _log.info("GeoEngine: Loaded " + loaded + " geodata files.");
// Avoid wrong config when no files loaded // avoid wrong configs when no files are loaded
if ((loaded == 0) && (Config.COORD_SYNCHRONIZE == 2)) if (loaded == 0)
{
if (Config.PATHFINDING)
{
Config.PATHFINDING = false;
_log.info("GeoEngine: Forcing PathFinding setting to false.");
}
if (Config.COORD_SYNCHRONIZE == 2)
{ {
Config.COORD_SYNCHRONIZE = -1; Config.COORD_SYNCHRONIZE = -1;
_log.info("GeoEngine: Forcing CoordSynchronize setting to -1."); _log.info("GeoEngine: Forcing CoordSynchronize setting to -1.");
} }
}
// release multilayer block temporarily buffer // release multilayer block temporarily buffer
BlockMultilayer.release(); BlockMultilayer.release();

View File

@@ -107,12 +107,20 @@ public class GeoEngine
_log.info("GeoEngine: Loaded " + loaded + " geodata files."); _log.info("GeoEngine: Loaded " + loaded + " geodata files.");
// Avoid wrong config when no files loaded // avoid wrong configs when no files are loaded
if ((loaded == 0) && (Config.COORD_SYNCHRONIZE == 2)) if (loaded == 0)
{
if (Config.PATHFINDING)
{
Config.PATHFINDING = false;
_log.info("GeoEngine: Forcing PathFinding setting to false.");
}
if (Config.COORD_SYNCHRONIZE == 2)
{ {
Config.COORD_SYNCHRONIZE = -1; Config.COORD_SYNCHRONIZE = -1;
_log.info("GeoEngine: Forcing CoordSynchronize setting to -1."); _log.info("GeoEngine: Forcing CoordSynchronize setting to -1.");
} }
}
// release multilayer block temporarily buffer // release multilayer block temporarily buffer
BlockMultilayer.release(); BlockMultilayer.release();

View File

@@ -107,12 +107,20 @@ public class GeoEngine
_log.info("GeoEngine: Loaded " + loaded + " geodata files."); _log.info("GeoEngine: Loaded " + loaded + " geodata files.");
// Avoid wrong config when no files loaded // avoid wrong configs when no files are loaded
if ((loaded == 0) && (Config.COORD_SYNCHRONIZE == 2)) if (loaded == 0)
{
if (Config.PATHFINDING)
{
Config.PATHFINDING = false;
_log.info("GeoEngine: Forcing PathFinding setting to false.");
}
if (Config.COORD_SYNCHRONIZE == 2)
{ {
Config.COORD_SYNCHRONIZE = -1; Config.COORD_SYNCHRONIZE = -1;
_log.info("GeoEngine: Forcing CoordSynchronize setting to -1."); _log.info("GeoEngine: Forcing CoordSynchronize setting to -1.");
} }
}
// release multilayer block temporarily buffer // release multilayer block temporarily buffer
BlockMultilayer.release(); BlockMultilayer.release();

View File

@@ -105,12 +105,20 @@ public class GeoEngine
_log.info("GeoEngine: Loaded " + loaded + " geodata files."); _log.info("GeoEngine: Loaded " + loaded + " geodata files.");
// Avoid wrong config when no files loaded // avoid wrong configs when no files are loaded
if ((loaded == 0) && (Config.COORD_SYNCHRONIZE == 2)) if (loaded == 0)
{
if (Config.PATHFINDING)
{
Config.PATHFINDING = false;
_log.info("GeoEngine: Forcing PathFinding setting to false.");
}
if (Config.COORD_SYNCHRONIZE == 2)
{ {
Config.COORD_SYNCHRONIZE = -1; Config.COORD_SYNCHRONIZE = -1;
_log.info("GeoEngine: Forcing CoordSynchronize setting to -1."); _log.info("GeoEngine: Forcing CoordSynchronize setting to -1.");
} }
}
// release multilayer block temporarily buffer // release multilayer block temporarily buffer
BlockMultilayer.release(); BlockMultilayer.release();

View File

@@ -107,12 +107,20 @@ public class GeoEngine
_log.info("GeoEngine: Loaded " + loaded + " geodata files."); _log.info("GeoEngine: Loaded " + loaded + " geodata files.");
// Avoid wrong config when no files loaded // avoid wrong configs when no files are loaded
if ((loaded == 0) && (Config.COORD_SYNCHRONIZE == 2)) if (loaded == 0)
{
if (Config.PATHFINDING)
{
Config.PATHFINDING = false;
_log.info("GeoEngine: Forcing PathFinding setting to false.");
}
if (Config.COORD_SYNCHRONIZE == 2)
{ {
Config.COORD_SYNCHRONIZE = -1; Config.COORD_SYNCHRONIZE = -1;
_log.info("GeoEngine: Forcing CoordSynchronize setting to -1."); _log.info("GeoEngine: Forcing CoordSynchronize setting to -1.");
} }
}
// release multilayer block temporarily buffer // release multilayer block temporarily buffer
BlockMultilayer.release(); BlockMultilayer.release();