Abstraction Layer GeoEngine.

This commit is contained in:
MobiusDevelopment
2022-07-16 06:04:42 +00:00
parent 534f5dbf33
commit beb1aa0b77
1220 changed files with 92917 additions and 72972 deletions

View File

@@ -496,6 +496,7 @@ AltVillagesRepQuestReward = False
# ---------------------------------------------------------------------------
AllowLottery = True
AllowRace = True
AllowWater = True
AllowRentPet = False
AllowFishing = True
AllowBoat = True
@@ -504,6 +505,15 @@ AllowManor = True
AllowNpcWalkers = True
# ---------------------------------------------------------------------------
# Falling Damage
# ---------------------------------------------------------------------------
# Allow characters to receive damage from falling.
# Default: True
EnableFallingDamage = True
# ---------------------------------------------------------------------------
# Server Optimization
# ---------------------------------------------------------------------------

View File

@@ -2,51 +2,50 @@
# Geodata
# =================================================================
# Specifies the path to geodata files. For example, when using geodata files located
# at different folder/harddrive ("C:/Program Files/Lineage II/system/geodata/"), default: ./data/geodata/
# Pathfinding options:
# 0 = Disabled
# 1 = Enabled using path node files.
# 2 = Enabled using geodata cells at runtime.
# Default: 0
PathFinding = 2
# Geodata file directory.
GeoDataPath = ./data/geodata/
# Specifies the geodata files type. Default: L2J
# L2J: Using L2J geodata files (filename e.g. 22_16.l2j)
# L2OFF: Using L2OFF geodata files (filename e.g. 22_16_conv.dat)
GeoDataType = L2J
# Pathnode file directory.
# Default: pathnode
PathnodePath = ./data/pathnode/
# =================================================================
# Pathfinding
# =================================================================
# Pathfinding array buffers configuration.
PathFindBuffers = 100x6;128x6;192x6;256x4;320x4;384x4;500x2
# When line of movement check fails, the pathfinding algoritm is performed to look for
# an alternative path (e.g. walk around obstacle), default: True
PathFinding = True
# Weight for nodes without obstacles far from walls.
LowWeight = 0.5
# Pathfinding array buffers configuration, default: 1200x10;2000x10;3000x5;5000x3;10000x3
PathFindBuffers = 1200x10;2000x10;3000x5;5000x3;10000x3
# Weight for nodes near walls.
MediumWeight = 2
# Movement weight, when moving from one to another axially and diagonally, default: 10 and 14
MoveWeight = 10
MoveWeightDiag = 14
# Weight for nodes with obstacles.
HighWeight = 3
# When movement flags of target node is blocked to any direction, use this weight instead of MoveWeight or MoveWeightDiag.
# This causes pathfinding algorithm to avoid path construction exactly near an obstacle, default: 30
ObstacleWeight = 30
# Angle paths will be more "smart", but in cost of higher CPU utilization.
AdvancedDiagonalStrategy = True
# Weight of the heuristic algorithm, which is giving estimated cost from node to target, default: 12 and 18
# For proper function must be higher than MoveWeight.
HeuristicWeight = 12
HeuristicWeightDiag = 18
# Weight for diagonal movement. Used only with AdvancedDiagonalStrategy = True
# Default: LowWeight * sqrt(2)
DiagonalWeight = 0.707
# Maximum number of generated nodes per one path-finding process, default 3500
MaxIterations = 3500
# Maximum number of LOS postfilter passes, 0 will disable postfilter.
# Default: 3
MaxPostfilterPasses = 3
# =================================================================
# Line of Sight
# =================================================================
# Line of sight start at X percent of the character height, default: 75
PartOfCharacterHeight = 75
# Maximum height of an obstacle, which can exceed the line of sight, default: 32
MaxObstacleHeight = 32
# Path debug function.
# Nodes known to pathfinder will be displayed as adena, constructed path as antidots.
# Number of the items show node cost * 10
# Potions display path after first stage filter
# Red potions - actual waypoints. Green potions - nodes removed by LOS postfilter
# This function FOR DEBUG PURPOSES ONLY, never use it on the live server!
DebugPath = False
# =================================================================
# Other

View File

@@ -25,6 +25,3 @@ b - Make it work
To make geodata work:
* unpack your geodata files into "/data/geodata" folder (or any other folder)
* open "/config/main/GeoEngine.ini" with your favorite text editor and then edit following configs:
- GeoDataPath = set path to your geodata, if elsewhere than "./data/geodata/"
- GeoDataType = set the geodata format, which you are using.

View File

@@ -581,7 +581,7 @@ public class Antharas extends Quest
final int ry = getRandom(112400, 116000);
final int rdt = ((_antharas.getX() - rx) * (_antharas.getX() - rx)) + ((_antharas.getY() - ry) * (_antharas.getY() - ry));
final Location randomLocation = new Location(rx, ry, -7704);
if (GeoEngine.getInstance().canSeeLocation(_antharas, randomLocation) && (rdt < dt))
if (GeoEngine.getInstance().canSeeTarget(_antharas, randomLocation) && (rdt < dt))
{
x = rx;
y = ry;