mirror of https://github.com/OpenTTD/OpenTTD
Codechange: Use Map::Iterate() on CreateDesertOrRainForest routine
parent
913d6eceb0
commit
005c47c322
|
@ -950,8 +950,8 @@ static void CreateDesertOrRainForest(uint desert_tropic_line)
|
|||
{
|
||||
uint update_freq = Map::Size() / 4;
|
||||
|
||||
for (TileIndex tile = 0; tile != Map::Size(); ++tile) {
|
||||
if ((tile.base() % update_freq) == 0) IncreaseGeneratingWorldProgress(GWP_LANDSCAPE);
|
||||
for (const auto tile : Map::Iterate()) {
|
||||
if ((tile % update_freq) == 0) IncreaseGeneratingWorldProgress(GWP_LANDSCAPE);
|
||||
|
||||
if (!IsValidTile(tile)) continue;
|
||||
|
||||
|
@ -970,8 +970,8 @@ static void CreateDesertOrRainForest(uint desert_tropic_line)
|
|||
RunTileLoop();
|
||||
}
|
||||
|
||||
for (TileIndex tile = 0; tile != Map::Size(); ++tile) {
|
||||
if ((tile.base() % update_freq) == 0) IncreaseGeneratingWorldProgress(GWP_LANDSCAPE);
|
||||
for (const auto tile : Map::Iterate()) {
|
||||
if ((tile % update_freq) == 0) IncreaseGeneratingWorldProgress(GWP_LANDSCAPE);
|
||||
|
||||
if (!IsValidTile(tile)) continue;
|
||||
|
||||
|
|
Loading…
Reference in New Issue