summaryrefslogtreecommitdiff
path: root/src/saveload/waypoint_sl.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-07-16 22:58:06 +0000
committerrubidium <rubidium@openttd.org>2009-07-16 22:58:06 +0000
commita007d609afec5e40d2aef362aca90d3a53580c8d (patch)
treebde43f387f72535de5319609840a89fc707e0884 /src/saveload/waypoint_sl.cpp
parentf16314d0cc8a7b79ac48d4835f55a0968ccb77e6 (diff)
downloadopenttd-a007d609afec5e40d2aef362aca90d3a53580c8d.tar.xz
(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.
Diffstat (limited to 'src/saveload/waypoint_sl.cpp')
-rw-r--r--src/saveload/waypoint_sl.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/saveload/waypoint_sl.cpp b/src/saveload/waypoint_sl.cpp
index b6b27a337..3298e56a9 100644
--- a/src/saveload/waypoint_sl.cpp
+++ b/src/saveload/waypoint_sl.cpp
@@ -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;
}
}