Addition of CorrectPlayerZ configuration.

This commit is contained in:
MobiusDevelopment 2021-01-08 00:35:14 +00:00
parent 4ace5904ce
commit d0e573e2a2
63 changed files with 351 additions and 116 deletions

View File

@ -53,3 +53,10 @@ HeuristicWeight = 20
# Maximum number of generated nodes per one path-finding process, default 3500
MaxIterations = 3500
# =================================================================
# Other
# =================================================================
# Correct player Z after falling through the ground.
CorrectPlayerZ = False

View File

@ -929,16 +929,10 @@ public class Config
// --------------------------------------------------
// GeoEngine
// --------------------------------------------------
/** Geodata */
public static String GEODATA_PATH;
public static int COORD_SYNCHRONIZE;
/** Path checking */
public static int PART_OF_CHARACTER_HEIGHT;
public static int MAX_OBSTACLE_HEIGHT;
/** Path finding */
public static boolean PATHFINDING;
public static String PATHFIND_BUFFERS;
public static int BASE_WEIGHT;
@ -946,6 +940,7 @@ public class Config
public static int HEURISTIC_WEIGHT;
public static int OBSTACLE_MULTIPLIER;
public static int MAX_ITERATIONS;
public static boolean CORRECT_PLAYER_Z;
/** Attribute System */
public static int S_WEAPON_STONE;
@ -2486,6 +2481,7 @@ public class Config
OBSTACLE_MULTIPLIER = GeoEngine.getInt("ObstacleMultiplier", 10);
HEURISTIC_WEIGHT = GeoEngine.getInt("HeuristicWeight", 20);
MAX_ITERATIONS = GeoEngine.getInt("MaxIterations", 3500);
CORRECT_PLAYER_Z = GeoEngine.getBoolean("CorrectPlayerZ", false);
// Load AllowedPlayerRaces config file (if exists)
final PropertiesParser AllowedPlayerRaces = new PropertiesParser(CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE);

View File

