summaryrefslogtreecommitdiff
path: root/bin/ai/library/pathfinder
diff options
context:
space:
mode:
Diffstat (limited to 'bin/ai/library/pathfinder')
-rw-r--r--bin/ai/library/pathfinder/rail/main.nut4
-rw-r--r--bin/ai/library/pathfinder/road/main.nut4
2 files changed, 4 insertions, 4 deletions
diff --git a/bin/ai/library/pathfinder/rail/main.nut b/bin/ai/library/pathfinder/rail/main.nut
index ad5a6664e..2a9186799 100644
--- a/bin/ai/library/pathfinder/rail/main.nut
+++ b/bin/ai/library/pathfinder/rail/main.nut
@@ -341,7 +341,7 @@ function Rail::_GetTunnelsBridges(last_node, cur_node, bridge_dir)
for (local i = 2; i < this._max_bridge_length; i++) {
local bridge_list = AIBridgeList_Length(i + 1);
local target = cur_node + i * (cur_node - last_node);
- if (!bridge_list.IsEmpty() && AIBridge.BuildBridge(AIVehicle.VEHICLE_RAIL, bridge_list.Begin(), cur_node, target)) {
+ if (!bridge_list.IsEmpty() && AIBridge.BuildBridge(AIVehicle.VT_RAIL, bridge_list.Begin(), cur_node, target)) {
tiles.push([target, bridge_dir]);
}
}
@@ -353,7 +353,7 @@ function Rail::_GetTunnelsBridges(last_node, cur_node, bridge_dir)
local tunnel_length = AIMap.DistanceManhattan(cur_node, other_tunnel_end);
local prev_tile = cur_node + (cur_node - other_tunnel_end) / tunnel_length;
if (AITunnel.GetOtherTunnelEnd(other_tunnel_end) == cur_node && tunnel_length >= 2 &&
- prev_tile == last_node && tunnel_length < _max_tunnel_length && AITunnel.BuildTunnel(AIVehicle.VEHICLE_RAIL, cur_node)) {
+ prev_tile == last_node && tunnel_length < _max_tunnel_length && AITunnel.BuildTunnel(AIVehicle.VT_RAIL, cur_node)) {
tiles.push([other_tunnel_end, bridge_dir]);
}
return tiles;
diff --git a/bin/ai/library/pathfinder/road/main.nut b/bin/ai/library/pathfinder/road/main.nut
index b33722369..9c5564656 100644
--- a/bin/ai/library/pathfinder/road/main.nut
+++ b/bin/ai/library/pathfinder/road/main.nut
@@ -300,7 +300,7 @@ function Road::_GetTunnelsBridges(last_node, cur_node, bridge_dir)
for (local i = 2; i < this._max_bridge_length; i++) {
local bridge_list = AIBridgeList_Length(i + 1);
local target = cur_node + i * (cur_node - last_node);
- if (!bridge_list.IsEmpty() && AIBridge.BuildBridge(AIVehicle.VEHICLE_ROAD, bridge_list.Begin(), cur_node, target)) {
+ if (!bridge_list.IsEmpty() && AIBridge.BuildBridge(AIVehicle.VT_ROAD, bridge_list.Begin(), cur_node, target)) {
tiles.push([target, bridge_dir]);
}
}
@@ -312,7 +312,7 @@ function Road::_GetTunnelsBridges(last_node, cur_node, bridge_dir)
local tunnel_length = AIMap.DistanceManhattan(cur_node, other_tunnel_end);
local prev_tile = cur_node + (cur_node - other_tunnel_end) / tunnel_length;
if (AITunnel.GetOtherTunnelEnd(other_tunnel_end) == cur_node && tunnel_length >= 2 &&
- prev_tile == last_node && tunnel_length < _max_tunnel_length && AITunnel.BuildTunnel(AIVehicle.VEHICLE_ROAD, cur_node)) {
+ prev_tile == last_node && tunnel_length < _max_tunnel_length && AITunnel.BuildTunnel(AIVehicle.VT_ROAD, cur_node)) {
tiles.push([other_tunnel_end, bridge_dir]);
}
return tiles;