1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-29 15:14:33 +01:00

Change: [NewGRF] Animation-trigger 'construction stage changed' of houses and industries now also triggers at construction start. (#14089)

This commit is contained in:
frosch
2025-04-26 14:42:49 +02:00
committed by GitHub
parent 365eed533d
commit 0d9074769d
6 changed files with 29 additions and 5 deletions

View File

@@ -537,12 +537,12 @@ void AnimateNewHouseTile(TileIndex tile)
HouseAnimationBase::AnimateTile(hs, Town::GetByTile(tile), tile, hs->extra_flags.Test(HouseExtraFlag::Callback1ARandomBits));
}
void TriggerHouseAnimation_ConstructionStageChanged(TileIndex tile)
void TriggerHouseAnimation_ConstructionStageChanged(TileIndex tile, bool first_call)
{
const HouseSpec *hs = HouseSpec::Get(GetHouseType(tile));
if (hs->callback_mask.Test(HouseCallbackMask::AnimationTriggerConstructionStageChanged)) {
HouseAnimationBase::ChangeAnimationFrame(CBID_HOUSE_ANIMATION_TRIGGER_CONSTRUCTION_STAGE_CHANGED, hs, Town::GetByTile(tile), tile, 0, 0);
HouseAnimationBase::ChangeAnimationFrame(CBID_HOUSE_ANIMATION_TRIGGER_CONSTRUCTION_STAGE_CHANGED, hs, Town::GetByTile(tile), tile, 0, first_call ? 1 : 0);
}
}