@ -12718,6 +12718,14 @@ public class PlayerInstance extends Playable
}
if (_fallingDamageTask != null)
{
if (Config.CORRECT_PLAYER_Z)
{
final int nearestZ = GeoEngine.getInstance().getHeightNearest(getX(), getY(), getZ());
if (getZ() < nearestZ)
{
teleToLocation(new Location(getX(), getY(), nearestZ));
}
}
_fallingDamageTask.cancel(true);
}
_fallingDamageTask = ThreadPool.schedule(() ->

View File

@ -53,3 +53,10 @@ HeuristicWeight = 20
# Maximum number of generated nodes per one path-finding process, default 3500
MaxIterations = 3500
# =================================================================
# Other
# =================================================================
# Correct player Z after falling through the ground.
CorrectPlayerZ = False

View File

@ -939,16 +939,10 @@ public class Config
// --------------------------------------------------
// GeoEngine
// --------------------------------------------------
/** Geodata */
public static String GEODATA_PATH;
public static int COORD_SYNCHRONIZE;
/** Path checking */
public static int PART_OF_CHARACTER_HEIGHT;
public static int MAX_OBSTACLE_HEIGHT;
/** Path finding */
public static boolean PATHFINDING;
public static String PATHFIND_BUFFERS;
public static int BASE_WEIGHT;
@ -956,6 +950,7 @@ public class Config
public static int HEURISTIC_WEIGHT;
public static int OBSTACLE_MULTIPLIER;
public static int MAX_ITERATIONS;
public static boolean CORRECT_PLAYER_Z;
/** Attribute System */
public static int S_WEAPON_STONE;
@ -2508,6 +2503,7 @@ public class Config
OBSTACLE_MULTIPLIER = GeoEngine.getInt("ObstacleMultiplier", 10);
HEURISTIC_WEIGHT = GeoEngine.getInt("HeuristicWeight", 20);
MAX_ITERATIONS = GeoEngine.getInt("MaxIterations", 3500);
CORRECT_PLAYER_Z = GeoEngine.getBoolean("CorrectPlayerZ", false);
// Load AllowedPlayerRaces config file (if exists)
final PropertiesParser AllowedPlayerRaces = new PropertiesParser(CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE);

View File

@ -12725,6 +12725,14 @@ public class PlayerInstance extends Playable
}
if (_fallingDamageTask != null)
{
if (Config.CORRECT_PLAYER_Z)
{
final int nearestZ = GeoEngine.getInstance().getHeightNearest(getX(), getY(), getZ());
if (getZ() < nearestZ)
{
teleToLocation(new Location(getX(), getY(), nearestZ));
}
}
_fallingDamageTask.cancel(true);
}
_fallingDamageTask = ThreadPool.schedule(() ->

View File

@ -53,3 +53,10 @@ HeuristicWeight = 20
# Maximum number of generated nodes per one path-finding process, default 3500
MaxIterations = 3500
# =================================================================
# Other
# =================================================================
# Correct player Z after falling through the ground.
CorrectPlayerZ = False

View File

@ -952,16 +952,10 @@ public class Config
// --------------------------------------------------
// GeoEngine
// --------------------------------------------------
/** Geodata */
public static String GEODATA_PATH;
public static int COORD_SYNCHRONIZE;
/** Path checking */
public static int PART_OF_CHARACTER_HEIGHT;
public static int MAX_OBSTACLE_HEIGHT;
/** Path finding */
public static boolean PATHFINDING;
public static String PATHFIND_BUFFERS;
public static int BASE_WEIGHT;
@ -969,6 +963,7 @@ public class Config
public static int HEURISTIC_WEIGHT;
public static int OBSTACLE_MULTIPLIER;
public static int MAX_ITERATIONS;
public static boolean CORRECT_PLAYER_Z;
/** Attribute System */
public static int S_WEAPON_STONE;
@ -2530,6 +2525,7 @@ public class Config
OBSTACLE_MULTIPLIER = GeoEngine.getInt("ObstacleMultiplier", 10);
HEURISTIC_WEIGHT = GeoEngine.getInt("HeuristicWeight", 20);
MAX_ITERATIONS = GeoEngine.getInt("MaxIterations", 3500);
CORRECT_PLAYER_Z = GeoEngine.getBoolean("CorrectPlayerZ", false);
// Load AllowedPlayerRaces config file (if exists)
final PropertiesParser AllowedPlayerRaces = new PropertiesParser(CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE);

View File

@ -12727,6 +12727,14 @@ public class PlayerInstance extends Playable
}
if (_fallingDamageTask != null)
{
if (Config.CORRECT_PLAYER_Z)
{
final int nearestZ = GeoEngine.getInstance().getHeightNearest(getX(), getY(), getZ());
if (getZ() < nearestZ)
{
teleToLocation(new Location(getX(), getY(), nearestZ));
}
}
_fallingDamageTask.cancel(true);
}
_fallingDamageTask = ThreadPool.schedule(() ->

View File

@ -53,3 +53,10 @@ HeuristicWeight = 20
# Maximum number of generated nodes per one path-finding process, default 3500
MaxIterations = 3500
# =================================================================
# Other
# =================================================================
# Correct player Z after falling through the ground.
CorrectPlayerZ = False

View File

@ -939,16 +939,10 @@ public class Config
// --------------------------------------------------
// GeoEngine
// --------------------------------------------------
/** Geodata */
public static String GEODATA_PATH;
public static int COORD_SYNCHRONIZE;
/** Path checking */
public static int PART_OF_CHARACTER_HEIGHT;
public static int MAX_OBSTACLE_HEIGHT;
/** Path finding */
public static boolean PATHFINDING;
public static String PATHFIND_BUFFERS;
public static int BASE_WEIGHT;
@ -956,6 +950,7 @@ public class Config
public static int HEURISTIC_WEIGHT;
public static int OBSTACLE_MULTIPLIER;
public static int MAX_ITERATIONS;
public static boolean CORRECT_PLAYER_Z;
/** Attribute System */
public static int S_WEAPON_STONE;
@ -2505,6 +2500,7 @@ public class Config
OBSTACLE_MULTIPLIER = GeoEngine.getInt("ObstacleMultiplier", 10);
HEURISTIC_WEIGHT = GeoEngine.getInt("HeuristicWeight", 20);
MAX_ITERATIONS = GeoEngine.getInt("MaxIterations", 3500);
CORRECT_PLAYER_Z = GeoEngine.getBoolean("CorrectPlayerZ", false);
// Load AllowedPlayerRaces config file (if exists)
final PropertiesParser AllowedPlayerRaces = new PropertiesParser(CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE);

View File

@ -12707,6 +12707,14 @@ public class PlayerInstance extends Playable
}
if (_fallingDamageTask != null)
{
if (Config.CORRECT_PLAYER_Z)
{
final int nearestZ = GeoEngine.getInstance().getHeightNearest(getX(), getY(), getZ());
if (getZ() < nearestZ)
{
teleToLocation(new Location(getX(), getY(), nearestZ));
}
}
_fallingDamageTask.cancel(true);
}
_fallingDamageTask = ThreadPool.schedule(() ->

View File

@ -53,3 +53,10 @@ HeuristicWeight = 20
# Maximum number of generated nodes per one path-finding process, default 3500
MaxIterations = 3500
# =================================================================
# Other
# =================================================================
# Correct player Z after falling through the ground.
CorrectPlayerZ = False

View File

@ -934,16 +934,10 @@ public class Config
// --------------------------------------------------
// GeoEngine
// --------------------------------------------------
/** Geodata */
public static String GEODATA_PATH;
public static int COORD_SYNCHRONIZE;
/** Path checking */
public static int PART_OF_CHARACTER_HEIGHT;
public static int MAX_OBSTACLE_HEIGHT;
/** Path finding */
public static boolean PATHFINDING;
public static String PATHFIND_BUFFERS;
public static int BASE_WEIGHT;
@ -951,6 +945,7 @@ public class Config
public static int HEURISTIC_WEIGHT;
public static int OBSTACLE_MULTIPLIER;
public static int MAX_ITERATIONS;
public static boolean CORRECT_PLAYER_Z;
/** Attribute System */
public static int S_WEAPON_STONE;
@ -2505,6 +2500,7 @@ public class Config
OBSTACLE_MULTIPLIER = GeoEngine.getInt("ObstacleMultiplier", 10);
HEURISTIC_WEIGHT = GeoEngine.getInt("HeuristicWeight", 20);
MAX_ITERATIONS = GeoEngine.getInt("MaxIterations", 3500);
CORRECT_PLAYER_Z = GeoEngine.getBoolean("CorrectPlayerZ", false);
// Load AllowedPlayerRaces config file (if exists)
final PropertiesParser AllowedPlayerRaces = new PropertiesParser(CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE);

View File

@ -12694,6 +12694,14 @@ public class PlayerInstance extends Playable
}
if (_fallingDamageTask != null)
{
if (Config.CORRECT_PLAYER_Z)
{
final int nearestZ = GeoEngine.getInstance().getHeightNearest(getX(), getY(), getZ());
if (getZ() < nearestZ)
{
teleToLocation(new Location(getX(), getY(), nearestZ));
}
}
_fallingDamageTask.cancel(true);
}
_fallingDamageTask = ThreadPool.schedule(() ->

View File

@ -53,3 +53,10 @@ HeuristicWeight = 20
# Maximum number of generated nodes per one path-finding process, default 3500
MaxIterations = 3500
# =================================================================
# Other
# =================================================================
# Correct player Z after falling through the ground.
CorrectPlayerZ = False

View File

@ -941,16 +941,10 @@ public class Config
// --------------------------------------------------
// GeoEngine
// --------------------------------------------------
/** Geodata */
public static String GEODATA_PATH;
public static int COORD_SYNCHRONIZE;
/** Path checking */
public static int PART_OF_CHARACTER_HEIGHT;
public static int MAX_OBSTACLE_HEIGHT;
/** Path finding */
public static boolean PATHFINDING;
public static String PATHFIND_BUFFERS;
public static int BASE_WEIGHT;
@ -958,6 +952,7 @@ public class Config
public static int HEURISTIC_WEIGHT;
public static int OBSTACLE_MULTIPLIER;
public static int MAX_ITERATIONS;
public static boolean CORRECT_PLAYER_Z;
/** Attribute System */
public static int S_WEAPON_STONE;
@ -2517,6 +2512,7 @@ public class Config
OBSTACLE_MULTIPLIER = GeoEngine.getInt("ObstacleMultiplier", 10);
HEURISTIC_WEIGHT = GeoEngine.getInt("HeuristicWeight", 20);
MAX_ITERATIONS = GeoEngine.getInt("MaxIterations", 3500);
CORRECT_PLAYER_Z = GeoEngine.getBoolean("CorrectPlayerZ", false);
// Load AllowedPlayerRaces config file (if exists)
final PropertiesParser AllowedPlayerRaces = new PropertiesParser(CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE);

View File

@ -12697,6 +12697,14 @@ public class PlayerInstance extends Playable
}
if (_fallingDamageTask != null)
{
if (Config.CORRECT_PLAYER_Z)
{
final int nearestZ = GeoEngine.getInstance().getHeightNearest(getX(), getY(), getZ());
if (getZ() < nearestZ)
{
teleToLocation(new Location(getX(), getY(), nearestZ));
}
}
_fallingDamageTask.cancel(true);
}
_fallingDamageTask = ThreadPool.schedule(() ->

View File

@ -53,3 +53,10 @@ HeuristicWeight = 20
# Maximum number of generated nodes per one path-finding process, default 3500
MaxIterations = 3500
# =================================================================
# Other
# =================================================================
# Correct player Z after falling through the ground.
CorrectPlayerZ = False

View File

@ -953,16 +953,10 @@ public class Config
// --------------------------------------------------
// GeoEngine
// --------------------------------------------------
/** Geodata */
public static String GEODATA_PATH;
public static int COORD_SYNCHRONIZE;
/** Path checking */
public static int PART_OF_CHARACTER_HEIGHT;
public static int MAX_OBSTACLE_HEIGHT;
/** Path finding */
public static boolean PATHFINDING;
public static String PATHFIND_BUFFERS;
public static int BASE_WEIGHT;
@ -970,6 +964,7 @@ public class Config
public static int HEURISTIC_WEIGHT;
public static int OBSTACLE_MULTIPLIER;
public static int MAX_ITERATIONS;
public static boolean CORRECT_PLAYER_Z;
/** Attribute System */
public static int S_WEAPON_STONE;
@ -2560,6 +2555,7 @@ public class Config
OBSTACLE_MULTIPLIER = GeoEngine.getInt("ObstacleMultiplier", 10);
HEURISTIC_WEIGHT = GeoEngine.getInt("HeuristicWeight", 20);
MAX_ITERATIONS = GeoEngine.getInt("MaxIterations", 3500);
CORRECT_PLAYER_Z = GeoEngine.getBoolean("CorrectPlayerZ", false);
// Load AllowedPlayerRaces config file (if exists)
final PropertiesParser AllowedPlayerRaces = new PropertiesParser(CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE);

View File

@ -12703,6 +12703,14 @@ public class PlayerInstance extends Playable
}
if (_fallingDamageTask != null)
{
if (Config.CORRECT_PLAYER_Z)
{
final int nearestZ = GeoEngine.getInstance().getHeightNearest(getX(), getY(), getZ());
if (getZ() < nearestZ)
{
teleToLocation(new Location(getX(), getY(), nearestZ));
}
}
_fallingDamageTask.cancel(true);
}
_fallingDamageTask = ThreadPool.schedule(() ->

View File

@ -53,3 +53,10 @@ HeuristicWeight = 20
# Maximum number of generated nodes per one path-finding process, default 3500
MaxIterations = 3500
# =================================================================
# Other
# =================================================================
# Correct player Z after falling through the ground.
CorrectPlayerZ = False

View File

@ -964,16 +964,10 @@ public class Config
// --------------------------------------------------
// GeoEngine
// --------------------------------------------------
/** Geodata */
public static String GEODATA_PATH;
public static int COORD_SYNCHRONIZE;
/** Path checking */
public static int PART_OF_CHARACTER_HEIGHT;
public static int MAX_OBSTACLE_HEIGHT;
/** Path finding */
public static boolean PATHFINDING;
public static String PATHFIND_BUFFERS;
public static int BASE_WEIGHT;
@ -981,6 +975,7 @@ public class Config
public static int HEURISTIC_WEIGHT;
public static int OBSTACLE_MULTIPLIER;
public static int MAX_ITERATIONS;
public static boolean CORRECT_PLAYER_Z;
/** Attribute System */
public static int S_WEAPON_STONE;
@ -2584,6 +2579,7 @@ public class Config
OBSTACLE_MULTIPLIER = GeoEngine.getInt("ObstacleMultiplier", 10);
HEURISTIC_WEIGHT = GeoEngine.getInt("HeuristicWeight", 20);
MAX_ITERATIONS = GeoEngine.getInt("MaxIterations", 3500);
CORRECT_PLAYER_Z = GeoEngine.getBoolean("CorrectPlayerZ", false);
// Load AllowedPlayerRaces config file (if exists)
final PropertiesParser AllowedPlayerRaces = new PropertiesParser(CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE);

View File

@ -12711,6 +12711,14 @@ public class PlayerInstance extends Playable
}
if (_fallingDamageTask != null)
{
if (Config.CORRECT_PLAYER_Z)
{
final int nearestZ = GeoEngine.getInstance().getHeightNearest(getX(), getY(), getZ());
if (getZ() < nearestZ)
{
teleToLocation(new Location(getX(), getY(), nearestZ));
}
}
_fallingDamageTask.cancel(true);
}
_fallingDamageTask = ThreadPool.schedule(() ->

View File

@ -53,3 +53,10 @@ HeuristicWeight = 20
# Maximum number of generated nodes per one path-finding process, default 3500
MaxIterations = 3500
# =================================================================
# Other
# =================================================================
# Correct player Z after falling through the ground.
CorrectPlayerZ = False

View File

@ -961,16 +961,10 @@ public class Config
// --------------------------------------------------
// GeoEngine
// --------------------------------------------------
/** Geodata */
public static String GEODATA_PATH;
public static int COORD_SYNCHRONIZE;
/** Path checking */
public static int PART_OF_CHARACTER_HEIGHT;
public static int MAX_OBSTACLE_HEIGHT;
/** Path finding */
public static boolean PATHFINDING;
public static String PATHFIND_BUFFERS;
public static int BASE_WEIGHT;
@ -978,6 +972,7 @@ public class Config
public static int HEURISTIC_WEIGHT;
public static int OBSTACLE_MULTIPLIER;
public static int MAX_ITERATIONS;
public static boolean CORRECT_PLAYER_Z;
/** Attribute System */
public static int S_WEAPON_STONE;
@ -2578,6 +2573,7 @@ public class Config
OBSTACLE_MULTIPLIER = GeoEngine.getInt("ObstacleMultiplier", 10);
HEURISTIC_WEIGHT = GeoEngine.getInt("HeuristicWeight", 20);
MAX_ITERATIONS = GeoEngine.getInt("MaxIterations", 3500);
CORRECT_PLAYER_Z = GeoEngine.getBoolean("CorrectPlayerZ", false);
// Load AllowedPlayerRaces config file (if exists)
final PropertiesParser AllowedPlayerRaces = new PropertiesParser(CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE);

View File

@ -12752,6 +12752,14 @@ public class PlayerInstance extends Playable
}
if (_fallingDamageTask != null)
{
if (Config.CORRECT_PLAYER_Z)
{
final int nearestZ = GeoEngine.getInstance().getHeightNearest(getX(), getY(), getZ());
if (getZ() < nearestZ)
{
teleToLocation(new Location(getX(), getY(), nearestZ));
}
}
_fallingDamageTask.cancel(true);
}
_fallingDamageTask = ThreadPool.schedule(() ->

View File

@ -55,9 +55,12 @@ HeuristicWeight = 20
MaxIterations = 3500
# =================================================================
# Other
# Other
# =================================================================
# Correct player Z after falling through the ground.
CorrectPlayerZ = False
# When a character falls, he takes damages.
# Default: True
FallDamage = True

View File

@ -938,6 +938,7 @@ public class Config
public static int HEURISTIC_WEIGHT;
public static int OBSTACLE_MULTIPLIER;
public static int MAX_ITERATIONS;
public static boolean CORRECT_PLAYER_Z;
public static boolean FALL_DAMAGE;
public static boolean ALLOW_WATER;
@ -2504,6 +2505,7 @@ public class Config
OBSTACLE_MULTIPLIER = geoengineConfig.getInt("ObstacleMultiplier", 10);
HEURISTIC_WEIGHT = geoengineConfig.getInt("HeuristicWeight", 20);
MAX_ITERATIONS = geoengineConfig.getInt("MaxIterations", 3500);
CORRECT_PLAYER_Z = geoengineConfig.getBoolean("CorrectPlayerZ", false);
FALL_DAMAGE = geoengineConfig.getBoolean("FallDamage", false);
ALLOW_WATER = geoengineConfig.getBoolean("AllowWater", false);
}

