1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-26 13:44:16 +01:00

Codechange: Allow adding to animated tile list without marking dirty.

This avoids redundant tile refreshes when the caller has already marked a tile dirty, or knows it does not need refreshing.

Loosely backported from JGRPP.
This commit is contained in:
Peter Nelson
2024-08-01 21:11:35 +01:00
committed by Peter Nelson
parent 79369a886a
commit 8754846901
5 changed files with 8 additions and 8 deletions

View File

@@ -2466,7 +2466,7 @@ static inline void ClearMakeHouseTile(TileIndex tile, Town *t, uint8_t counter,
IncreaseBuildingCount(t, type);
MakeHouseTile(tile, t->index, counter, stage, type, random_bits);
if (HouseSpec::Get(type)->building_flags & BUILDING_IS_ANIMATED) AddAnimatedTile(tile);
if (HouseSpec::Get(type)->building_flags & BUILDING_IS_ANIMATED) AddAnimatedTile(tile, false);
MarkTileDirtyByTile(tile);
}