summaryrefslogtreecommitdiff
path: root/src/saveload/afterload.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-07-10 18:30:02 +0000
committerrubidium <rubidium@openttd.org>2009-07-10 18:30:02 +0000
commit3b8d0621a2621531e9be38cf3247e015558f1971 (patch)
treefc75fa25c77168ae6d138cadd380b5d8802c800a /src/saveload/afterload.cpp
parentc654dedb28b9f3f15eda261545daa333534a7177 (diff)
downloadopenttd-3b8d0621a2621531e9be38cf3247e015558f1971.tar.xz
(svn r16785) -Codechange: make ships going to buoys use OT_GOTO_WAYPOINT too
Diffstat (limited to 'src/saveload/afterload.cpp')
-rw-r--r--src/saveload/afterload.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp
index c529a77ae..407972f7b 100644
--- a/src/saveload/afterload.cpp
+++ b/src/saveload/afterload.cpp
@@ -1944,6 +1944,14 @@ bool AfterLoadGame()
}
s->cargo_type = CT_INVALID;
}
+
+ Order *o;
+ FOR_ALL_ORDERS(o) {
+ /* Buoys are now go to waypoint orders */
+ if (!o->IsType(OT_GOTO_STATION) || !Station::Get(o->GetDestination())->IsBuoy()) continue;
+
+ o->MakeGoToWaypoint(o->GetDestination());
+ }
}
AfterLoadLabelMaps();