View File

@ -15447,6 +15447,14 @@ public class PlayerInstance extends Playable
}
if (_fallingDamageTask != null)
{
if (Config.CORRECT_PLAYER_Z)
{
final int nearestZ = GeoEngine.getInstance().getHeightNearest(getX(), getY(), getZ());
if (getZ() < nearestZ)
{
teleToLocation(new Location(getX(), getY(), nearestZ), false);
}
}
_fallingDamageTask.cancel(true);
}
_fallingDamageTask = ThreadPool.schedule(() ->

View File

@ -55,9 +55,12 @@ HeuristicWeight = 20
MaxIterations = 3500
# =================================================================
# Other
# Other
# =================================================================
# Correct player Z after falling through the ground.
CorrectPlayerZ = False
# When a character falls, he takes damages.
# Default: True
FallDamage = True

View File

@ -972,6 +972,7 @@ public class Config
public static int HEURISTIC_WEIGHT;
public static int OBSTACLE_MULTIPLIER;
public static int MAX_ITERATIONS;
public static boolean CORRECT_PLAYER_Z;
public static boolean FALL_DAMAGE;
public static boolean ALLOW_WATER;
@ -2569,6 +2570,7 @@ public class Config
OBSTACLE_MULTIPLIER = geoengineConfig.getInt("ObstacleMultiplier", 10);
HEURISTIC_WEIGHT = geoengineConfig.getInt("HeuristicWeight", 20);
MAX_ITERATIONS = geoengineConfig.getInt("MaxIterations", 3500);
CORRECT_PLAYER_Z = geoengineConfig.getBoolean("CorrectPlayerZ", false);
FALL_DAMAGE = geoengineConfig.getBoolean("FallDamage", false);
ALLOW_WATER = geoengineConfig.getBoolean("AllowWater", false);
}

