mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-24 08:12:53 +01:00
Use switch for Ride::UpdateAll
This commit is contained in:
@@ -1984,9 +1984,22 @@ void Ride::UpdateAll()
|
||||
// Remove all rides if scenario editor
|
||||
if (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR)
|
||||
{
|
||||
if (EnumValue(gS6Info.editor_step) <= EnumValue(EditorStep::InventionsListSetUp))
|
||||
for (auto& ride : GetRideManager())
|
||||
ride.Delete();
|
||||
switch (gS6Info.editor_step)
|
||||
{
|
||||
case EditorStep::ObjectSelection:
|
||||
case EditorStep::LandscapeEditor:
|
||||
case EditorStep::InventionsListSetUp:
|
||||
for (auto& ride : GetRideManager())
|
||||
ride.Delete();
|
||||
break;
|
||||
case EditorStep::OptionsSelection:
|
||||
case EditorStep::ObjectiveSelection:
|
||||
case EditorStep::SaveScenario:
|
||||
case EditorStep::RollercoasterDesigner:
|
||||
case EditorStep::DesignsManager:
|
||||
case EditorStep::Invalid:
|
||||
break;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user