(svn r14141) -Fix (r14135): Savegame conversion could assign a recently removed waypoint (grey sign) to a wrong owner.
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user