Merge remote-tracking branch 'upstream/1.11' into 1.11

This commit is contained in:
dP
2021-03-15 20:11:52 +03:00
327 changed files with 31198 additions and 8572 deletions

View File

@@ -166,6 +166,7 @@ static void PlaceTree(TileIndex tile, uint32 r)
if (tree != TREE_INVALID) {
PlantTreesOnTile(tile, tree, GB(r, 22, 2), std::min<byte>(GB(r, 16, 3), 6));
MarkTileDirtyByTile(tile);
/* Rerandomize ground, if neither snow nor shore */
TreeGround ground = GetTreeGround(tile);
@@ -636,10 +637,10 @@ static void TileLoopTreesDesert(TileIndex tile)
case TROPICZONE_RAINFOREST: {
static const SoundFx forest_sounds[] = {
SND_42_LOON_BIRD,
SND_43_LION,
SND_44_MONKEYS,
SND_48_DISTANT_BIRD
SND_42_RAINFOREST_1,
SND_43_RAINFOREST_2,
SND_44_RAINFOREST_3,
SND_48_RAINFOREST_4
};
uint32 r = Random();
@@ -673,7 +674,7 @@ static void TileLoopTreesAlps(TileIndex tile)
if (GetTreeDensity(tile) == 3) {
uint32 r = Random();
if (Chance16I(1, 200, r) && _settings_client.sound.ambient) {
SndPlayTileFx((r & 0x80000000) ? SND_39_HEAVY_WIND : SND_34_WIND, tile);
SndPlayTileFx((r & 0x80000000) ? SND_39_ARCTIC_SNOW_2 : SND_34_ARCTIC_SNOW_1, tile);
}
}
return;
@@ -766,7 +767,7 @@ static void TileLoop_Trees(TileIndex tile)
break;
case 6: // final stage of tree destruction
if (!CanPlantExtraTrees(tile)) {
if (!CanPlantExtraTrees(tile)) {
/* if trees can't spread just plant a new one to prevent deforestation */
SetTreeGrowth(tile, 0);
} else if (GetTreeCount(tile) > 1) {