Fix #10186: Placing multiple saved rides ignores design name (#13120)

This commit is contained in:
Tulio Leao authored and GitHub committed 2020-10-07 12:45:19 -03:00
1 parent 076544f490
commit a1b058f648
2 files changed
+8 -3

No files matched your search

+1
View File
@@ -9,6 +9,7 @@
- Fix: [#6086] Cannot install existing track design with another name.
- Fix: [#8015] RCT2 files are not found when put into the OpenRCT2 folder.
- Fix: [#8957] Error title missing when building with insufficient funds
- Fix: [#10186] Placing multiple saved rides ignores design name (original bug).
- Fix: [#13021] Mowed grass and weeds don't show up in extra zoom levels.
- Fix: [#13029] Not all Junior Roller Coaster pieces are shown when "Show all track pieces" cheat is enabled.
- Fix: [#13044] Rides in RCT1 saves all have "0 customers per hour".
+7 -3
View File
@@ -221,9 +221,13 @@ GameActionResult::Ptr TrackDesignAction::Execute() const
ride->vehicle_colours[i].Ternary = _td.vehicle_additional_colour[i];
}
auto gameAction = RideSetNameAction(ride->id, _td.name);
gameAction.SetFlags(GetFlags());
GameActions::ExecuteNested(&gameAction);
for (int32_t count = 1; count == 1 || r->Error != GA_ERROR::OK; ++count)
{
auto name = count == 1 ? _td.name : (_td.name + " " + std::to_string(count));
auto gameAction = RideSetNameAction(ride->id, name);
gameAction.SetFlags(GetFlags());
r = GameActions::ExecuteNested(&gameAction);
}
res->Cost = cost;
res->rideIndex = ride->id;
return res;