Addition of CorrectPlayerZ configuration.
This commit is contained in:
parent
4ace5904ce
commit
d0e573e2a2
@ -53,3 +53,10 @@ HeuristicWeight = 20
|
|||||||
|
|
||||||
# Maximum number of generated nodes per one path-finding process, default 3500
|
# Maximum number of generated nodes per one path-finding process, default 3500
|
||||||
MaxIterations = 3500
|
MaxIterations = 3500
|
||||||
|
|
||||||
|
# =================================================================
|
||||||
|
# Other
|
||||||
|
# =================================================================
|
||||||
|
|
||||||
|
# Correct player Z after falling through the ground.
|
||||||
|
CorrectPlayerZ = False
|
||||||
|
@ -929,16 +929,10 @@ public class Config
|
|||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
// GeoEngine
|
// GeoEngine
|
||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
|
|
||||||
/** Geodata */
|
|
||||||
public static String GEODATA_PATH;
|
public static String GEODATA_PATH;
|
||||||
public static int COORD_SYNCHRONIZE;
|
public static int COORD_SYNCHRONIZE;
|
||||||
|
|
||||||
/** Path checking */
|
|
||||||
public static int PART_OF_CHARACTER_HEIGHT;
|
public static int PART_OF_CHARACTER_HEIGHT;
|
||||||
public static int MAX_OBSTACLE_HEIGHT;
|
public static int MAX_OBSTACLE_HEIGHT;
|
||||||
|
|
||||||
/** Path finding */
|
|
||||||
public static boolean PATHFINDING;
|
public static boolean PATHFINDING;
|
||||||
public static String PATHFIND_BUFFERS;
|
public static String PATHFIND_BUFFERS;
|
||||||
public static int BASE_WEIGHT;
|
public static int BASE_WEIGHT;
|
||||||
@ -946,6 +940,7 @@ public class Config
|
|||||||
public static int HEURISTIC_WEIGHT;
|
public static int HEURISTIC_WEIGHT;
|
||||||
public static int OBSTACLE_MULTIPLIER;
|
public static int OBSTACLE_MULTIPLIER;
|
||||||
public static int MAX_ITERATIONS;
|
public static int MAX_ITERATIONS;
|
||||||
|
public static boolean CORRECT_PLAYER_Z;
|
||||||
|
|
||||||
/** Attribute System */
|
/** Attribute System */
|
||||||
public static int S_WEAPON_STONE;
|
public static int S_WEAPON_STONE;
|
||||||
@ -2486,6 +2481,7 @@ public class Config
|
|||||||
OBSTACLE_MULTIPLIER = GeoEngine.getInt("ObstacleMultiplier", 10);
|
OBSTACLE_MULTIPLIER = GeoEngine.getInt("ObstacleMultiplier", 10);
|
||||||
HEURISTIC_WEIGHT = GeoEngine.getInt("HeuristicWeight", 20);
|
HEURISTIC_WEIGHT = GeoEngine.getInt("HeuristicWeight", 20);
|
||||||
MAX_ITERATIONS = GeoEngine.getInt("MaxIterations", 3500);
|
MAX_ITERATIONS = GeoEngine.getInt("MaxIterations", 3500);
|
||||||
|
CORRECT_PLAYER_Z = GeoEngine.getBoolean("CorrectPlayerZ", false);
|
||||||
|
|
||||||
// Load AllowedPlayerRaces config file (if exists)
|
// Load AllowedPlayerRaces config file (if exists)
|
||||||
final PropertiesParser AllowedPlayerRaces = new PropertiesParser(CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE);
|
final PropertiesParser AllowedPlayerRaces = new PropertiesParser(CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE);
|
||||||
|
@ -12718,6 +12718,14 @@ public class PlayerInstance extends Playable
|
|||||||
}
|
}
|
||||||
if (_fallingDamageTask != null)
|
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.cancel(true);
|
||||||
}
|
}
|
||||||
_fallingDamageTask = ThreadPool.schedule(() ->
|
_fallingDamageTask = ThreadPool.schedule(() ->
|
||||||
|
@ -53,3 +53,10 @@ HeuristicWeight = 20
|
|||||||
|
|
||||||
# Maximum number of generated nodes per one path-finding process, default 3500
|
# Maximum number of generated nodes per one path-finding process, default 3500
|
||||||
MaxIterations = 3500
|
MaxIterations = 3500
|
||||||
|
|
||||||
|
# =================================================================
|
||||||
|
# Other
|
||||||
|
# =================================================================
|
||||||
|
|
||||||
|
# Correct player Z after falling through the ground.
|
||||||
|
CorrectPlayerZ = False
|
||||||
|
@ -939,16 +939,10 @@ public class Config
|
|||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
// GeoEngine
|
// GeoEngine
|
||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
|
|
||||||
/** Geodata */
|
|
||||||
public static String GEODATA_PATH;
|
public static String GEODATA_PATH;
|
||||||
public static int COORD_SYNCHRONIZE;
|
public static int COORD_SYNCHRONIZE;
|
||||||
|
|
||||||
/** Path checking */
|
|
||||||
public static int PART_OF_CHARACTER_HEIGHT;
|
public static int PART_OF_CHARACTER_HEIGHT;
|
||||||
public static int MAX_OBSTACLE_HEIGHT;
|
public static int MAX_OBSTACLE_HEIGHT;
|
||||||
|
|
||||||
/** Path finding */
|
|
||||||
public static boolean PATHFINDING;
|
public static boolean PATHFINDING;
|
||||||
public static String PATHFIND_BUFFERS;
|
public static String PATHFIND_BUFFERS;
|
||||||
public static int BASE_WEIGHT;
|
public static int BASE_WEIGHT;
|
||||||
@ -956,6 +950,7 @@ public class Config
|
|||||||
public static int HEURISTIC_WEIGHT;
|
public static int HEURISTIC_WEIGHT;
|
||||||
public static int OBSTACLE_MULTIPLIER;
|
public static int OBSTACLE_MULTIPLIER;
|
||||||
public static int MAX_ITERATIONS;
|
public static int MAX_ITERATIONS;
|
||||||
|
public static boolean CORRECT_PLAYER_Z;
|
||||||
|
|
||||||
/** Attribute System */
|
/** Attribute System */
|
||||||
public static int S_WEAPON_STONE;
|
public static int S_WEAPON_STONE;
|
||||||
@ -2508,6 +2503,7 @@ public class Config
|
|||||||
OBSTACLE_MULTIPLIER = GeoEngine.getInt("ObstacleMultiplier", 10);
|
OBSTACLE_MULTIPLIER = GeoEngine.getInt("ObstacleMultiplier", 10);
|
||||||
HEURISTIC_WEIGHT = GeoEngine.getInt("HeuristicWeight", 20);
|
HEURISTIC_WEIGHT = GeoEngine.getInt("HeuristicWeight", 20);
|
||||||
MAX_ITERATIONS = GeoEngine.getInt("MaxIterations", 3500);
|
MAX_ITERATIONS = GeoEngine.getInt("MaxIterations", 3500);
|
||||||
|
CORRECT_PLAYER_Z = GeoEngine.getBoolean("CorrectPlayerZ", false);
|
||||||
|
|
||||||
// Load AllowedPlayerRaces config file (if exists)
|
// Load AllowedPlayerRaces config file (if exists)
|
||||||
final PropertiesParser AllowedPlayerRaces = new PropertiesParser(CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE);
|
final PropertiesParser AllowedPlayerRaces = new PropertiesParser(CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE);
|
||||||
|
@ -12725,6 +12725,14 @@ public class PlayerInstance extends Playable
|
|||||||
}
|
}
|
||||||
if (_fallingDamageTask != null)
|
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.cancel(true);
|
||||||
}
|
}
|
||||||
_fallingDamageTask = ThreadPool.schedule(() ->
|
_fallingDamageTask = ThreadPool.schedule(() ->
|
||||||
|
@ -53,3 +53,10 @@ HeuristicWeight = 20
|
|||||||
|
|
||||||
# Maximum number of generated nodes per one path-finding process, default 3500
|
# Maximum number of generated nodes per one path-finding process, default 3500
|
||||||
MaxIterations = 3500
|
MaxIterations = 3500
|
||||||
|
|
||||||
|
# =================================================================
|
||||||
|
# Other
|
||||||
|
# =================================================================
|
||||||
|
|
||||||
|
# Correct player Z after falling through the ground.
|
||||||
|
CorrectPlayerZ = False
|
||||||
|
@ -952,16 +952,10 @@ public class Config
|
|||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
// GeoEngine
|
// GeoEngine
|
||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
|
|
||||||
/** Geodata */
|
|
||||||
public static String GEODATA_PATH;
|
public static String GEODATA_PATH;
|
||||||
public static int COORD_SYNCHRONIZE;
|
public static int COORD_SYNCHRONIZE;
|
||||||
|
|
||||||
/** Path checking */
|
|
||||||
public static int PART_OF_CHARACTER_HEIGHT;
|
public static int PART_OF_CHARACTER_HEIGHT;
|
||||||
public static int MAX_OBSTACLE_HEIGHT;
|
public static int MAX_OBSTACLE_HEIGHT;
|
||||||
|
|
||||||
/** Path finding */
|
|
||||||
public static boolean PATHFINDING;
|
public static boolean PATHFINDING;
|
||||||
public static String PATHFIND_BUFFERS;
|
public static String PATHFIND_BUFFERS;
|
||||||
public static int BASE_WEIGHT;
|
public static int BASE_WEIGHT;
|
||||||
@ -969,6 +963,7 @@ public class Config
|
|||||||
public static int HEURISTIC_WEIGHT;
|
public static int HEURISTIC_WEIGHT;
|
||||||
public static int OBSTACLE_MULTIPLIER;
|
public static int OBSTACLE_MULTIPLIER;
|
||||||
public static int MAX_ITERATIONS;
|
public static int MAX_ITERATIONS;
|
||||||
|
public static boolean CORRECT_PLAYER_Z;
|
||||||
|
|
||||||
/** Attribute System */
|
/** Attribute System */
|
||||||
public static int S_WEAPON_STONE;
|
public static int S_WEAPON_STONE;
|
||||||
@ -2530,6 +2525,7 @@ public class Config
|
|||||||
OBSTACLE_MULTIPLIER = GeoEngine.getInt("ObstacleMultiplier", 10);
|
OBSTACLE_MULTIPLIER = GeoEngine.getInt("ObstacleMultiplier", 10);
|
||||||
HEURISTIC_WEIGHT = GeoEngine.getInt("HeuristicWeight", 20);
|
HEURISTIC_WEIGHT = GeoEngine.getInt("HeuristicWeight", 20);
|
||||||
MAX_ITERATIONS = GeoEngine.getInt("MaxIterations", 3500);
|
MAX_ITERATIONS = GeoEngine.getInt("MaxIterations", 3500);
|
||||||
|
CORRECT_PLAYER_Z = GeoEngine.getBoolean("CorrectPlayerZ", false);
|
||||||
|
|
||||||
// Load AllowedPlayerRaces config file (if exists)
|
// Load AllowedPlayerRaces config file (if exists)
|
||||||
final PropertiesParser AllowedPlayerRaces = new PropertiesParser(CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE);
|
final PropertiesParser AllowedPlayerRaces = new PropertiesParser(CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE);
|
||||||
|
@ -12727,6 +12727,14 @@ public class PlayerInstance extends Playable
|
|||||||
}
|
}
|
||||||
if (_fallingDamageTask != null)
|
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.cancel(true);
|
||||||
}
|
}
|
||||||
_fallingDamageTask = ThreadPool.schedule(() ->
|
_fallingDamageTask = ThreadPool.schedule(() ->
|
||||||
|
@ -53,3 +53,10 @@ HeuristicWeight = 20
|
|||||||
|
|
||||||
# Maximum number of generated nodes per one path-finding process, default 3500
|
# Maximum number of generated nodes per one path-finding process, default 3500
|
||||||
MaxIterations = 3500
|
MaxIterations = 3500
|
||||||
|
|
||||||
|
# =================================================================
|
||||||
|
# Other
|
||||||
|
# =================================================================
|
||||||
|
|
||||||
|
# Correct player Z after falling through the ground.
|
||||||
|
CorrectPlayerZ = False
|
||||||
|
@ -939,16 +939,10 @@ public class Config
|
|||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
// GeoEngine
|
// GeoEngine
|
||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
|
|
||||||
/** Geodata */
|
|
||||||
public static String GEODATA_PATH;
|
public static String GEODATA_PATH;
|
||||||
public static int COORD_SYNCHRONIZE;
|
public static int COORD_SYNCHRONIZE;
|
||||||
|
|
||||||
/** Path checking */
|
|
||||||
public static int PART_OF_CHARACTER_HEIGHT;
|
public static int PART_OF_CHARACTER_HEIGHT;
|
||||||
public static int MAX_OBSTACLE_HEIGHT;
|
public static int MAX_OBSTACLE_HEIGHT;
|
||||||
|
|
||||||
/** Path finding */
|
|
||||||
public static boolean PATHFINDING;
|
public static boolean PATHFINDING;
|
||||||
public static String PATHFIND_BUFFERS;
|
public static String PATHFIND_BUFFERS;
|
||||||
public static int BASE_WEIGHT;
|
public static int BASE_WEIGHT;
|
||||||
@ -956,6 +950,7 @@ public class Config
|
|||||||
public static int HEURISTIC_WEIGHT;
|
public static int HEURISTIC_WEIGHT;
|
||||||
public static int OBSTACLE_MULTIPLIER;
|
public static int OBSTACLE_MULTIPLIER;
|
||||||
public static int MAX_ITERATIONS;
|
public static int MAX_ITERATIONS;
|
||||||
|
public static boolean CORRECT_PLAYER_Z;
|
||||||
|
|
||||||
/** Attribute System */
|
/** Attribute System */
|
||||||
public static int S_WEAPON_STONE;
|
public static int S_WEAPON_STONE;
|
||||||
@ -2505,6 +2500,7 @@ public class Config
|
|||||||
OBSTACLE_MULTIPLIER = GeoEngine.getInt("ObstacleMultiplier", 10);
|
OBSTACLE_MULTIPLIER = GeoEngine.getInt("ObstacleMultiplier", 10);
|
||||||
HEURISTIC_WEIGHT = GeoEngine.getInt("HeuristicWeight", 20);
|
HEURISTIC_WEIGHT = GeoEngine.getInt("HeuristicWeight", 20);
|
||||||
MAX_ITERATIONS = GeoEngine.getInt("MaxIterations", 3500);
|
MAX_ITERATIONS = GeoEngine.getInt("MaxIterations", 3500);
|
||||||
|
CORRECT_PLAYER_Z = GeoEngine.getBoolean("CorrectPlayerZ", false);
|
||||||
|
|
||||||
// Load AllowedPlayerRaces config file (if exists)
|
// Load AllowedPlayerRaces config file (if exists)
|
||||||
final PropertiesParser AllowedPlayerRaces = new PropertiesParser(CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE);
|
final PropertiesParser AllowedPlayerRaces = new PropertiesParser(CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE);
|
||||||
|
@ -12707,6 +12707,14 @@ public class PlayerInstance extends Playable
|
|||||||
}
|
}
|
||||||
if (_fallingDamageTask != null)
|
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.cancel(true);
|
||||||
}
|
}
|
||||||
_fallingDamageTask = ThreadPool.schedule(() ->
|
_fallingDamageTask = ThreadPool.schedule(() ->
|
||||||
|
@ -53,3 +53,10 @@ HeuristicWeight = 20
|
|||||||
|
|
||||||
# Maximum number of generated nodes per one path-finding process, default 3500
|
# Maximum number of generated nodes per one path-finding process, default 3500
|
||||||
MaxIterations = 3500
|
MaxIterations = 3500
|
||||||
|
|
||||||
|
# =================================================================
|
||||||
|
# Other
|
||||||
|
# =================================================================
|
||||||
|
|
||||||
|
# Correct player Z after falling through the ground.
|
||||||
|
CorrectPlayerZ = False
|
||||||
|
@ -934,16 +934,10 @@ public class Config
|
|||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
// GeoEngine
|
// GeoEngine
|
||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
|
|
||||||
/** Geodata */
|
|
||||||
public static String GEODATA_PATH;
|
public static String GEODATA_PATH;
|
||||||
public static int COORD_SYNCHRONIZE;
|
public static int COORD_SYNCHRONIZE;
|
||||||
|
|
||||||
/** Path checking */
|
|
||||||
public static int PART_OF_CHARACTER_HEIGHT;
|
public static int PART_OF_CHARACTER_HEIGHT;
|
||||||
public static int MAX_OBSTACLE_HEIGHT;
|
public static int MAX_OBSTACLE_HEIGHT;
|
||||||
|
|
||||||
/** Path finding */
|
|
||||||
public static boolean PATHFINDING;
|
public static boolean PATHFINDING;
|
||||||
public static String PATHFIND_BUFFERS;
|
public static String PATHFIND_BUFFERS;
|
||||||
public static int BASE_WEIGHT;
|
public static int BASE_WEIGHT;
|
||||||
@ -951,6 +945,7 @@ public class Config
|
|||||||
public static int HEURISTIC_WEIGHT;
|
public static int HEURISTIC_WEIGHT;
|
||||||
public static int OBSTACLE_MULTIPLIER;
|
public static int OBSTACLE_MULTIPLIER;
|
||||||
public static int MAX_ITERATIONS;
|
public static int MAX_ITERATIONS;
|
||||||
|
public static boolean CORRECT_PLAYER_Z;
|
||||||
|
|
||||||
/** Attribute System */
|
/** Attribute System */
|
||||||
public static int S_WEAPON_STONE;
|
public static int S_WEAPON_STONE;
|
||||||
@ -2505,6 +2500,7 @@ public class Config
|
|||||||
OBSTACLE_MULTIPLIER = GeoEngine.getInt("ObstacleMultiplier", 10);
|
OBSTACLE_MULTIPLIER = GeoEngine.getInt("ObstacleMultiplier", 10);
|
||||||
HEURISTIC_WEIGHT = GeoEngine.getInt("HeuristicWeight", 20);
|
HEURISTIC_WEIGHT = GeoEngine.getInt("HeuristicWeight", 20);
|
||||||
MAX_ITERATIONS = GeoEngine.getInt("MaxIterations", 3500);
|
MAX_ITERATIONS = GeoEngine.getInt("MaxIterations", 3500);
|
||||||
|
CORRECT_PLAYER_Z = GeoEngine.getBoolean("CorrectPlayerZ", false);
|
||||||
|
|
||||||
// Load AllowedPlayerRaces config file (if exists)
|
// Load AllowedPlayerRaces config file (if exists)
|
||||||
final PropertiesParser AllowedPlayerRaces = new PropertiesParser(CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE);
|
final PropertiesParser AllowedPlayerRaces = new PropertiesParser(CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE);
|
||||||
|
@ -12694,6 +12694,14 @@ public class PlayerInstance extends Playable
|
|||||||
}
|
}
|
||||||
if (_fallingDamageTask != null)
|
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.cancel(true);
|
||||||
}
|
}
|
||||||
_fallingDamageTask = ThreadPool.schedule(() ->
|
_fallingDamageTask = ThreadPool.schedule(() ->
|
||||||
|
@ -53,3 +53,10 @@ HeuristicWeight = 20
|
|||||||
|
|
||||||
# Maximum number of generated nodes per one path-finding process, default 3500
|
# Maximum number of generated nodes per one path-finding process, default 3500
|
||||||
MaxIterations = 3500
|
MaxIterations = 3500
|
||||||
|
|
||||||
|
# =================================================================
|
||||||
|
# Other
|
||||||
|
# =================================================================
|
||||||
|
|
||||||
|
# Correct player Z after falling through the ground.
|
||||||
|
CorrectPlayerZ = False
|
||||||
|
@ -941,16 +941,10 @@ public class Config
|
|||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
// GeoEngine
|
// GeoEngine
|
||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
|
|
||||||
/** Geodata */
|
|
||||||
public static String GEODATA_PATH;
|
public static String GEODATA_PATH;
|
||||||
public static int COORD_SYNCHRONIZE;
|
public static int COORD_SYNCHRONIZE;
|
||||||
|
|
||||||
/** Path checking */
|
|
||||||
public static int PART_OF_CHARACTER_HEIGHT;
|
public static int PART_OF_CHARACTER_HEIGHT;
|
||||||
public static int MAX_OBSTACLE_HEIGHT;
|
public static int MAX_OBSTACLE_HEIGHT;
|
||||||
|
|
||||||
/** Path finding */
|
|
||||||
public static boolean PATHFINDING;
|
public static boolean PATHFINDING;
|
||||||
public static String PATHFIND_BUFFERS;
|
public static String PATHFIND_BUFFERS;
|
||||||
public static int BASE_WEIGHT;
|
public static int BASE_WEIGHT;
|
||||||
@ -958,6 +952,7 @@ public class Config
|
|||||||
public static int HEURISTIC_WEIGHT;
|
public static int HEURISTIC_WEIGHT;
|
||||||
public static int OBSTACLE_MULTIPLIER;
|
public static int OBSTACLE_MULTIPLIER;
|
||||||
public static int MAX_ITERATIONS;
|
public static int MAX_ITERATIONS;
|
||||||
|
public static boolean CORRECT_PLAYER_Z;
|
||||||
|
|
||||||
/** Attribute System */
|
/** Attribute System */
|
||||||
public static int S_WEAPON_STONE;
|
public static int S_WEAPON_STONE;
|
||||||
@ -2517,6 +2512,7 @@ public class Config
|
|||||||
OBSTACLE_MULTIPLIER = GeoEngine.getInt("ObstacleMultiplier", 10);
|
OBSTACLE_MULTIPLIER = GeoEngine.getInt("ObstacleMultiplier", 10);
|
||||||
HEURISTIC_WEIGHT = GeoEngine.getInt("HeuristicWeight", 20);
|
HEURISTIC_WEIGHT = GeoEngine.getInt("HeuristicWeight", 20);
|
||||||
MAX_ITERATIONS = GeoEngine.getInt("MaxIterations", 3500);
|
MAX_ITERATIONS = GeoEngine.getInt("MaxIterations", 3500);
|
||||||
|
CORRECT_PLAYER_Z = GeoEngine.getBoolean("CorrectPlayerZ", false);
|
||||||
|
|
||||||
// Load AllowedPlayerRaces config file (if exists)
|
// Load AllowedPlayerRaces config file (if exists)
|
||||||
final PropertiesParser AllowedPlayerRaces = new PropertiesParser(CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE);
|
final PropertiesParser AllowedPlayerRaces = new PropertiesParser(CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE);
|
||||||
|
@ -12697,6 +12697,14 @@ public class PlayerInstance extends Playable
|
|||||||
}
|
}
|
||||||
if (_fallingDamageTask != null)
|
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.cancel(true);
|
||||||
}
|
}
|
||||||
_fallingDamageTask = ThreadPool.schedule(() ->
|
_fallingDamageTask = ThreadPool.schedule(() ->
|
||||||
|
@ -53,3 +53,10 @@ HeuristicWeight = 20
|
|||||||
|
|
||||||
# Maximum number of generated nodes per one path-finding process, default 3500
|
# Maximum number of generated nodes per one path-finding process, default 3500
|
||||||
MaxIterations = 3500
|
MaxIterations = 3500
|
||||||
|
|
||||||
|
# =================================================================
|
||||||
|
# Other
|
||||||
|
# =================================================================
|
||||||
|
|
||||||
|
# Correct player Z after falling through the ground.
|
||||||
|
CorrectPlayerZ = False
|
||||||
|
@ -953,16 +953,10 @@ public class Config
|
|||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
// GeoEngine
|
// GeoEngine
|
||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
|
|
||||||
/** Geodata */
|
|
||||||
public static String GEODATA_PATH;
|
public static String GEODATA_PATH;
|
||||||
public static int COORD_SYNCHRONIZE;
|
public static int COORD_SYNCHRONIZE;
|
||||||
|
|
||||||
/** Path checking */
|
|
||||||
public static int PART_OF_CHARACTER_HEIGHT;
|
public static int PART_OF_CHARACTER_HEIGHT;
|
||||||
public static int MAX_OBSTACLE_HEIGHT;
|
public static int MAX_OBSTACLE_HEIGHT;
|
||||||
|
|
||||||
/** Path finding */
|
|
||||||
public static boolean PATHFINDING;
|
public static boolean PATHFINDING;
|
||||||
public static String PATHFIND_BUFFERS;
|
public static String PATHFIND_BUFFERS;
|
||||||
public static int BASE_WEIGHT;
|
public static int BASE_WEIGHT;
|
||||||
@ -970,6 +964,7 @@ public class Config
|
|||||||
public static int HEURISTIC_WEIGHT;
|
public static int HEURISTIC_WEIGHT;
|
||||||
public static int OBSTACLE_MULTIPLIER;
|
public static int OBSTACLE_MULTIPLIER;
|
||||||
public static int MAX_ITERATIONS;
|
public static int MAX_ITERATIONS;
|
||||||
|
public static boolean CORRECT_PLAYER_Z;
|
||||||
|
|
||||||
/** Attribute System */
|
/** Attribute System */
|
||||||
public static int S_WEAPON_STONE;
|
public static int S_WEAPON_STONE;
|
||||||
@ -2560,6 +2555,7 @@ public class Config
|
|||||||
OBSTACLE_MULTIPLIER = GeoEngine.getInt("ObstacleMultiplier", 10);
|
OBSTACLE_MULTIPLIER = GeoEngine.getInt("ObstacleMultiplier", 10);
|
||||||
HEURISTIC_WEIGHT = GeoEngine.getInt("HeuristicWeight", 20);
|
HEURISTIC_WEIGHT = GeoEngine.getInt("HeuristicWeight", 20);
|
||||||
MAX_ITERATIONS = GeoEngine.getInt("MaxIterations", 3500);
|
MAX_ITERATIONS = GeoEngine.getInt("MaxIterations", 3500);
|
||||||
|
CORRECT_PLAYER_Z = GeoEngine.getBoolean("CorrectPlayerZ", false);
|
||||||
|
|
||||||
// Load AllowedPlayerRaces config file (if exists)
|
// Load AllowedPlayerRaces config file (if exists)
|
||||||
final PropertiesParser AllowedPlayerRaces = new PropertiesParser(CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE);
|
final PropertiesParser AllowedPlayerRaces = new PropertiesParser(CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE);
|
||||||
|
@ -12703,6 +12703,14 @@ public class PlayerInstance extends Playable
|
|||||||
}
|
}
|
||||||
if (_fallingDamageTask != null)
|
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.cancel(true);
|
||||||
}
|
}
|
||||||
_fallingDamageTask = ThreadPool.schedule(() ->
|
_fallingDamageTask = ThreadPool.schedule(() ->
|
||||||
|
@ -53,3 +53,10 @@ HeuristicWeight = 20
|
|||||||
|
|
||||||
# Maximum number of generated nodes per one path-finding process, default 3500
|
# Maximum number of generated nodes per one path-finding process, default 3500
|
||||||
MaxIterations = 3500
|
MaxIterations = 3500
|
||||||
|
|
||||||
|
# =================================================================
|
||||||
|
# Other
|
||||||
|
# =================================================================
|
||||||
|
|
||||||
|
# Correct player Z after falling through the ground.
|
||||||
|
CorrectPlayerZ = False
|
||||||
|
@ -964,16 +964,10 @@ public class Config
|
|||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
// GeoEngine
|
// GeoEngine
|
||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
|
|
||||||
/** Geodata */
|
|
||||||
public static String GEODATA_PATH;
|
public static String GEODATA_PATH;
|
||||||
public static int COORD_SYNCHRONIZE;
|
public static int COORD_SYNCHRONIZE;
|
||||||
|
|
||||||
/** Path checking */
|
|
||||||
public static int PART_OF_CHARACTER_HEIGHT;
|
public static int PART_OF_CHARACTER_HEIGHT;
|
||||||
public static int MAX_OBSTACLE_HEIGHT;
|
public static int MAX_OBSTACLE_HEIGHT;
|
||||||
|
|
||||||
/** Path finding */
|
|
||||||
public static boolean PATHFINDING;
|
public static boolean PATHFINDING;
|
||||||
public static String PATHFIND_BUFFERS;
|
public static String PATHFIND_BUFFERS;
|
||||||
public static int BASE_WEIGHT;
|
public static int BASE_WEIGHT;
|
||||||
@ -981,6 +975,7 @@ public class Config
|
|||||||
public static int HEURISTIC_WEIGHT;
|
public static int HEURISTIC_WEIGHT;
|
||||||
public static int OBSTACLE_MULTIPLIER;
|
public static int OBSTACLE_MULTIPLIER;
|
||||||
public static int MAX_ITERATIONS;
|
public static int MAX_ITERATIONS;
|
||||||
|
public static boolean CORRECT_PLAYER_Z;
|
||||||
|
|
||||||
/** Attribute System */
|
/** Attribute System */
|
||||||
public static int S_WEAPON_STONE;
|
public static int S_WEAPON_STONE;
|
||||||
@ -2584,6 +2579,7 @@ public class Config
|
|||||||
OBSTACLE_MULTIPLIER = GeoEngine.getInt("ObstacleMultiplier", 10);
|
OBSTACLE_MULTIPLIER = GeoEngine.getInt("ObstacleMultiplier", 10);
|
||||||
HEURISTIC_WEIGHT = GeoEngine.getInt("HeuristicWeight", 20);
|
HEURISTIC_WEIGHT = GeoEngine.getInt("HeuristicWeight", 20);
|
||||||
MAX_ITERATIONS = GeoEngine.getInt("MaxIterations", 3500);
|
MAX_ITERATIONS = GeoEngine.getInt("MaxIterations", 3500);
|
||||||
|
CORRECT_PLAYER_Z = GeoEngine.getBoolean("CorrectPlayerZ", false);
|
||||||
|
|
||||||
// Load AllowedPlayerRaces config file (if exists)
|
// Load AllowedPlayerRaces config file (if exists)
|
||||||
final PropertiesParser AllowedPlayerRaces = new PropertiesParser(CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE);
|
final PropertiesParser AllowedPlayerRaces = new PropertiesParser(CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE);
|
||||||
|
@ -12711,6 +12711,14 @@ public class PlayerInstance extends Playable
|
|||||||
}
|
}
|
||||||
if (_fallingDamageTask != null)
|
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.cancel(true);
|
||||||
}
|
}
|
||||||
_fallingDamageTask = ThreadPool.schedule(() ->
|
_fallingDamageTask = ThreadPool.schedule(() ->
|
||||||
|
@ -53,3 +53,10 @@ HeuristicWeight = 20
|
|||||||
|
|
||||||
# Maximum number of generated nodes per one path-finding process, default 3500
|
# Maximum number of generated nodes per one path-finding process, default 3500
|
||||||
MaxIterations = 3500
|
MaxIterations = 3500
|
||||||
|
|
||||||
|
# =================================================================
|
||||||
|
# Other
|
||||||
|
# =================================================================
|
||||||
|
|
||||||
|
# Correct player Z after falling through the ground.
|
||||||
|
CorrectPlayerZ = False
|
||||||
|
@ -961,16 +961,10 @@ public class Config
|
|||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
// GeoEngine
|
// GeoEngine
|
||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
|
|
||||||
/** Geodata */
|
|
||||||
public static String GEODATA_PATH;
|
public static String GEODATA_PATH;
|
||||||
public static int COORD_SYNCHRONIZE;
|
public static int COORD_SYNCHRONIZE;
|
||||||
|
|
||||||
/** Path checking */
|
|
||||||
public static int PART_OF_CHARACTER_HEIGHT;
|
public static int PART_OF_CHARACTER_HEIGHT;
|
||||||
public static int MAX_OBSTACLE_HEIGHT;
|
public static int MAX_OBSTACLE_HEIGHT;
|
||||||
|
|
||||||
/** Path finding */
|
|
||||||
public static boolean PATHFINDING;
|
public static boolean PATHFINDING;
|
||||||
public static String PATHFIND_BUFFERS;
|
public static String PATHFIND_BUFFERS;
|
||||||
public static int BASE_WEIGHT;
|
public static int BASE_WEIGHT;
|
||||||
@ -978,6 +972,7 @@ public class Config
|
|||||||
public static int HEURISTIC_WEIGHT;
|
public static int HEURISTIC_WEIGHT;
|
||||||
public static int OBSTACLE_MULTIPLIER;
|
public static int OBSTACLE_MULTIPLIER;
|
||||||
public static int MAX_ITERATIONS;
|
public static int MAX_ITERATIONS;
|
||||||
|
public static boolean CORRECT_PLAYER_Z;
|
||||||
|
|
||||||
/** Attribute System */
|
/** Attribute System */
|
||||||
public static int S_WEAPON_STONE;
|
public static int S_WEAPON_STONE;
|
||||||
@ -2578,6 +2573,7 @@ public class Config
|
|||||||
OBSTACLE_MULTIPLIER = GeoEngine.getInt("ObstacleMultiplier", 10);
|
OBSTACLE_MULTIPLIER = GeoEngine.getInt("ObstacleMultiplier", 10);
|
||||||
HEURISTIC_WEIGHT = GeoEngine.getInt("HeuristicWeight", 20);
|
HEURISTIC_WEIGHT = GeoEngine.getInt("HeuristicWeight", 20);
|
||||||
MAX_ITERATIONS = GeoEngine.getInt("MaxIterations", 3500);
|
MAX_ITERATIONS = GeoEngine.getInt("MaxIterations", 3500);
|
||||||
|
CORRECT_PLAYER_Z = GeoEngine.getBoolean("CorrectPlayerZ", false);
|
||||||
|
|
||||||
// Load AllowedPlayerRaces config file (if exists)
|
// Load AllowedPlayerRaces config file (if exists)
|
||||||
final PropertiesParser AllowedPlayerRaces = new PropertiesParser(CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE);
|
final PropertiesParser AllowedPlayerRaces = new PropertiesParser(CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE);
|
||||||
|
@ -12752,6 +12752,14 @@ public class PlayerInstance extends Playable
|
|||||||
}
|
}
|
||||||
if (_fallingDamageTask != null)
|
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.cancel(true);
|
||||||
}
|
}
|
||||||
_fallingDamageTask = ThreadPool.schedule(() ->
|
_fallingDamageTask = ThreadPool.schedule(() ->
|
||||||
|
@ -58,6 +58,9 @@ MaxIterations = 3500
|
|||||||
# Other
|
# Other
|
||||||
# =================================================================
|
# =================================================================
|
||||||
|
|
||||||
|
# Correct player Z after falling through the ground.
|
||||||
|
CorrectPlayerZ = False
|
||||||
|
|
||||||
# When a character falls, he takes damages.
|
# When a character falls, he takes damages.
|
||||||
# Default: True
|
# Default: True
|
||||||
FallDamage = True
|
FallDamage = True
|
||||||
|
@ -938,6 +938,7 @@ public class Config
|
|||||||
public static int HEURISTIC_WEIGHT;
|
public static int HEURISTIC_WEIGHT;
|
||||||
public static int OBSTACLE_MULTIPLIER;
|
public static int OBSTACLE_MULTIPLIER;
|
||||||
public static int MAX_ITERATIONS;
|
public static int MAX_ITERATIONS;
|
||||||
|
public static boolean CORRECT_PLAYER_Z;
|
||||||
public static boolean FALL_DAMAGE;
|
public static boolean FALL_DAMAGE;
|
||||||
public static boolean ALLOW_WATER;
|
public static boolean ALLOW_WATER;
|
||||||
|
|
||||||
@ -2504,6 +2505,7 @@ public class Config
|
|||||||
OBSTACLE_MULTIPLIER = geoengineConfig.getInt("ObstacleMultiplier", 10);
|
OBSTACLE_MULTIPLIER = geoengineConfig.getInt("ObstacleMultiplier", 10);
|
||||||
HEURISTIC_WEIGHT = geoengineConfig.getInt("HeuristicWeight", 20);
|
HEURISTIC_WEIGHT = geoengineConfig.getInt("HeuristicWeight", 20);
|
||||||
MAX_ITERATIONS = geoengineConfig.getInt("MaxIterations", 3500);
|
MAX_ITERATIONS = geoengineConfig.getInt("MaxIterations", 3500);
|
||||||
|
CORRECT_PLAYER_Z = geoengineConfig.getBoolean("CorrectPlayerZ", false);
|
||||||
FALL_DAMAGE = geoengineConfig.getBoolean("FallDamage", false);
|
FALL_DAMAGE = geoengineConfig.getBoolean("FallDamage", false);
|
||||||
ALLOW_WATER = geoengineConfig.getBoolean("AllowWater", false);
|
ALLOW_WATER = geoengineConfig.getBoolean("AllowWater", false);
|
||||||
}
|
}
|
||||||
|
@ -15447,6 +15447,14 @@ public class PlayerInstance extends Playable
|
|||||||
}
|
}
|
||||||
if (_fallingDamageTask != null)
|
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.cancel(true);
|
||||||
}
|
}
|
||||||
_fallingDamageTask = ThreadPool.schedule(() ->
|
_fallingDamageTask = ThreadPool.schedule(() ->
|
||||||
|
@ -58,6 +58,9 @@ MaxIterations = 3500
|
|||||||
# Other
|
# Other
|
||||||
# =================================================================
|
# =================================================================
|
||||||
|
|
||||||
|
# Correct player Z after falling through the ground.
|
||||||
|
CorrectPlayerZ = False
|
||||||
|
|
||||||
# When a character falls, he takes damages.
|
# When a character falls, he takes damages.
|
||||||
# Default: True
|
# Default: True
|
||||||
FallDamage = True
|
FallDamage = True
|
||||||
|
@ -972,6 +972,7 @@ public class Config
|
|||||||
public static int HEURISTIC_WEIGHT;
|
public static int HEURISTIC_WEIGHT;
|
||||||
public static int OBSTACLE_MULTIPLIER;
|
public static int OBSTACLE_MULTIPLIER;
|
||||||
public static int MAX_ITERATIONS;
|
public static int MAX_ITERATIONS;
|
||||||
|
public static boolean CORRECT_PLAYER_Z;
|
||||||
public static boolean FALL_DAMAGE;
|
public static boolean FALL_DAMAGE;
|
||||||
public static boolean ALLOW_WATER;
|
public static boolean ALLOW_WATER;
|
||||||
|
|
||||||
@ -2569,6 +2570,7 @@ public class Config
|
|||||||
OBSTACLE_MULTIPLIER = geoengineConfig.getInt("ObstacleMultiplier", 10);
|
OBSTACLE_MULTIPLIER = geoengineConfig.getInt("ObstacleMultiplier", 10);
|
||||||
HEURISTIC_WEIGHT = geoengineConfig.getInt("HeuristicWeight", 20);
|
HEURISTIC_WEIGHT = geoengineConfig.getInt("HeuristicWeight", 20);
|
||||||
MAX_ITERATIONS = geoengineConfig.getInt("MaxIterations", 3500);
|
MAX_ITERATIONS = geoengineConfig.getInt("MaxIterations", 3500);
|
||||||
|
CORRECT_PLAYER_Z = geoengineConfig.getBoolean("CorrectPlayerZ", false);
|
||||||
FALL_DAMAGE = geoengineConfig.getBoolean("FallDamage", false);
|
FALL_DAMAGE = geoengineConfig.getBoolean("FallDamage", false);
|
||||||
ALLOW_WATER = geoengineConfig.getBoolean("AllowWater", false);
|
ALLOW_WATER = geoengineConfig.getBoolean("AllowWater", false);
|
||||||
}
|
}
|
||||||
|
@ -15813,6 +15813,14 @@ public class PlayerInstance extends Playable
|
|||||||
}
|
}
|
||||||
if (_fallingDamageTask != null)
|
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.cancel(true);
|
||||||
}
|
}
|
||||||
_fallingDamageTask = ThreadPool.schedule(() ->
|
_fallingDamageTask = ThreadPool.schedule(() ->
|
||||||
|
@ -53,3 +53,10 @@ HeuristicWeight = 20
|
|||||||
|
|
||||||
# Maximum number of generated nodes per one path-finding process, default 3500
|
# Maximum number of generated nodes per one path-finding process, default 3500
|
||||||
MaxIterations = 3500
|
MaxIterations = 3500
|
||||||
|
|
||||||
|
# =================================================================
|
||||||
|
# Other
|
||||||
|
# =================================================================
|
||||||
|
|
||||||
|
# Correct player Z after falling through the ground.
|
||||||
|
CorrectPlayerZ = False
|
||||||
|
@ -1058,16 +1058,10 @@ public class Config
|
|||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
// GeoEngine
|
// GeoEngine
|
||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
|
|
||||||
/** Geodata */
|
|
||||||
public static String GEODATA_PATH;
|
public static String GEODATA_PATH;
|
||||||
public static int COORD_SYNCHRONIZE;
|
public static int COORD_SYNCHRONIZE;
|
||||||
|
|
||||||
/** Path checking */
|
|
||||||
public static int PART_OF_CHARACTER_HEIGHT;
|
public static int PART_OF_CHARACTER_HEIGHT;
|
||||||
public static int MAX_OBSTACLE_HEIGHT;
|
public static int MAX_OBSTACLE_HEIGHT;
|
||||||
|
|
||||||
/** Path finding */
|
|
||||||
public static boolean PATHFINDING;
|
public static boolean PATHFINDING;
|
||||||
public static String PATHFIND_BUFFERS;
|
public static String PATHFIND_BUFFERS;
|
||||||
public static int BASE_WEIGHT;
|
public static int BASE_WEIGHT;
|
||||||
@ -1075,6 +1069,7 @@ public class Config
|
|||||||
public static int HEURISTIC_WEIGHT;
|
public static int HEURISTIC_WEIGHT;
|
||||||
public static int OBSTACLE_MULTIPLIER;
|
public static int OBSTACLE_MULTIPLIER;
|
||||||
public static int MAX_ITERATIONS;
|
public static int MAX_ITERATIONS;
|
||||||
|
public static boolean CORRECT_PLAYER_Z;
|
||||||
|
|
||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
// Custom Settings
|
// Custom Settings
|
||||||
@ -2604,6 +2599,7 @@ public class Config
|
|||||||
OBSTACLE_MULTIPLIER = GeoEngine.getInt("ObstacleMultiplier", 10);
|
OBSTACLE_MULTIPLIER = GeoEngine.getInt("ObstacleMultiplier", 10);
|
||||||
HEURISTIC_WEIGHT = GeoEngine.getInt("HeuristicWeight", 20);
|
HEURISTIC_WEIGHT = GeoEngine.getInt("HeuristicWeight", 20);
|
||||||
MAX_ITERATIONS = GeoEngine.getInt("MaxIterations", 3500);
|
MAX_ITERATIONS = GeoEngine.getInt("MaxIterations", 3500);
|
||||||
|
CORRECT_PLAYER_Z = GeoEngine.getBoolean("CorrectPlayerZ", false);
|
||||||
|
|
||||||
// Load AllowedPlayerRaces config file (if exists)
|
// Load AllowedPlayerRaces config file (if exists)
|
||||||
final PropertiesParser AllowedPlayerRaces = new PropertiesParser(CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE);
|
final PropertiesParser AllowedPlayerRaces = new PropertiesParser(CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE);
|
||||||
|
@ -13533,6 +13533,14 @@ public class PlayerInstance extends Playable
|
|||||||
}
|
}
|
||||||
if (_fallingDamageTask != null)
|
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.cancel(true);
|
||||||
}
|
}
|
||||||
_fallingDamageTask = ThreadPool.schedule(() ->
|
_fallingDamageTask = ThreadPool.schedule(() ->
|
||||||
|
@ -53,3 +53,10 @@ HeuristicWeight = 20
|
|||||||
|
|
||||||
# Maximum number of generated nodes per one path-finding process, default 3500
|
# Maximum number of generated nodes per one path-finding process, default 3500
|
||||||
MaxIterations = 3500
|
MaxIterations = 3500
|
||||||
|
|
||||||
|
# =================================================================
|
||||||
|
# Other
|
||||||
|
# =================================================================
|
||||||
|
|
||||||
|
# Correct player Z after falling through the ground.
|
||||||
|
CorrectPlayerZ = False
|
||||||
|
@ -1057,16 +1057,10 @@ public class Config
|
|||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
// GeoEngine
|
// GeoEngine
|
||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
|
|
||||||
/** Geodata */
|
|
||||||
public static String GEODATA_PATH;
|
public static String GEODATA_PATH;
|
||||||
public static int COORD_SYNCHRONIZE;
|
public static int COORD_SYNCHRONIZE;
|
||||||
|
|
||||||
/** Path checking */
|
|
||||||
public static int PART_OF_CHARACTER_HEIGHT;
|
public static int PART_OF_CHARACTER_HEIGHT;
|
||||||
public static int MAX_OBSTACLE_HEIGHT;
|
public static int MAX_OBSTACLE_HEIGHT;
|
||||||
|
|
||||||
/** Path finding */
|
|
||||||
public static boolean PATHFINDING;
|
public static boolean PATHFINDING;
|
||||||
public static String PATHFIND_BUFFERS;
|
public static String PATHFIND_BUFFERS;
|
||||||
public static int BASE_WEIGHT;
|
public static int BASE_WEIGHT;
|
||||||
@ -1074,6 +1068,7 @@ public class Config
|
|||||||
public static int HEURISTIC_WEIGHT;
|
public static int HEURISTIC_WEIGHT;
|
||||||
public static int OBSTACLE_MULTIPLIER;
|
public static int OBSTACLE_MULTIPLIER;
|
||||||
public static int MAX_ITERATIONS;
|
public static int MAX_ITERATIONS;
|
||||||
|
public static boolean CORRECT_PLAYER_Z;
|
||||||
|
|
||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
// Custom Settings
|
// Custom Settings
|
||||||
@ -2611,6 +2606,7 @@ public class Config
|
|||||||
OBSTACLE_MULTIPLIER = GeoEngine.getInt("ObstacleMultiplier", 10);
|
OBSTACLE_MULTIPLIER = GeoEngine.getInt("ObstacleMultiplier", 10);
|
||||||
HEURISTIC_WEIGHT = GeoEngine.getInt("HeuristicWeight", 20);
|
HEURISTIC_WEIGHT = GeoEngine.getInt("HeuristicWeight", 20);
|
||||||
MAX_ITERATIONS = GeoEngine.getInt("MaxIterations", 3500);
|
MAX_ITERATIONS = GeoEngine.getInt("MaxIterations", 3500);
|
||||||
|
CORRECT_PLAYER_Z = GeoEngine.getBoolean("CorrectPlayerZ", false);
|
||||||
|
|
||||||
// Load AllowedPlayerRaces config file (if exists)
|
// Load AllowedPlayerRaces config file (if exists)
|
||||||
final PropertiesParser AllowedPlayerRaces = new PropertiesParser(CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE);
|
final PropertiesParser AllowedPlayerRaces = new PropertiesParser(CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE);
|
||||||
|
@ -13426,6 +13426,14 @@ public class PlayerInstance extends Playable
|
|||||||
}
|
}
|
||||||
if (_fallingDamageTask != null)
|
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.cancel(true);
|
||||||
}
|
}
|
||||||
_fallingDamageTask = ThreadPool.schedule(() ->
|
_fallingDamageTask = ThreadPool.schedule(() ->
|
||||||
|
@ -53,3 +53,10 @@ HeuristicWeight = 20
|
|||||||
|
|
||||||
# Maximum number of generated nodes per one path-finding process, default 3500
|
# Maximum number of generated nodes per one path-finding process, default 3500
|
||||||
MaxIterations = 3500
|
MaxIterations = 3500
|
||||||
|
|
||||||
|
# =================================================================
|
||||||
|
# Other
|
||||||
|
# =================================================================
|
||||||
|
|
||||||
|
# Correct player Z after falling through the ground.
|
||||||
|
CorrectPlayerZ = False
|
||||||
|
@ -872,16 +872,10 @@ public class Config
|
|||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
// GeoEngine
|
// GeoEngine
|
||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
|
|
||||||
/** Geodata */
|
|
||||||
public static String GEODATA_PATH;
|
public static String GEODATA_PATH;
|
||||||
public static int COORD_SYNCHRONIZE;
|
public static int COORD_SYNCHRONIZE;
|
||||||
|
|
||||||
/** Path checking */
|
|
||||||
public static int PART_OF_CHARACTER_HEIGHT;
|
public static int PART_OF_CHARACTER_HEIGHT;
|
||||||
public static int MAX_OBSTACLE_HEIGHT;
|
public static int MAX_OBSTACLE_HEIGHT;
|
||||||
|
|
||||||
/** Path finding */
|
|
||||||
public static boolean PATHFINDING;
|
public static boolean PATHFINDING;
|
||||||
public static String PATHFIND_BUFFERS;
|
public static String PATHFIND_BUFFERS;
|
||||||
public static int BASE_WEIGHT;
|
public static int BASE_WEIGHT;
|
||||||
@ -889,6 +883,7 @@ public class Config
|
|||||||
public static int HEURISTIC_WEIGHT;
|
public static int HEURISTIC_WEIGHT;
|
||||||
public static int OBSTACLE_MULTIPLIER;
|
public static int OBSTACLE_MULTIPLIER;
|
||||||
public static int MAX_ITERATIONS;
|
public static int MAX_ITERATIONS;
|
||||||
|
public static boolean CORRECT_PLAYER_Z;
|
||||||
|
|
||||||
/** Attribute System */
|
/** Attribute System */
|
||||||
public static int S_WEAPON_STONE;
|
public static int S_WEAPON_STONE;
|
||||||
@ -2375,6 +2370,7 @@ public class Config
|
|||||||
OBSTACLE_MULTIPLIER = GeoEngine.getInt("ObstacleMultiplier", 10);
|
OBSTACLE_MULTIPLIER = GeoEngine.getInt("ObstacleMultiplier", 10);
|
||||||
HEURISTIC_WEIGHT = GeoEngine.getInt("HeuristicWeight", 20);
|
HEURISTIC_WEIGHT = GeoEngine.getInt("HeuristicWeight", 20);
|
||||||
MAX_ITERATIONS = GeoEngine.getInt("MaxIterations", 3500);
|
MAX_ITERATIONS = GeoEngine.getInt("MaxIterations", 3500);
|
||||||
|
CORRECT_PLAYER_Z = GeoEngine.getBoolean("CorrectPlayerZ", false);
|
||||||
|
|
||||||
// Load AllowedPlayerRaces config file (if exists)
|
// Load AllowedPlayerRaces config file (if exists)
|
||||||
final PropertiesParser AllowedPlayerRaces = new PropertiesParser(CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE);
|
final PropertiesParser AllowedPlayerRaces = new PropertiesParser(CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE);
|
||||||
|
@ -12502,6 +12502,14 @@ public class PlayerInstance extends Playable
|
|||||||
}
|
}
|
||||||
if (_fallingDamageTask != null)
|
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.cancel(true);
|
||||||
}
|
}
|
||||||
_fallingDamageTask = ThreadPool.schedule(() ->
|
_fallingDamageTask = ThreadPool.schedule(() ->
|
||||||
|
@ -53,3 +53,10 @@ HeuristicWeight = 20
|
|||||||
|
|
||||||
# Maximum number of generated nodes per one path-finding process, default 3500
|
# Maximum number of generated nodes per one path-finding process, default 3500
|
||||||
MaxIterations = 3500
|
MaxIterations = 3500
|
||||||
|
|
||||||
|
# =================================================================
|
||||||
|
# Other
|
||||||
|
# =================================================================
|
||||||
|
|
||||||
|
# Correct player Z after falling through the ground.
|
||||||
|
CorrectPlayerZ = False
|
||||||
|
@ -876,16 +876,10 @@ public class Config
|
|||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
// GeoEngine
|
// GeoEngine
|
||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
|
|
||||||
/** Geodata */
|
|
||||||
public static String GEODATA_PATH;
|
public static String GEODATA_PATH;
|
||||||
public static int COORD_SYNCHRONIZE;
|
public static int COORD_SYNCHRONIZE;
|
||||||
|
|
||||||
/** Path checking */
|
|
||||||
public static int PART_OF_CHARACTER_HEIGHT;
|
public static int PART_OF_CHARACTER_HEIGHT;
|
||||||
public static int MAX_OBSTACLE_HEIGHT;
|
public static int MAX_OBSTACLE_HEIGHT;
|
||||||
|
|
||||||
/** Path finding */
|
|
||||||
public static boolean PATHFINDING;
|
public static boolean PATHFINDING;
|
||||||
public static String PATHFIND_BUFFERS;
|
public static String PATHFIND_BUFFERS;
|
||||||
public static int BASE_WEIGHT;
|
public static int BASE_WEIGHT;
|
||||||
@ -893,6 +887,7 @@ public class Config
|
|||||||
public static int HEURISTIC_WEIGHT;
|
public static int HEURISTIC_WEIGHT;
|
||||||
public static int OBSTACLE_MULTIPLIER;
|
public static int OBSTACLE_MULTIPLIER;
|
||||||
public static int MAX_ITERATIONS;
|
public static int MAX_ITERATIONS;
|
||||||
|
public static boolean CORRECT_PLAYER_Z;
|
||||||
|
|
||||||
/** Attribute System */
|
/** Attribute System */
|
||||||
public static int S_WEAPON_STONE;
|
public static int S_WEAPON_STONE;
|
||||||
@ -2381,6 +2376,7 @@ public class Config
|
|||||||
OBSTACLE_MULTIPLIER = GeoEngine.getInt("ObstacleMultiplier", 10);
|
OBSTACLE_MULTIPLIER = GeoEngine.getInt("ObstacleMultiplier", 10);
|
||||||
HEURISTIC_WEIGHT = GeoEngine.getInt("HeuristicWeight", 20);
|
HEURISTIC_WEIGHT = GeoEngine.getInt("HeuristicWeight", 20);
|
||||||
MAX_ITERATIONS = GeoEngine.getInt("MaxIterations", 3500);
|
MAX_ITERATIONS = GeoEngine.getInt("MaxIterations", 3500);
|
||||||
|
CORRECT_PLAYER_Z = GeoEngine.getBoolean("CorrectPlayerZ", false);
|
||||||
|
|
||||||
// Load AllowedPlayerRaces config file (if exists)
|
// Load AllowedPlayerRaces config file (if exists)
|
||||||
final PropertiesParser AllowedPlayerRaces = new PropertiesParser(CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE);
|
final PropertiesParser AllowedPlayerRaces = new PropertiesParser(CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE);
|
||||||
|
@ -12502,6 +12502,14 @@ public class PlayerInstance extends Playable
|
|||||||
}
|
}
|
||||||
if (_fallingDamageTask != null)
|
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.cancel(true);
|
||||||
}
|
}
|
||||||
_fallingDamageTask = ThreadPool.schedule(() ->
|
_fallingDamageTask = ThreadPool.schedule(() ->
|
||||||
|
@ -53,3 +53,10 @@ HeuristicWeight = 20
|
|||||||
|
|
||||||
# Maximum number of generated nodes per one path-finding process, default 3500
|
# Maximum number of generated nodes per one path-finding process, default 3500
|
||||||
MaxIterations = 3500
|
MaxIterations = 3500
|
||||||
|
|
||||||
|
# =================================================================
|
||||||
|
# Other
|
||||||
|
# =================================================================
|
||||||
|
|
||||||
|
# Correct player Z after falling through the ground.
|
||||||
|
CorrectPlayerZ = False
|
||||||
|
@ -876,16 +876,10 @@ public class Config
|
|||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
// GeoEngine
|
// GeoEngine
|
||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
|
|
||||||
/** Geodata */
|
|
||||||
public static String GEODATA_PATH;
|
public static String GEODATA_PATH;
|
||||||
public static int COORD_SYNCHRONIZE;
|
public static int COORD_SYNCHRONIZE;
|
||||||
|
|
||||||
/** Path checking */
|
|
||||||
public static int PART_OF_CHARACTER_HEIGHT;
|
public static int PART_OF_CHARACTER_HEIGHT;
|
||||||
public static int MAX_OBSTACLE_HEIGHT;
|
public static int MAX_OBSTACLE_HEIGHT;
|
||||||
|
|
||||||
/** Path finding */
|
|
||||||
public static boolean PATHFINDING;
|
public static boolean PATHFINDING;
|
||||||
public static String PATHFIND_BUFFERS;
|
public static String PATHFIND_BUFFERS;
|
||||||
public static int BASE_WEIGHT;
|
public static int BASE_WEIGHT;
|
||||||
@ -893,6 +887,7 @@ public class Config
|
|||||||
public static int HEURISTIC_WEIGHT;
|
public static int HEURISTIC_WEIGHT;
|
||||||
public static int OBSTACLE_MULTIPLIER;
|
public static int OBSTACLE_MULTIPLIER;
|
||||||
public static int MAX_ITERATIONS;
|
public static int MAX_ITERATIONS;
|
||||||
|
public static boolean CORRECT_PLAYER_Z;
|
||||||
|
|
||||||
/** Attribute System */
|
/** Attribute System */
|
||||||
public static int S_WEAPON_STONE;
|
public static int S_WEAPON_STONE;
|
||||||
@ -2381,6 +2376,7 @@ public class Config
|
|||||||
OBSTACLE_MULTIPLIER = GeoEngine.getInt("ObstacleMultiplier", 10);
|
OBSTACLE_MULTIPLIER = GeoEngine.getInt("ObstacleMultiplier", 10);
|
||||||
HEURISTIC_WEIGHT = GeoEngine.getInt("HeuristicWeight", 20);
|
HEURISTIC_WEIGHT = GeoEngine.getInt("HeuristicWeight", 20);
|
||||||
MAX_ITERATIONS = GeoEngine.getInt("MaxIterations", 3500);
|
MAX_ITERATIONS = GeoEngine.getInt("MaxIterations", 3500);
|
||||||
|
CORRECT_PLAYER_Z = GeoEngine.getBoolean("CorrectPlayerZ", false);
|
||||||
|
|
||||||
// Load AllowedPlayerRaces config file (if exists)
|
// Load AllowedPlayerRaces config file (if exists)
|
||||||
final PropertiesParser AllowedPlayerRaces = new PropertiesParser(CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE);
|
final PropertiesParser AllowedPlayerRaces = new PropertiesParser(CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE);
|
||||||
|
@ -12488,6 +12488,14 @@ public class PlayerInstance extends Playable
|
|||||||
}
|
}
|
||||||
if (_fallingDamageTask != null)
|
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.cancel(true);
|
||||||
}
|
}
|
||||||
_fallingDamageTask = ThreadPool.schedule(() ->
|
_fallingDamageTask = ThreadPool.schedule(() ->
|
||||||
|
@ -53,3 +53,10 @@ HeuristicWeight = 20
|
|||||||
|
|
||||||
# Maximum number of generated nodes per one path-finding process, default 3500
|
# Maximum number of generated nodes per one path-finding process, default 3500
|
||||||
MaxIterations = 3500
|
MaxIterations = 3500
|
||||||
|
|
||||||
|
# =================================================================
|
||||||
|
# Other
|
||||||
|
# =================================================================
|
||||||
|
|
||||||
|
# Correct player Z after falling through the ground.
|
||||||
|
CorrectPlayerZ = False
|
||||||
|
@ -876,16 +876,10 @@ public class Config
|
|||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
// GeoEngine
|
// GeoEngine
|
||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
|
|
||||||
/** Geodata */
|
|
||||||
public static String GEODATA_PATH;
|
public static String GEODATA_PATH;
|
||||||
public static int COORD_SYNCHRONIZE;
|
public static int COORD_SYNCHRONIZE;
|
||||||
|
|
||||||
/** Path checking */
|
|
||||||
public static int PART_OF_CHARACTER_HEIGHT;
|
public static int PART_OF_CHARACTER_HEIGHT;
|
||||||
public static int MAX_OBSTACLE_HEIGHT;
|
public static int MAX_OBSTACLE_HEIGHT;
|
||||||
|
|
||||||
/** Path finding */
|
|
||||||
public static boolean PATHFINDING;
|
public static boolean PATHFINDING;
|
||||||
public static String PATHFIND_BUFFERS;
|
public static String PATHFIND_BUFFERS;
|
||||||
public static int BASE_WEIGHT;
|
public static int BASE_WEIGHT;
|
||||||
@ -893,6 +887,7 @@ public class Config
|
|||||||
public static int HEURISTIC_WEIGHT;
|
public static int HEURISTIC_WEIGHT;
|
||||||
public static int OBSTACLE_MULTIPLIER;
|
public static int OBSTACLE_MULTIPLIER;
|
||||||
public static int MAX_ITERATIONS;
|
public static int MAX_ITERATIONS;
|
||||||
|
public static boolean CORRECT_PLAYER_Z;
|
||||||
|
|
||||||
/** Attribute System */
|
/** Attribute System */
|
||||||
public static int S_WEAPON_STONE;
|
public static int S_WEAPON_STONE;
|
||||||
@ -2382,6 +2377,7 @@ public class Config
|
|||||||
OBSTACLE_MULTIPLIER = GeoEngine.getInt("ObstacleMultiplier", 10);
|
OBSTACLE_MULTIPLIER = GeoEngine.getInt("ObstacleMultiplier", 10);
|
||||||
HEURISTIC_WEIGHT = GeoEngine.getInt("HeuristicWeight", 20);
|
HEURISTIC_WEIGHT = GeoEngine.getInt("HeuristicWeight", 20);
|
||||||
MAX_ITERATIONS = GeoEngine.getInt("MaxIterations", 3500);
|
MAX_ITERATIONS = GeoEngine.getInt("MaxIterations", 3500);
|
||||||
|
CORRECT_PLAYER_Z = GeoEngine.getBoolean("CorrectPlayerZ", false);
|
||||||
|
|
||||||
// Load AllowedPlayerRaces config file (if exists)
|
// Load AllowedPlayerRaces config file (if exists)
|
||||||
final PropertiesParser AllowedPlayerRaces = new PropertiesParser(CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE);
|
final PropertiesParser AllowedPlayerRaces = new PropertiesParser(CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE);
|
||||||
|
@ -12530,6 +12530,14 @@ public class PlayerInstance extends Playable
|
|||||||
}
|
}
|
||||||
if (_fallingDamageTask != null)
|
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.cancel(true);
|
||||||
}
|
}
|
||||||
_fallingDamageTask = ThreadPool.schedule(() ->
|
_fallingDamageTask = ThreadPool.schedule(() ->
|
||||||
|
@ -53,3 +53,10 @@ HeuristicWeight = 20
|
|||||||
|
|
||||||
# Maximum number of generated nodes per one path-finding process, default 3500
|
# Maximum number of generated nodes per one path-finding process, default 3500
|
||||||
MaxIterations = 3500
|
MaxIterations = 3500
|
||||||
|
|
||||||
|
# =================================================================
|
||||||
|
# Other
|
||||||
|
# =================================================================
|
||||||
|
|
||||||
|
# Correct player Z after falling through the ground.
|
||||||
|
CorrectPlayerZ = False
|
||||||
|
@ -881,16 +881,10 @@ public class Config
|
|||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
// GeoEngine
|
// GeoEngine
|
||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
|
|
||||||
/** Geodata */
|
|
||||||
public static String GEODATA_PATH;
|
public static String GEODATA_PATH;
|
||||||
public static int COORD_SYNCHRONIZE;
|
public static int COORD_SYNCHRONIZE;
|
||||||
|
|
||||||
/** Path checking */
|
|
||||||
public static int PART_OF_CHARACTER_HEIGHT;
|
public static int PART_OF_CHARACTER_HEIGHT;
|
||||||
public static int MAX_OBSTACLE_HEIGHT;
|
public static int MAX_OBSTACLE_HEIGHT;
|
||||||
|
|
||||||
/** Path finding */
|
|
||||||
public static boolean PATHFINDING;
|
public static boolean PATHFINDING;
|
||||||
public static String PATHFIND_BUFFERS;
|
public static String PATHFIND_BUFFERS;
|
||||||
public static int BASE_WEIGHT;
|
public static int BASE_WEIGHT;
|
||||||
@ -898,6 +892,7 @@ public class Config
|
|||||||
public static int HEURISTIC_WEIGHT;
|
public static int HEURISTIC_WEIGHT;
|
||||||
public static int OBSTACLE_MULTIPLIER;
|
public static int OBSTACLE_MULTIPLIER;
|
||||||
public static int MAX_ITERATIONS;
|
public static int MAX_ITERATIONS;
|
||||||
|
public static boolean CORRECT_PLAYER_Z;
|
||||||
|
|
||||||
/** Attribute System */
|
/** Attribute System */
|
||||||
public static int S_WEAPON_STONE;
|
public static int S_WEAPON_STONE;
|
||||||
@ -2391,6 +2386,7 @@ public class Config
|
|||||||
OBSTACLE_MULTIPLIER = GeoEngine.getInt("ObstacleMultiplier", 10);
|
OBSTACLE_MULTIPLIER = GeoEngine.getInt("ObstacleMultiplier", 10);
|
||||||
HEURISTIC_WEIGHT = GeoEngine.getInt("HeuristicWeight", 20);
|
HEURISTIC_WEIGHT = GeoEngine.getInt("HeuristicWeight", 20);
|
||||||
MAX_ITERATIONS = GeoEngine.getInt("MaxIterations", 3500);
|
MAX_ITERATIONS = GeoEngine.getInt("MaxIterations", 3500);
|
||||||
|
CORRECT_PLAYER_Z = GeoEngine.getBoolean("CorrectPlayerZ", false);
|
||||||
|
|
||||||
// Load AllowedPlayerRaces config file (if exists)
|
// Load AllowedPlayerRaces config file (if exists)
|
||||||
final PropertiesParser AllowedPlayerRaces = new PropertiesParser(CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE);
|
final PropertiesParser AllowedPlayerRaces = new PropertiesParser(CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE);
|
||||||
|
@ -12530,6 +12530,14 @@ public class PlayerInstance extends Playable
|
|||||||
}
|
}
|
||||||
if (_fallingDamageTask != null)
|
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.cancel(true);
|
||||||
}
|
}
|
||||||
_fallingDamageTask = ThreadPool.schedule(() ->
|
_fallingDamageTask = ThreadPool.schedule(() ->
|
||||||
|
@ -53,3 +53,10 @@ HeuristicWeight = 20
|
|||||||
|
|
||||||
# Maximum number of generated nodes per one path-finding process, default 3500
|
# Maximum number of generated nodes per one path-finding process, default 3500
|
||||||
MaxIterations = 3500
|
MaxIterations = 3500
|
||||||
|
|
||||||
|
# =================================================================
|
||||||
|
# Other
|
||||||
|
# =================================================================
|
||||||
|
|
||||||
|
# Correct player Z after falling through the ground.
|
||||||
|
CorrectPlayerZ = False
|
||||||
|
@ -889,16 +889,10 @@ public class Config
|
|||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
// GeoEngine
|
// GeoEngine
|
||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
|
|
||||||
/** Geodata */
|
|
||||||
public static String GEODATA_PATH;
|
public static String GEODATA_PATH;
|
||||||
public static int COORD_SYNCHRONIZE;
|
public static int COORD_SYNCHRONIZE;
|
||||||
|
|
||||||
/** Path checking */
|
|
||||||
public static int PART_OF_CHARACTER_HEIGHT;
|
public static int PART_OF_CHARACTER_HEIGHT;
|
||||||
public static int MAX_OBSTACLE_HEIGHT;
|
public static int MAX_OBSTACLE_HEIGHT;
|
||||||
|
|
||||||
/** Path finding */
|
|
||||||
public static boolean PATHFINDING;
|
public static boolean PATHFINDING;
|
||||||
public static String PATHFIND_BUFFERS;
|
public static String PATHFIND_BUFFERS;
|
||||||
public static int BASE_WEIGHT;
|
public static int BASE_WEIGHT;
|
||||||
@ -906,6 +900,7 @@ public class Config
|
|||||||
public static int HEURISTIC_WEIGHT;
|
public static int HEURISTIC_WEIGHT;
|
||||||
public static int OBSTACLE_MULTIPLIER;
|
public static int OBSTACLE_MULTIPLIER;
|
||||||
public static int MAX_ITERATIONS;
|
public static int MAX_ITERATIONS;
|
||||||
|
public static boolean CORRECT_PLAYER_Z;
|
||||||
|
|
||||||
/** Attribute System */
|
/** Attribute System */
|
||||||
public static int S_WEAPON_STONE;
|
public static int S_WEAPON_STONE;
|
||||||
@ -2408,6 +2403,7 @@ public class Config
|
|||||||
OBSTACLE_MULTIPLIER = GeoEngine.getInt("ObstacleMultiplier", 10);
|
OBSTACLE_MULTIPLIER = GeoEngine.getInt("ObstacleMultiplier", 10);
|
||||||
HEURISTIC_WEIGHT = GeoEngine.getInt("HeuristicWeight", 20);
|
HEURISTIC_WEIGHT = GeoEngine.getInt("HeuristicWeight", 20);
|
||||||
MAX_ITERATIONS = GeoEngine.getInt("MaxIterations", 3500);
|
MAX_ITERATIONS = GeoEngine.getInt("MaxIterations", 3500);
|
||||||
|
CORRECT_PLAYER_Z = GeoEngine.getBoolean("CorrectPlayerZ", false);
|
||||||
|
|
||||||
// Load AllowedPlayerRaces config file (if exists)
|
// Load AllowedPlayerRaces config file (if exists)
|
||||||
final PropertiesParser AllowedPlayerRaces = new PropertiesParser(CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE);
|
final PropertiesParser AllowedPlayerRaces = new PropertiesParser(CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE);
|
||||||
|
@ -12500,6 +12500,14 @@ public class PlayerInstance extends Playable
|
|||||||
}
|
}
|
||||||
if (_fallingDamageTask != null)
|
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.cancel(true);
|
||||||
}
|
}
|
||||||
_fallingDamageTask = ThreadPool.schedule(() ->
|
_fallingDamageTask = ThreadPool.schedule(() ->
|
||||||
|
@ -53,3 +53,10 @@ HeuristicWeight = 20
|
|||||||
|
|
||||||
# Maximum number of generated nodes per one path-finding process, default 3500
|
# Maximum number of generated nodes per one path-finding process, default 3500
|
||||||
MaxIterations = 3500
|
MaxIterations = 3500
|
||||||
|
|
||||||
|
# =================================================================
|
||||||
|
# Other
|
||||||
|
# =================================================================
|
||||||
|
|
||||||
|
# Correct player Z after falling through the ground.
|
||||||
|
CorrectPlayerZ = False
|
||||||
|
@ -890,16 +890,10 @@ public class Config
|
|||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
// GeoEngine
|
// GeoEngine
|
||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
|
|
||||||
/** Geodata */
|
|
||||||
public static String GEODATA_PATH;
|
public static String GEODATA_PATH;
|
||||||
public static int COORD_SYNCHRONIZE;
|
public static int COORD_SYNCHRONIZE;
|
||||||
|
|
||||||
/** Path checking */
|
|
||||||
public static int PART_OF_CHARACTER_HEIGHT;
|
public static int PART_OF_CHARACTER_HEIGHT;
|
||||||
public static int MAX_OBSTACLE_HEIGHT;
|
public static int MAX_OBSTACLE_HEIGHT;
|
||||||
|
|
||||||
/** Path finding */
|
|
||||||
public static boolean PATHFINDING;
|
public static boolean PATHFINDING;
|
||||||
public static String PATHFIND_BUFFERS;
|
public static String PATHFIND_BUFFERS;
|
||||||
public static int BASE_WEIGHT;
|
public static int BASE_WEIGHT;
|
||||||
@ -907,6 +901,7 @@ public class Config
|
|||||||
public static int HEURISTIC_WEIGHT;
|
public static int HEURISTIC_WEIGHT;
|
||||||
public static int OBSTACLE_MULTIPLIER;
|
public static int OBSTACLE_MULTIPLIER;
|
||||||
public static int MAX_ITERATIONS;
|
public static int MAX_ITERATIONS;
|
||||||
|
public static boolean CORRECT_PLAYER_Z;
|
||||||
|
|
||||||
/** Attribute System */
|
/** Attribute System */
|
||||||
public static int S_WEAPON_STONE;
|
public static int S_WEAPON_STONE;
|
||||||
@ -2406,6 +2401,7 @@ public class Config
|
|||||||
OBSTACLE_MULTIPLIER = GeoEngine.getInt("ObstacleMultiplier", 10);
|
OBSTACLE_MULTIPLIER = GeoEngine.getInt("ObstacleMultiplier", 10);
|
||||||
HEURISTIC_WEIGHT = GeoEngine.getInt("HeuristicWeight", 20);
|
HEURISTIC_WEIGHT = GeoEngine.getInt("HeuristicWeight", 20);
|
||||||
MAX_ITERATIONS = GeoEngine.getInt("MaxIterations", 3500);
|
MAX_ITERATIONS = GeoEngine.getInt("MaxIterations", 3500);
|
||||||
|
CORRECT_PLAYER_Z = GeoEngine.getBoolean("CorrectPlayerZ", false);
|
||||||
|
|
||||||
// Load AllowedPlayerRaces config file (if exists)
|
// Load AllowedPlayerRaces config file (if exists)
|
||||||
final PropertiesParser AllowedPlayerRaces = new PropertiesParser(CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE);
|
final PropertiesParser AllowedPlayerRaces = new PropertiesParser(CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE);
|
||||||
|
@ -12523,6 +12523,14 @@ public class PlayerInstance extends Playable
|
|||||||
}
|
}
|
||||||
if (_fallingDamageTask != null)
|
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.cancel(true);
|
||||||
}
|
}
|
||||||
_fallingDamageTask = ThreadPool.schedule(() ->
|
_fallingDamageTask = ThreadPool.schedule(() ->
|
||||||
|
@ -53,3 +53,10 @@ HeuristicWeight = 20
|
|||||||
|
|
||||||
# Maximum number of generated nodes per one path-finding process, default 3500
|
# Maximum number of generated nodes per one path-finding process, default 3500
|
||||||
MaxIterations = 3500
|
MaxIterations = 3500
|
||||||
|
|
||||||
|
# =================================================================
|
||||||
|
# Other
|
||||||
|
# =================================================================
|
||||||
|
|
||||||
|
# Correct player Z after falling through the ground.
|
||||||
|
CorrectPlayerZ = False
|
||||||
|
@ -900,16 +900,10 @@ public class Config
|
|||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
// GeoEngine
|
// GeoEngine
|
||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
|
|
||||||
/** Geodata */
|
|
||||||
public static String GEODATA_PATH;
|
public static String GEODATA_PATH;
|
||||||
public static int COORD_SYNCHRONIZE;
|
public static int COORD_SYNCHRONIZE;
|
||||||
|
|
||||||
/** Path checking */
|
|
||||||
public static int PART_OF_CHARACTER_HEIGHT;
|
public static int PART_OF_CHARACTER_HEIGHT;
|
||||||
public static int MAX_OBSTACLE_HEIGHT;
|
public static int MAX_OBSTACLE_HEIGHT;
|
||||||
|
|
||||||
/** Path finding */
|
|
||||||
public static boolean PATHFINDING;
|
public static boolean PATHFINDING;
|
||||||
public static String PATHFIND_BUFFERS;
|
public static String PATHFIND_BUFFERS;
|
||||||
public static int BASE_WEIGHT;
|
public static int BASE_WEIGHT;
|
||||||
@ -917,6 +911,7 @@ public class Config
|
|||||||
public static int HEURISTIC_WEIGHT;
|
public static int HEURISTIC_WEIGHT;
|
||||||
public static int OBSTACLE_MULTIPLIER;
|
public static int OBSTACLE_MULTIPLIER;
|
||||||
public static int MAX_ITERATIONS;
|
public static int MAX_ITERATIONS;
|
||||||
|
public static boolean CORRECT_PLAYER_Z;
|
||||||
|
|
||||||
/** Attribute System */
|
/** Attribute System */
|
||||||
public static int S_WEAPON_STONE;
|
public static int S_WEAPON_STONE;
|
||||||
@ -2434,6 +2429,7 @@ public class Config
|
|||||||
OBSTACLE_MULTIPLIER = GeoEngine.getInt("ObstacleMultiplier", 10);
|
OBSTACLE_MULTIPLIER = GeoEngine.getInt("ObstacleMultiplier", 10);
|
||||||
HEURISTIC_WEIGHT = GeoEngine.getInt("HeuristicWeight", 20);
|
HEURISTIC_WEIGHT = GeoEngine.getInt("HeuristicWeight", 20);
|
||||||
MAX_ITERATIONS = GeoEngine.getInt("MaxIterations", 3500);
|
MAX_ITERATIONS = GeoEngine.getInt("MaxIterations", 3500);
|
||||||
|
CORRECT_PLAYER_Z = GeoEngine.getBoolean("CorrectPlayerZ", false);
|
||||||
|
|
||||||
// Load AllowedPlayerRaces config file (if exists)
|
// Load AllowedPlayerRaces config file (if exists)
|
||||||
final PropertiesParser AllowedPlayerRaces = new PropertiesParser(CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE);
|
final PropertiesParser AllowedPlayerRaces = new PropertiesParser(CUSTOM_ALLOWED_PLAYER_RACES_CONFIG_FILE);
|
||||||
|
@ -12669,6 +12669,14 @@ public class PlayerInstance extends Playable
|
|||||||
}
|
}
|
||||||
if (_fallingDamageTask != null)
|
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.cancel(true);
|
||||||
}
|
}
|
||||||
_fallingDamageTask = ThreadPool.schedule(() ->
|
_fallingDamageTask = ThreadPool.schedule(() ->
|
||||||
|
Loading…
Reference in New Issue
Block a user