mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-24 20:54:08 +01:00
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:
@@ -1255,8 +1255,7 @@ static void DoTriggerVehicleRandomisation(Vehicle *v, VehicleRandomTrigger trigg
|
||||
v->waiting_random_triggers.Set(trigger); // store now for var 5F
|
||||
object.SetWaitingRandomTriggers(v->waiting_random_triggers);
|
||||
|
||||
const SpriteGroup *group = object.Resolve();
|
||||
if (group == nullptr) return;
|
||||
object.ResolveRerandomisation();
|
||||
|
||||
/* Store remaining triggers. */
|
||||
v->waiting_random_triggers.Reset(object.GetUsedRandomTriggers());
|
||||
|
||||
Reference in New Issue
Block a user