mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-20 21:43:06 +01:00
Only modify gLastEntranceStyle for the callee of the game action
This commit is contained in:
@@ -4496,6 +4496,11 @@ static void WindowRideColourDropdown(rct_window* w, rct_widgetindex widgetIndex,
|
||||
{
|
||||
auto rideSetAppearanceAction = RideSetAppearanceAction(
|
||||
rideId, RideSetAppearanceType::EntranceStyle, ddIndex, 0);
|
||||
rideSetAppearanceAction.SetCallback([ddIndex](const GameAction*, const GameActions::Result* res) {
|
||||
if (res->Error != GameActions::Status::Ok)
|
||||
return;
|
||||
gLastEntranceStyle = ddIndex;
|
||||
});
|
||||
GameActions::Execute(&rideSetAppearanceAction);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -135,7 +135,6 @@ GameActions::Result RideSetAppearanceAction::Execute() const
|
||||
break;
|
||||
case RideSetAppearanceType::EntranceStyle:
|
||||
ride->entrance_style = _value;
|
||||
gLastEntranceStyle = _value;
|
||||
gfx_invalidate_screen();
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user