# HG changeset patch # User rubidium # Date 1221751940 0 # Node ID b4bef78a1e24505e5414ec4590ab314e03a77c65 # Parent 7e1478da76c447a706139db39a236e61266cb64e (svn r14359) -Fix [FS#2311]: the ownership of roadtiles was not properly set for very old savegames (including TTD's) making it impossible to remove some pieces of road. diff -r 7e1478da76c4 -r b4bef78a1e24 src/openttd.cpp --- a/src/openttd.cpp Wed Sep 17 19:32:06 2008 +0000 +++ b/src/openttd.cpp Thu Sep 18 15:32:20 2008 +0000 @@ -1181,8 +1181,8 @@ for (TileIndex tile = 0; tile != MapSize(); tile++) { switch (GetTileType(tile)) { case MP_ROAD: - if (GB(_m[tile].m5, 4, 2) == ROAD_TILE_CROSSING && HasBit(_m[tile].m4, 7)) { - _m[tile].m4 = OWNER_TOWN; + if (GB(_m[tile].m5, 4, 2) == ROAD_TILE_CROSSING && HasBit(_m[tile].m3, 7)) { + _m[tile].m3 = OWNER_TOWN; } /* FALLTHROUGH */ @@ -1565,7 +1565,7 @@ case MP_ROAD: _m[t].m4 |= (_m[t].m2 << 4); - if (IsTileOwner(t, OWNER_TOWN)) { + if ((GB(_m[t].m5, 4, 2) == ROAD_TILE_CROSSING ? (Owner)_m[t].m3 : GetTileOwner(t)) == OWNER_TOWN) { SetTownIndex(t, CalcClosestTownFromTile(t, (uint)-1)->index); } else { SetTownIndex(t, 0);