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