fix ExitTown autosave could be used to cheat
This commit is contained in:
@@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user