(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 63f4726e06
commit 4e0faffc72

View File

@ -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;
}
}