Fix: Don't lower tree density if spreading is not enabled (#8413)
This commit is contained in:
@@ -681,7 +681,7 @@ static void TileLoop_Trees(TileIndex tile)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 1: // add a tree
|
case 1: // add a tree
|
||||||
if (GetTreeCount(tile) < 4) {
|
if (GetTreeCount(tile) < 4 && CanPlantExtraTrees(tile)) {
|
||||||
AddTreeCount(tile, 1);
|
AddTreeCount(tile, 1);
|
||||||
SetTreeGrowth(tile, 0);
|
SetTreeGrowth(tile, 0);
|
||||||
break;
|
break;
|
||||||
@@ -713,13 +713,13 @@ static void TileLoop_Trees(TileIndex tile)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 6: // final stage of tree destruction
|
case 6: // final stage of tree destruction
|
||||||
if (GetTreeCount(tile) > 1) {
|
if (!CanPlantExtraTrees(tile)) {
|
||||||
|
/* if trees can't spread just plant a new one to prevent deforestation */
|
||||||
|
SetTreeGrowth(tile, 0);
|
||||||
|
} else if (GetTreeCount(tile) > 1) {
|
||||||
/* more than one tree, delete it */
|
/* more than one tree, delete it */
|
||||||
AddTreeCount(tile, -1);
|
AddTreeCount(tile, -1);
|
||||||
SetTreeGrowth(tile, 3);
|
SetTreeGrowth(tile, 3);
|
||||||
} else if (!CanPlantExtraTrees(tile)) {
|
|
||||||
/* if trees can't spread just plant a new one to prevent deforestation */
|
|
||||||
SetTreeGrowth(tile, 0);
|
|
||||||
} else {
|
} else {
|
||||||
/* just one tree, change type into MP_CLEAR */
|
/* just one tree, change type into MP_CLEAR */
|
||||||
switch (GetTreeGround(tile)) {
|
switch (GetTreeGround(tile)) {
|
||||||
|
Reference in New Issue
Block a user