summaryrefslogtreecommitdiff
path: root/src/openttd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/openttd.cpp')
-rw-r--r--src/openttd.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/openttd.cpp b/src/openttd.cpp
index 3e86992b0..e4accf911 100644
--- a/src/openttd.cpp
+++ b/src/openttd.cpp
@@ -2398,6 +2398,25 @@ bool AfterLoadGame()
}
}
}
+
+ /* Convert old PF settings to new */
+ if (_patches.yapf.rail_use_yapf) {
+ _patches.pathfinder_for_trains = VPF_YAPF;
+ } else {
+ _patches.pathfinder_for_trains = (_patches.new_pathfinding_all ? VPF_NPF : VPF_NTP);
+ }
+
+ if (_patches.yapf.road_use_yapf) {
+ _patches.pathfinder_for_roadvehs = VPF_YAPF;
+ } else {
+ _patches.pathfinder_for_roadvehs = (_patches.new_pathfinding_all ? VPF_NPF : VPF_OPF);
+ }
+
+ if (_patches.yapf.ship_use_yapf) {
+ _patches.pathfinder_for_ships = VPF_YAPF;
+ } else {
+ _patches.pathfinder_for_ships = (_patches.new_pathfinding_all ? VPF_NPF : VPF_OPF);
+ }
}
return InitializeWindowsAndCaches();