Don't mark tile dirty when setting animation frame to its current value

See: https://github.com/OpenTTD/OpenTTD/issues/10192
This commit is contained in:
Jonathan G Rennison
2022-11-24 01:34:18 +00:00
parent a42557fed7
commit 96a6a565a5
7 changed files with 29 additions and 17 deletions

View File

@@ -183,16 +183,18 @@ void BaseStation::PostDestructor(size_t index)
InvalidateWindowData(WC_SELECT_STATION, 0, 0);
}
void BaseStation::SetRoadStopTileData(TileIndex tile, byte data, byte offset)
bool BaseStation::SetRoadStopTileData(TileIndex tile, byte data, byte offset)
{
for (size_t i = 0; i < this->custom_road_stop_tiles.size(); i++) {
if (this->custom_road_stop_tiles[i] == tile) {
if (GB(this->custom_road_stop_data[i], offset, 8) == data) return false;
SB(this->custom_road_stop_data[i], offset, 8, data);
return;
return true;
}
}
this->custom_road_stop_tiles.push_back(tile);
this->custom_road_stop_data.push_back(((uint)data) << offset);
return data != 0;
}
void BaseStation::RemoveRoadStopTileData(TileIndex tile)