mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-12-01 19:27:11 +03:00
fix bug with reset sim
This commit is contained in:
parent
8e949d5fa9
commit
994eb2dd73
@ -214,13 +214,16 @@ impl SandboxMode {
|
||||
if mode.menu.action("speed up sim") {
|
||||
mode.desired_speed += ADJUST_SPEED;
|
||||
}
|
||||
if !state.ui.primary.sim.is_empty() && mode.menu.action("reset sim") {
|
||||
state.ui.primary.reset_sim();
|
||||
mode.state = State::Paused;
|
||||
}
|
||||
|
||||
match mode.state {
|
||||
State::Paused => {
|
||||
if !state.ui.primary.sim.is_empty() && mode.menu.action("reset sim") {
|
||||
state.ui.primary.reset_sim();
|
||||
mode.state = State::Paused;
|
||||
mode.following = None;
|
||||
mode.route_viewer = route_viewer::RouteViewer::Inactive;
|
||||
mode.show_activity = show_activity::ShowActivity::Inactive;
|
||||
}
|
||||
if mode.menu.action("save sim state") {
|
||||
state.ui.primary.sim.save();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user