Viewport: Replace viewport mark dirty if zoom level below with flags param
Fix missing flags for tracerestrict and effect vehicles
This commit is contained in:
@@ -446,7 +446,7 @@ CommandCost CmdPlantTree(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
|
||||
|
||||
if (flags & DC_EXEC) {
|
||||
AddTreeCount(tile, 1);
|
||||
MarkTileDirtyByTile(tile, ZOOM_LVL_DRAW_MAP);
|
||||
MarkTileDirtyByTile(tile, VMDF_NOT_MAP_MODE);
|
||||
if (c != nullptr) c->tree_limit -= 1 << 16;
|
||||
}
|
||||
/* 2x as expensive to add more trees to an existing tile */
|
||||
@@ -523,7 +523,7 @@ CommandCost CmdPlantTree(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
|
||||
|
||||
/* Plant full grown trees in scenario editor */
|
||||
PlantTreesOnTile(tile, treetype, 0, _game_mode == GM_EDITOR ? 3 : 0);
|
||||
MarkTileDirtyByTile(tile, ZOOM_LVL_DRAW_MAP);
|
||||
MarkTileDirtyByTile(tile, VMDF_NOT_MAP_MODE);
|
||||
if (c != nullptr) c->tree_limit -= 1 << 16;
|
||||
|
||||
/* When planting rainforest-trees, set tropiczone to rainforest in editor. */
|
||||
@@ -677,7 +677,7 @@ static void TileLoopTreesDesert(TileIndex tile)
|
||||
case TROPICZONE_DESERT:
|
||||
if (GetTreeGround(tile) != TREE_GROUND_SNOW_DESERT) {
|
||||
SetTreeGroundDensity(tile, TREE_GROUND_SNOW_DESERT, 3);
|
||||
MarkTileDirtyByTile(tile, ZOOM_LVL_DRAW_MAP);
|
||||
MarkTileDirtyByTile(tile, VMDF_NOT_MAP_MODE);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -726,7 +726,7 @@ static void TileLoopTreesAlps(TileIndex tile)
|
||||
return;
|
||||
}
|
||||
}
|
||||
MarkTileDirtyByTile(tile, ZOOM_LVL_DRAW_MAP);
|
||||
MarkTileDirtyByTile(tile, VMDF_NOT_MAP_MODE);
|
||||
}
|
||||
|
||||
static bool CanPlantExtraTrees(TileIndex tile)
|
||||
@@ -756,7 +756,7 @@ static void TileLoop_Trees(TileIndex tile)
|
||||
uint density = GetTreeDensity(tile);
|
||||
if (density < 3) {
|
||||
SetTreeGroundDensity(tile, TREE_GROUND_GRASS, density + 1);
|
||||
MarkTileDirtyByTile(tile, ZOOM_LVL_DRAW_MAP);
|
||||
MarkTileDirtyByTile(tile, VMDF_NOT_MAP_MODE);
|
||||
}
|
||||
}
|
||||
if (GetTreeCounter(tile) < 15) {
|
||||
@@ -856,7 +856,7 @@ static void TileLoop_Trees(TileIndex tile)
|
||||
break;
|
||||
}
|
||||
|
||||
MarkTileDirtyByTile(tile, ZOOM_LVL_DRAW_MAP);
|
||||
MarkTileDirtyByTile(tile, VMDF_NOT_MAP_MODE);
|
||||
}
|
||||
|
||||
void OnTick_Trees()
|
||||
|
Reference in New Issue
Block a user