forked from mirror/OpenTTD
(svn r16854) -Fix (r2046): savegames from before this version would get the town id as their 'index' (#<num). For stations with custom names that custom name would be dropped and the lowest 6 bits of the StringID would be used for the 'index'. In other words, it resulted in a mess.
This commit is contained in:
@@ -45,8 +45,8 @@ void FixOldWaypoints()
|
||||
FOR_ALL_WAYPOINTS(wp) {
|
||||
wp->town_index = ClosestTownFromTile(wp->xy, UINT_MAX)->index;
|
||||
wp->town_cn = 0;
|
||||
if (wp->string_id & 0xC000) {
|
||||
wp->town_cn = wp->string_id & 0x3F;
|
||||
if ((wp->string_id & 0xC000) == 0xC000) {
|
||||
wp->town_cn = (wp->string_id >> 8) & 0x3F;
|
||||
wp->string_id = STR_NULL;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user