forked from mirror/OpenTTD
Change: Increase house type limit from 512 to 4096. (#12288)
This moves HouseType from m4+m3[6] to m8 making it 'easier' to access.
This commit is contained in:
@@ -1539,6 +1539,17 @@ bool AfterLoadGame()
|
||||
}
|
||||
}
|
||||
|
||||
if (IsSavegameVersionBefore(SLV_INCREASE_HOUSE_LIMIT)) {
|
||||
for (auto t : Map::Iterate()) {
|
||||
if (IsTileType(t, MP_HOUSE)) {
|
||||
/* House type is moved from m4 + m3[6] to m8. */
|
||||
SetHouseType(t, t.m4() | (GB(t.m3(), 6, 1) << 8));
|
||||
t.m4() = 0;
|
||||
ClrBit(t.m3(), 6);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Check and update house and town values */
|
||||
UpdateHousesAndTowns();
|
||||
|
||||
|
Reference in New Issue
Block a user