Fix: [NewGRF] The result of Action123 evaluation affected rerandomisation in a weird corner case. (#14139)

Rerandomisation does not care about the Resolve result.
But we skipped it, in case of 'invalid SpriteGroup reference'.
This commit is contained in:
frosch
2025-04-28 23:24:42 +02:00
committed by GitHub
parent b281c5616e
commit 30b1eb6e5f
6 changed files with 20 additions and 11 deletions

View File

@@ -675,8 +675,7 @@ static void DoTriggerHouseRandomisation(TileIndex tile, HouseRandomTrigger trigg
SetHouseRandomTriggers(tile, waiting_random_triggers); // store now for var 5F
object.SetWaitingRandomTriggers(waiting_random_triggers);
const SpriteGroup *group = object.Resolve();
if (group == nullptr) return;
object.ResolveRerandomisation();
/* Store remaining triggers. */
waiting_random_triggers.Reset(object.GetUsedRandomTriggers());