(svn r14141) -Fix (r14135): Savegame conversion could assign a recently removed waypoint (grey sign) to a wrong owner.

This commit is contained in:
frosch
2008-08-23 16:16:37 +00:00
parent 8886f5b4c3
commit 40796e9f19

View File

@@ -2522,7 +2522,7 @@ bool AfterLoadGame()
Waypoint *wp; Waypoint *wp;
Owner owner; Owner owner;
FOR_ALL_WAYPOINTS(wp) { 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; wp->owner = IsValidPlayerID(owner) ? owner : OWNER_NONE;
} }
} }