Make 32 instead of 16 rail types possible. by using one free bit of m1 in the map array.
(cherry picked from commit b44843800880cdc186f5183301ee0f42afbb5f84) Also set non-rail type M3 bits to 0 where applicable. Change savegame versioning to SLXI format.
This commit is contained in:

committed by
Jonathan G Rennison

parent
59677d5c6f
commit
5cc56d6ad9
@@ -3213,6 +3213,19 @@ bool AfterLoadGame()
|
||||
FOR_ALL_VEHICLES(v) v->profit_lifetime = 0;
|
||||
}
|
||||
|
||||
// Before this version we didn't store the 5th bit of the tracktype here.
|
||||
// So set it to 0 just in case there was garbage in there.
|
||||
if (SlXvIsFeatureMissing(XSLFI_MORE_RAIL_TYPES)) {
|
||||
for (TileIndex t = 0; t < map_size; t++) {
|
||||
if (_m[t].type == MP_RAILWAY ||
|
||||
_m[t].type == MP_ROAD ||
|
||||
_m[t].type == MP_STATION ||
|
||||
_m[t].type == MP_TUNNELBRIDGE) {
|
||||
SB(_m[t].m1, 7, 1, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Road stops is 'only' updating some caches */
|
||||
AfterLoadRoadStops();
|
||||
AfterLoadLabelMaps();
|
||||
|
Reference in New Issue
Block a user