mirror of https://github.com/OpenTTD/OpenTTD
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.pull/12885/head
parent
8ba4f8c872
commit
d9f73dfd6d
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue