diff 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
line wrap: on
line diff
--- a/rogue3/save.c	Thu Aug 08 14:30:12 2013 -0700
+++ b/rogue3/save.c	Fri Aug 09 09:34:07 2013 -0700
@@ -234,6 +234,12 @@
 	return FALSE;
     }
 
+    if (pstats.s_hpt <= 0) {
+        endwin();
+        printf("This character is already dead.\n");
+        return FALSE;
+    }
+
     environ = envp;
     strcpy(file_name, file);
     setup();