mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r19769) -Fix [FS#3820]: MV_VOID tiles shall have no tropic zone.
This commit is contained in:
parent
173b56b895
commit
5b77a63ecf
|
@ -831,6 +831,8 @@ static void CreateDesertOrRainForest()
|
|||
for (TileIndex tile = 0; tile != MapSize(); ++tile) {
|
||||
if ((tile % update_freq) == 0) IncreaseGeneratingWorldProgress(GWP_LANDSCAPE);
|
||||
|
||||
if (!IsValidTile(tile)) continue;
|
||||
|
||||
for (data = _make_desert_or_rainforest_data;
|
||||
data != endof(_make_desert_or_rainforest_data); ++data) {
|
||||
TileIndex t = AddTileIndexDiffCWrap(tile, *data);
|
||||
|
@ -849,6 +851,8 @@ static void CreateDesertOrRainForest()
|
|||
for (TileIndex tile = 0; tile != MapSize(); ++tile) {
|
||||
if ((tile % update_freq) == 0) IncreaseGeneratingWorldProgress(GWP_LANDSCAPE);
|
||||
|
||||
if (!IsValidTile(tile)) continue;
|
||||
|
||||
for (data = _make_desert_or_rainforest_data;
|
||||
data != endof(_make_desert_or_rainforest_data); ++data) {
|
||||
TileIndex t = AddTileIndexDiffCWrap(tile, *data);
|
||||
|
|
|
@ -2101,6 +2101,13 @@ bool AfterLoadGame()
|
|||
}
|
||||
}
|
||||
|
||||
if (CheckSavegameVersion(141)) {
|
||||
for (TileIndex t = 0; t < map_size; t++) {
|
||||
/* Reset tropic zone for VOID tiles, they shall not have any. */
|
||||
if (IsTileType(t, MP_VOID)) SetTropicZone(t, TROPICZONE_NORMAL);
|
||||
}
|
||||
}
|
||||
|
||||
/* Road stops is 'only' updating some caches */
|
||||
AfterLoadRoadStops();
|
||||
AfterLoadLabelMaps();
|
||||
|
|
|
@ -186,6 +186,7 @@ static inline bool IsTileOwner(TileIndex tile, Owner owner)
|
|||
static inline void SetTropicZone(TileIndex tile, TropicZone type)
|
||||
{
|
||||
assert(tile < MapSize());
|
||||
assert(!IsTileType(tile, MP_VOID) || type == TROPICZONE_NORMAL);
|
||||
SB(_m[tile].m6, 0, 2, type);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue