File tree Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ boolean cant_int = 0;
6565boolean did_int = 0 ;
6666boolean score_only ;
6767boolean have_fun ;
68+ boolean save_cheat ;
6869boolean init_curses = 0 ;
6970boolean save_is_interactive = 1 ;
7071boolean ask_quit = 1 ;
@@ -270,6 +271,9 @@ do_args(argc, argv)
270271 case 'f' :
271272 have_fun = 1 ;
272273 break ;
274+ case 'c' :
275+ save_cheat = 1 ;
276+ break ;
273277 }
274278 }
275279 } else {
Original file line number Diff line number Diff line change @@ -757,6 +757,7 @@ extern boolean r_teleport;
757757extern boolean save_is_interactive ;
758758extern boolean score_only ;
759759extern boolean have_fun ;
760+ extern boolean save_cheat ;
760761extern boolean see_invisible ;
761762extern boolean sustain_strength ;
762763extern boolean trap_door ;
Original file line number Diff line number Diff line change @@ -185,7 +185,7 @@ restore(fname)
185185 read_pack (& level_monsters , fp , 0 );
186186 read_pack (& level_objects , fp , 0 );
187187 r_read (fp , (char * ) & saved_file_id , sizeof (saved_file_id ));
188- if (new_file_id != saved_file_id ) {
188+ if ( (! save_cheat ) && ( new_file_id != saved_file_id ) ) {
189189 clean_up ("sorry, saved game is not in the same file" );
190190 }
191191 rw_dungeon (fp , 0 );
@@ -221,7 +221,7 @@ restore(fname)
221221
222222 md_gfmt (fname , & mod_time ); /* get file modification time */
223223
224- if (has_been_touched (& saved_time , & mod_time )) {
224+ if ( (! save_cheat ) && ( has_been_touched (& saved_time , & mod_time )) ) {
225225 clear ();
226226 clean_up ("sorry, file has been touched" );
227227 }
You can’t perform that action at this time.
0 commit comments