fix ExitTown autosave could be used to cheat

This commit is contained in:
2025-05-16 13:23:33 -05:00
parent 8ee2f0230b
commit 4b04a2d311
2 changed files with 5 additions and 4 deletions

View File

@@ -732,6 +732,7 @@ void handle_move(location destination, bool& did_something, bool& need_redraw, b
}
bool town_move_done = false;
bool left_town = false;
if(overall_mode == MODE_COMBAT) {
if(pc_combat_move(destination)) {
center = univ.current_pc().combat_pos;
@@ -753,6 +754,7 @@ void handle_move(location destination, bool& did_something, bool& need_redraw, b
update_explored(destination);
if(loc_off_act_area(univ.party.town_loc)) {
destination = end_town_mode(0,destination);
left_town = true;
town_move_done = true;
flushingInput = true;
}
@@ -793,6 +795,9 @@ void handle_move(location destination, bool& did_something, bool& need_redraw, b
}
}
}
if(left_town){
try_auto_save("ExitTown");
}
}
}

View File

@@ -640,10 +640,6 @@ location end_town_mode(bool switching_level,location destination, bool debug_lea
univ.party.town_num = 200; // should be harmless...
if(!switching_level){
try_auto_save("ExitTown");
}
return to_return;
}