View File

@ -15813,6 +15813,14 @@ public class PlayerInstance extends Playable
}
if (_fallingDamageTask != null)
{
if (Config.CORRECT_PLAYER_Z)
{
final int nearestZ = GeoEngine.getInstance().getHeightNearest(getX(), getY(), getZ());
if (getZ() < nearestZ)
{
teleToLocation(new Location(getX(), getY(), nearestZ), false);
}
}
_fallingDamageTask.cancel(true);
}
_fallingDamageTask = ThreadPool.schedule(() ->

View File

@ -53,3 +53,10 @@ HeuristicWeight = 20
# Maximum number of generated nodes per one path-finding process, default 3500
MaxIterations = 3500
# =================================================================
# Other
# =================================================================
# Correct player Z after falling through the ground.
CorrectPlayerZ = False

View File

@ -1058,16 +1058,10 @@ public class Config
// --------------------------------------------------
// GeoEngine
// --------------------------------------------------
/** Geodata */
public static String GEODATA_PATH;
public static int COORD_SYNCHRONIZE;
/** Path checking */
public static int PART_OF_CHARACTER_HEIGHT;
public static int MAX_OBSTACLE_HEIGHT;
/** Path finding */
public static boolean PATHFINDING;
public static String PATHFIND_BUFFERS;
public static int BASE_WEIGHT;
@ -1075,6 +1069,7 @@ public class Config
public static int HEURISTIC_WEIGHT;
public static int OBSTACLE_MULTIPLIER;
public static int MAX_ITERATIONS;
public static boolean CORRECT_PLAYER_Z;
// --------------------------------------------------
// Custom Settings
@ -2604,6 +2599,7 @@ public class Config
OBSTACLE_MULTIPLIER = GeoEngine.getInt("ObstacleMultiplier", 10);
HEURISTIC_WEIGHT = GeoEngine.getInt("HeuristicWeight", 20);
MAX_ITERATIONS = GeoEngine.getInt("MaxIterations", 3500);
CORRECT_PLAYER_Z = GeoEngine.getBoolean("CorrectPlayerZ", false);
// Load AllowedPlayerRaces config file (if exists)
final PropertiesParser AllowedPlayerRaces = new PropertiesParser(CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE);

View File

@ -13533,6 +13533,14 @@ public class PlayerInstance extends Playable
}
if (_fallingDamageTask != null)
{
if (Config.CORRECT_PLAYER_Z)
{
final int nearestZ = GeoEngine.getInstance().getHeightNearest(getX(), getY(), getZ());
if (getZ() < nearestZ)
{
teleToLocation(new Location(getX(), getY(), nearestZ));
}
}
_fallingDamageTask.cancel(true);
}
_fallingDamageTask = ThreadPool.schedule(() ->

View File

@ -53,3 +53,10 @@ HeuristicWeight = 20
# Maximum number of generated nodes per one path-finding process, default 3500
MaxIterations = 3500
# =================================================================
# Other
# =================================================================
# Correct player Z after falling through the ground.
CorrectPlayerZ = False

View File

@ -1057,16 +1057,10 @@ public class Config
// --------------------------------------------------
// GeoEngine
// --------------------------------------------------
/** Geodata */
public static String GEODATA_PATH;
public static int COORD_SYNCHRONIZE;
/** Path checking */
public static int PART_OF_CHARACTER_HEIGHT;
public static int MAX_OBSTACLE_HEIGHT;
/** Path finding */
public static boolean PATHFINDING;
public static String PATHFIND_BUFFERS;
public static int BASE_WEIGHT;
@ -1074,6 +1068,7 @@ public class Config
public static int HEURISTIC_WEIGHT;
public static int OBSTACLE_MULTIPLIER;
public static int MAX_ITERATIONS;
public static boolean CORRECT_PLAYER_Z;
// --------------------------------------------------
// Custom Settings
@ -2611,6 +2606,7 @@ public class Config
OBSTACLE_MULTIPLIER = GeoEngine.getInt("ObstacleMultiplier", 10);
HEURISTIC_WEIGHT = GeoEngine.getInt("HeuristicWeight", 20);
MAX_ITERATIONS = GeoEngine.getInt("MaxIterations", 3500);
CORRECT_PLAYER_Z = GeoEngine.getBoolean("CorrectPlayerZ", false);
// Load AllowedPlayerRaces config file (if exists)
final PropertiesParser AllowedPlayerRaces = new PropertiesParser(CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE);

View File

@ -13426,6 +13426,14 @@ public class PlayerInstance extends Playable
}
if (_fallingDamageTask != null)
{
if (Config.CORRECT_PLAYER_Z)
{
final int nearestZ = GeoEngine.getInstance().getHeightNearest(getX(), getY(), getZ());
if (getZ() < nearestZ)
{
teleToLocation(new Location(getX(), getY(), nearestZ));
}
}
_fallingDamageTask.cancel(true);
}
_fallingDamageTask = ThreadPool.schedule(() ->

View File

@ -53,3 +53,10 @@ HeuristicWeight = 20
# Maximum number of generated nodes per one path-finding process, default 3500
MaxIterations = 3500
# =================================================================
# Other
# =================================================================
# Correct player Z after falling through the ground.
CorrectPlayerZ = False

View File

@ -872,16 +872,10 @@ public class Config
// --------------------------------------------------
// GeoEngine
// --------------------------------------------------
/** Geodata */
public static String GEODATA_PATH;
public static int COORD_SYNCHRONIZE;
/** Path checking */
public static int PART_OF_CHARACTER_HEIGHT;
public static int MAX_OBSTACLE_HEIGHT;
/** Path finding */
public static boolean PATHFINDING;
public static String PATHFIND_BUFFERS;
public static int BASE_WEIGHT;
@ -889,6 +883,7 @@ public class Config
public static int HEURISTIC_WEIGHT;
public static int OBSTACLE_MULTIPLIER;
public static int MAX_ITERATIONS;
public static boolean CORRECT_PLAYER_Z;
/** Attribute System */
public static int S_WEAPON_STONE;
@ -2375,6 +2370,7 @@ public class Config
OBSTACLE_MULTIPLIER = GeoEngine.getInt("ObstacleMultiplier", 10);
HEURISTIC_WEIGHT = GeoEngine.getInt("HeuristicWeight", 20);
MAX_ITERATIONS = GeoEngine.getInt("MaxIterations", 3500);
CORRECT_PLAYER_Z = GeoEngine.getBoolean("CorrectPlayerZ", false);
// Load AllowedPlayerRaces config file (if exists)
final PropertiesParser AllowedPlayerRaces = new PropertiesParser(CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE);

View File

@ -12502,6 +12502,14 @@ public class PlayerInstance extends Playable
}
if (_fallingDamageTask != null)
{
if (Config.CORRECT_PLAYER_Z)
{
final int nearestZ = GeoEngine.getInstance().getHeightNearest(getX(), getY(), getZ());
if (getZ() < nearestZ)
{
teleToLocation(new Location(getX(), getY(), nearestZ));
}
}
_fallingDamageTask.cancel(true);
}
_fallingDamageTask = ThreadPool.schedule(() ->

View File

@ -53,3 +53,10 @@ HeuristicWeight = 20
# Maximum number of generated nodes per one path-finding process, default 3500
MaxIterations = 3500
# =================================================================
# Other
# =================================================================
# Correct player Z after falling through the ground.
CorrectPlayerZ = False

View File

@ -876,16 +876,10 @@ public class Config
// --------------------------------------------------
// GeoEngine
// --------------------------------------------------
/** Geodata */
public static String GEODATA_PATH;
public static int COORD_SYNCHRONIZE;
/** Path checking */
public static int PART_OF_CHARACTER_HEIGHT;
public static int MAX_OBSTACLE_HEIGHT;
/** Path finding */
public static boolean PATHFINDING;
public static String PATHFIND_BUFFERS;
public static int BASE_WEIGHT;
@ -893,6 +887,7 @@ public class Config
public static int HEURISTIC_WEIGHT;
public static int OBSTACLE_MULTIPLIER;
public static int MAX_ITERATIONS;
public static boolean CORRECT_PLAYER_Z;
/** Attribute System */
public static int S_WEAPON_STONE;
@ -2381,6 +2376,7 @@ public class Config
OBSTACLE_MULTIPLIER = GeoEngine.getInt("ObstacleMultiplier", 10);
HEURISTIC_WEIGHT = GeoEngine.getInt("HeuristicWeight", 20);
MAX_ITERATIONS = GeoEngine.getInt("MaxIterations", 3500);
CORRECT_PLAYER_Z = GeoEngine.getBoolean("CorrectPlayerZ", false);
// Load AllowedPlayerRaces config file (if exists)
final PropertiesParser AllowedPlayerRaces = new PropertiesParser(CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE);

View File

@ -12502,6 +12502,14 @@ public class PlayerInstance extends Playable
}
if (_fallingDamageTask != null)
{
if (Config.CORRECT_PLAYER_Z)
{
final int nearestZ = GeoEngine.getInstance().getHeightNearest(getX(), getY(), getZ());
if (getZ() < nearestZ)
{
teleToLocation(new Location(getX(), getY(), nearestZ));
}
}
_fallingDamageTask.cancel(true);
}
_fallingDamageTask = ThreadPool.schedule(() ->

View File

@ -53,3 +53,10 @@ HeuristicWeight = 20
# Maximum number of generated nodes per one path-finding process, default 3500
MaxIterations = 3500
# =================================================================
# Other
# =================================================================
# Correct player Z after falling through the ground.
CorrectPlayerZ = False

View File

@ -876,16 +876,10 @@ public class Config
// --------------------------------------------------
// GeoEngine
// --------------------------------------------------
/** Geodata */
public static String GEODATA_PATH;
public static int COORD_SYNCHRONIZE;
/** Path checking */
public static int PART_OF_CHARACTER_HEIGHT;
public static int MAX_OBSTACLE_HEIGHT;
/** Path finding */
public static boolean PATHFINDING;
public static String PATHFIND_BUFFERS;
public static int BASE_WEIGHT;
@ -893,6 +887,7 @@ public class Config
public static int HEURISTIC_WEIGHT;
public static int OBSTACLE_MULTIPLIER;
public static int MAX_ITERATIONS;
public static boolean CORRECT_PLAYER_Z;
/** Attribute System */
public static int S_WEAPON_STONE;
@ -2381,6 +2376,7 @@ public class Config
OBSTACLE_MULTIPLIER = GeoEngine.getInt("ObstacleMultiplier", 10);
HEURISTIC_WEIGHT = GeoEngine.getInt("HeuristicWeight", 20);
MAX_ITERATIONS = GeoEngine.getInt("MaxIterations", 3500);
CORRECT_PLAYER_Z = GeoEngine.getBoolean("CorrectPlayerZ", false);
// Load AllowedPlayerRaces config file (if exists)
final PropertiesParser AllowedPlayerRaces = new PropertiesParser(CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE);

View File

@ -12488,6 +12488,14 @@ public class PlayerInstance extends Playable
}
if (_fallingDamageTask != null)
{
if (Config.CORRECT_PLAYER_Z)
{
final int nearestZ = GeoEngine.getInstance().getHeightNearest(getX(), getY(), getZ());
if (getZ() < nearestZ)
{
teleToLocation(new Location(getX(), getY(), nearestZ));
}
}
_fallingDamageTask.cancel(true);
}
_fallingDamageTask = ThreadPool.schedule(() ->

View File

@ -53,3 +53,10 @@ HeuristicWeight = 20
# Maximum number of generated nodes per one path-finding process, default 3500
MaxIterations = 3500
# =================================================================
# Other
# =================================================================
# Correct player Z after falling through the ground.
CorrectPlayerZ = False

View File

@ -876,16 +876,10 @@ public class Config
// --------------------------------------------------
// GeoEngine
// --------------------------------------------------
/** Geodata */
public static String GEODATA_PATH;
public static int COORD_SYNCHRONIZE;
/** Path checking */
public static int PART_OF_CHARACTER_HEIGHT;
public static int MAX_OBSTACLE_HEIGHT;
/** Path finding */
public static boolean PATHFINDING;
public static String PATHFIND_BUFFERS;
public static int BASE_WEIGHT;
@ -893,6 +887,7 @@ public class Config
public static int HEURISTIC_WEIGHT;
public static int OBSTACLE_MULTIPLIER;
public static int MAX_ITERATIONS;
public static boolean CORRECT_PLAYER_Z;
/** Attribute System */
public static int S_WEAPON_STONE;
@ -2382,6 +2377,7 @@ public class Config
OBSTACLE_MULTIPLIER = GeoEngine.getInt("ObstacleMultiplier", 10);
HEURISTIC_WEIGHT = GeoEngine.getInt("HeuristicWeight", 20);
MAX_ITERATIONS = GeoEngine.getInt("MaxIterations", 3500);
CORRECT_PLAYER_Z = GeoEngine.getBoolean("CorrectPlayerZ", false);
// Load AllowedPlayerRaces config file (if exists)
final PropertiesParser AllowedPlayerRaces = new PropertiesParser(CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE);

View File

@ -12530,6 +12530,14 @@ public class PlayerInstance extends Playable
}
if (_fallingDamageTask != null)
{
if (Config.CORRECT_PLAYER_Z)
{
final int nearestZ = GeoEngine.getInstance().getHeightNearest(getX(), getY(), getZ());
if (getZ() < nearestZ)
{
teleToLocation(new Location(getX(), getY(), nearestZ));
}
}
_fallingDamageTask.cancel(true);
}
_fallingDamageTask = ThreadPool.schedule(() ->

View File

@ -53,3 +53,10 @@ HeuristicWeight = 20
# Maximum number of generated nodes per one path-finding process, default 3500
MaxIterations = 3500
# =================================================================
# Other
# =================================================================
# Correct player Z after falling through the ground.
CorrectPlayerZ = False

View File

@ -881,16 +881,10 @@ public class Config
// --------------------------------------------------
// GeoEngine
// --------------------------------------------------
/** Geodata */
public static String GEODATA_PATH;
public static int COORD_SYNCHRONIZE;
/** Path checking */
public static int PART_OF_CHARACTER_HEIGHT;
public static int MAX_OBSTACLE_HEIGHT;
/** Path finding */
public static boolean PATHFINDING;
public static String PATHFIND_BUFFERS;
public static int BASE_WEIGHT;
@ -898,6 +892,7 @@ public class Config
public static int HEURISTIC_WEIGHT;
public static int OBSTACLE_MULTIPLIER;
public static int MAX_ITERATIONS;
public static boolean CORRECT_PLAYER_Z;
/** Attribute System */
public static int S_WEAPON_STONE;
@ -2391,6 +2386,7 @@ public class Config
OBSTACLE_MULTIPLIER = GeoEngine.getInt("ObstacleMultiplier", 10);
HEURISTIC_WEIGHT = GeoEngine.getInt("HeuristicWeight", 20);
MAX_ITERATIONS = GeoEngine.getInt("MaxIterations", 3500);
CORRECT_PLAYER_Z = GeoEngine.getBoolean("CorrectPlayerZ", false);
// Load AllowedPlayerRaces config file (if exists)
final PropertiesParser AllowedPlayerRaces = new PropertiesParser(CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE);

View File

@ -12530,6 +12530,14 @@ public class PlayerInstance extends Playable
}
if (_fallingDamageTask != null)
{
if (Config.CORRECT_PLAYER_Z)
{
final int nearestZ = GeoEngine.getInstance().getHeightNearest(getX(), getY(), getZ());
if (getZ() < nearestZ)
{
teleToLocation(new Location(getX(), getY(), nearestZ));
}
}
_fallingDamageTask.cancel(true);
}
_fallingDamageTask = ThreadPool.schedule(() ->

View File

@ -53,3 +53,10 @@ HeuristicWeight = 20
# Maximum number of generated nodes per one path-finding process, default 3500
MaxIterations = 3500
# =================================================================
# Other
# =================================================================
# Correct player Z after falling through the ground.
CorrectPlayerZ = False

View File

@ -889,16 +889,10 @@ public class Config
// --------------------------------------------------
// GeoEngine
// --------------------------------------------------
/** Geodata */
public static String GEODATA_PATH;
public static int COORD_SYNCHRONIZE;
/** Path checking */
public static int PART_OF_CHARACTER_HEIGHT;
public static int MAX_OBSTACLE_HEIGHT;
/** Path finding */
public static boolean PATHFINDING;
public static String PATHFIND_BUFFERS;
public static int BASE_WEIGHT;
@ -906,6 +900,7 @@ public class Config
public static int HEURISTIC_WEIGHT;
public static int OBSTACLE_MULTIPLIER;
public static int MAX_ITERATIONS;
public static boolean CORRECT_PLAYER_Z;
/** Attribute System */
public static int S_WEAPON_STONE;
@ -2408,6 +2403,7 @@ public class Config
OBSTACLE_MULTIPLIER = GeoEngine.getInt("ObstacleMultiplier", 10);
HEURISTIC_WEIGHT = GeoEngine.getInt("HeuristicWeight", 20);
MAX_ITERATIONS = GeoEngine.getInt("MaxIterations", 3500);
CORRECT_PLAYER_Z = GeoEngine.getBoolean("CorrectPlayerZ", false);
// Load AllowedPlayerRaces config file (if exists)
final PropertiesParser AllowedPlayerRaces = new PropertiesParser(CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE);

View File

@ -12500,6 +12500,14 @@ public class PlayerInstance extends Playable
}
if (_fallingDamageTask != null)
{
if (Config.CORRECT_PLAYER_Z)
{
final int nearestZ = GeoEngine.getInstance().getHeightNearest(getX(), getY(), getZ());
if (getZ() < nearestZ)
{
teleToLocation(new Location(getX(), getY(), nearestZ));
}
}
_fallingDamageTask.cancel(true);
}
_fallingDamageTask = ThreadPool.schedule(() ->

View File

@ -53,3 +53,10 @@ HeuristicWeight = 20
# Maximum number of generated nodes per one path-finding process, default 3500
MaxIterations = 3500
# =================================================================
# Other
# =================================================================
# Correct player Z after falling through the ground.
CorrectPlayerZ = False

View File

@ -890,16 +890,10 @@ public class Config
// --------------------------------------------------
// GeoEngine
// --------------------------------------------------
/** Geodata */
public static String GEODATA_PATH;
public static int COORD_SYNCHRONIZE;
/** Path checking */
public static int PART_OF_CHARACTER_HEIGHT;
public static int MAX_OBSTACLE_HEIGHT;
/** Path finding */
public static boolean PATHFINDING;
public static String PATHFIND_BUFFERS;
public static int BASE_WEIGHT;
@ -907,6 +901,7 @@ public class Config
public static int HEURISTIC_WEIGHT;
public static int OBSTACLE_MULTIPLIER;
public static int MAX_ITERATIONS;
public static boolean CORRECT_PLAYER_Z;
/** Attribute System */
public static int S_WEAPON_STONE;
@ -2406,6 +2401,7 @@ public class Config
OBSTACLE_MULTIPLIER = GeoEngine.getInt("ObstacleMultiplier", 10);
HEURISTIC_WEIGHT = GeoEngine.getInt("HeuristicWeight", 20);
MAX_ITERATIONS = GeoEngine.getInt("MaxIterations", 3500);
CORRECT_PLAYER_Z = GeoEngine.getBoolean("CorrectPlayerZ", false);
// Load AllowedPlayerRaces config file (if exists)
final PropertiesParser AllowedPlayerRaces = new PropertiesParser(CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE);

View File

@ -12523,6 +12523,14 @@ public class PlayerInstance extends Playable
}
if (_fallingDamageTask != null)
{
if (Config.CORRECT_PLAYER_Z)
{
final int nearestZ = GeoEngine.getInstance().getHeightNearest(getX(), getY(), getZ());
if (getZ() < nearestZ)
{
teleToLocation(new Location(getX(), getY(), nearestZ));
}
}
_fallingDamageTask.cancel(true);
}
_fallingDamageTask = ThreadPool.schedule(() ->

View File

@ -53,3 +53,10 @@ HeuristicWeight = 20
# Maximum number of generated nodes per one path-finding process, default 3500
MaxIterations = 3500
# =================================================================
# Other
# =================================================================
# Correct player Z after falling through the ground.
CorrectPlayerZ = False

View File

@ -900,16 +900,10 @@ public class Config
// --------------------------------------------------
// GeoEngine
// --------------------------------------------------
/** Geodata */
public static String GEODATA_PATH;
public static int COORD_SYNCHRONIZE;
/** Path checking */
public static int PART_OF_CHARACTER_HEIGHT;
public static int MAX_OBSTACLE_HEIGHT;
/** Path finding */
public static boolean PATHFINDING;
public static String PATHFIND_BUFFERS;
public static int BASE_WEIGHT;
@ -917,6 +911,7 @@ public class Config
public static int HEURISTIC_WEIGHT;
public static int OBSTACLE_MULTIPLIER;
public static int MAX_ITERATIONS;
public static boolean CORRECT_PLAYER_Z;
/** Attribute System */
public static int S_WEAPON_STONE;
@ -2434,6 +2429,7 @@ public class Config
OBSTACLE_MULTIPLIER = GeoEngine.getInt("ObstacleMultiplier", 10);
HEURISTIC_WEIGHT = GeoEngine.getInt("HeuristicWeight", 20);
MAX_ITERATIONS = GeoEngine.getInt("MaxIterations", 3500);
CORRECT_PLAYER_Z = GeoEngine.getBoolean("CorrectPlayerZ", false);
// Load AllowedPlayerRaces config file (if exists)
final PropertiesParser AllowedPlayerRaces = new PropertiesParser(CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE);

View File

@ -12669,6 +12669,14 @@ public class PlayerInstance extends Playable
}
if (_fallingDamageTask != null)
{
if (Config.CORRECT_PLAYER_Z)
{
final int nearestZ = GeoEngine.getInstance().getHeightNearest(getX(), getY(), getZ());
if (getZ() < nearestZ)
{
teleToLocation(new Location(getX(), getY(), nearestZ));
}
}
_fallingDamageTask.cancel(true);
}
_fallingDamageTask = ThreadPool.schedule(() ->