mirror of https://github.com/OpenTTD/OpenTTD
(svn r14141) -Fix (r14135): Savegame conversion could assign a recently removed waypoint (grey sign) to a wrong owner.
parent
63f4726e06
commit
4e0faffc72
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue