1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-19 04:29:09 +00:00

Codechange: Don't mark tiles dirty when deleting from animated tile list.

The callers of DeleteAnimatedTile already know if the tile needs refreshing, so it is redundant for DeleteAnimatedTile to do so.

Loosely backported from JGRPP.
This commit is contained in:
2024-08-01 20:15:56 +01:00
parent 8ba4f8c872
commit d9f73dfd6d
2 changed files with 3 additions and 3 deletions

View File

@@ -28,7 +28,6 @@ void DeleteAnimatedTile(TileIndex tile)
if (to_remove != _animated_tiles.end()) {
/* The order of the remaining elements must stay the same, otherwise the animation loop may miss a tile. */
_animated_tiles.erase(to_remove);
MarkTileDirtyByTile(tile);
}
}

View File

@@ -603,8 +603,8 @@ static void AnimatePowerPlantSparks(TileIndex tile)
DeleteAnimatedTile(tile);
} else {
SetAnimationFrame(tile, m + 1);
MarkTileDirtyByTile(tile);
}
MarkTileDirtyByTile(tile);
}
static void AnimateToyFactory(TileIndex tile)
@@ -649,8 +649,8 @@ static void AnimateOilWell(TileIndex tile, IndustryGfx gfx)
} else {
SetAnimationFrame(tile, m);
SetIndustryGfx(tile, gfx);
MarkTileDirtyByTile(tile);
}
MarkTileDirtyByTile(tile);
}
static void AnimateMineTower(TileIndex tile)
@@ -906,6 +906,7 @@ static void TileLoop_Industry(TileIndex tile)
SetIndustryCompleted(tile);
SetIndustryConstructionStage(tile, 3);
DeleteAnimatedTile(tile);
MarkTileDirtyByTile(tile);
}
break;