comparison rogue3/save.c @ 85:d852b8f088c5

Refuse to restore if the character is dead. This prevents recovering from death by killing the game between death and exit, producing an automatic save.
author John "Elwin" Edwards
date Fri, 09 Aug 2013 09:34:07 -0700
parents 2dcd75e6a736
children 3d4252fa2ed3
comparison
equal deleted inserted replaced
84:a0d4caead33b 85:d852b8f088c5
232 endwin(); 232 endwin();
233 printf("Cannot unlink file\n"); 233 printf("Cannot unlink file\n");
234 return FALSE; 234 return FALSE;
235 } 235 }
236 236
237 if (pstats.s_hpt <= 0) {
238 endwin();
239 printf("This character is already dead.\n");
240 return FALSE;
241 }
242
237 environ = envp; 243 environ = envp;
238 strcpy(file_name, file); 244 strcpy(file_name, file);
239 setup(); 245 setup();
240 clearok(curscr, TRUE); 246 clearok(curscr, TRUE);
241 touchwin(cw); 247 touchwin(cw);