summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2008-08-23 16:16:37 +0000
committerfrosch <frosch@openttd.org>2008-08-23 16:16:37 +0000
commit4e0faffc7281711d7318e1ec96685c8255c09f3f (patch)
treede2049e21dbeee0c44ad61f8ab9f88af0c38605c /src
parent63f4726e0688903db11dc2c5757aa11b1b95d57a (diff)
downloadopenttd-4e0faffc7281711d7318e1ec96685c8255c09f3f.tar.xz
(svn r14141) -Fix (r14135): Savegame conversion could assign a recently removed waypoint (grey sign) to a wrong owner.
Diffstat (limited to 'src')
-rw-r--r--src/openttd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/openttd.cpp b/src/openttd.cpp
index 95551dbb5..afd5ceb6c 100644
--- a/src/openttd.cpp
+++ b/src/openttd.cpp
@@ -2522,7 +2522,7 @@ bool AfterLoadGame()
Waypoint *wp;
Owner owner;
FOR_ALL_WAYPOINTS(wp) {
- owner = GetTileOwner(wp->xy);
+ owner = (IsTileType(wp->xy, MP_RAILWAY) && IsRailWaypoint(wp->xy) ? GetTileOwner(wp->xy) : OWNER_NONE);
wp->owner = IsValidPlayerID(owner) ? owner : OWNER_NONE;
}
}