@@ -389,13 +389,13 @@ CommandCost CmdPlantTree(TileIndex tile,
if (tree_to_plant != TREE_INVALID && !IsInsideBS(tree_to_plant, _tree_base_by_landscape[_settings_game.game_creation.landscape], _tree_count_by_landscape[_settings_game.game_creation.landscape])) return CMD_ERROR;
Company *c = (_game_mode != GM_EDITOR) ? Company::GetIfValid(_current_company) : nullptr;
int limit = (c == nullptr ? INT32_MAX : GB(c->tree_limit, 16, 16));
TileArea ta(tile, p2);
TILE_AREA_LOOP(tile, ta) {
for (TileIndex tile : ta) {
switch (GetTileType(tile)) {
case MP_TREES:
/* no more space for trees? */
if (GetTreeCount(tile) == 4) {
msg = STR_ERROR_TREE_ALREADY_HERE;
continue;