Import reduced tree patch

http://www.tt-forums.net/viewtopic.php?p=890778#p890778

Update to recent trunk, use extended savegame framework.
Add setting help text, tweak setting name.
Pre-calculate tree growth probabilities.
This commit is contained in:
patch-import
2016-01-25 23:27:08 +00:00
committed by Jonathan G Rennison
parent 9826c2481e
commit c5f9d8b6de
5 changed files with 33 additions and 1 deletions

View File

@@ -732,7 +732,16 @@ static void TileLoop_Trees(TileIndex tile)
}
}
if (GetTreeCounter(tile) < 15) {
AddTreeCounter(tile, 1);
if (_settings_game.construction.tree_growth_rate > 0) {
/* slow, very slow, extremely slow */
uint16 grow_slowing_values[3] = { 0x10000 / 5, 0x10000 / 20, 0x10000 / 120 };
if (GB(Random(), 0, 16) < grow_slowing_values[_settings_game.construction.tree_growth_rate - 1]) {
AddTreeCounter(tile, 1);
}
} else {
AddTreeCounter(tile, 1);
}
return;
}
SetTreeCounter(tile, 0);