1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-04-08 19:56:45 +00:00

ads-game:: no more crash when trying to restart while in spacetime

This commit is contained in:
Zeno Rogue 2022-10-15 14:26:42 +02:00
parent c6dad6ee99
commit 1d41b80b2a
2 changed files with 14 additions and 0 deletions

@ -70,6 +70,13 @@ void set_default_keys() {
void restart() {
if(in_spacetime()) {
switch_spacetime();
restart();
switch_spacetime();
return;
}
hybrid::in_actual([&] {
vctr = new_vctr = starting_point;
vctrV = new_vctrV = current = ads_matrix(Id, 0);

@ -646,6 +646,13 @@ void view_ds_game() {
void ds_restart() {
if(in_spacetime()) {
switch_spacetime();
ds_restart();
switch_spacetime();
return;
}
main_rock = nullptr;
if(true) {