summaryrefslogtreecommitdiff
path: root/src/openttd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/openttd.cpp')
-rw-r--r--src/openttd.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/openttd.cpp b/src/openttd.cpp
index dbc1ebaeb..95551dbb5 100644
--- a/src/openttd.cpp
+++ b/src/openttd.cpp
@@ -2516,6 +2516,15 @@ bool AfterLoadGame()
}
}
}
+
+ /* Give owners to waypoints, based on rail tracks it is sitting on.
+ * If none is available, specify OWNER_NONE */
+ Waypoint *wp;
+ Owner owner;
+ FOR_ALL_WAYPOINTS(wp) {
+ owner = GetTileOwner(wp->xy);
+ wp->owner = IsValidPlayerID(owner) ? owner : OWNER_NONE;
+ }
}
GamelogPrintDebug(1);