home · contact · privacy
Don't abort replay on last turn.
authorChristian Heller <c.heller@plomlompom.de>
Mon, 3 Jun 2013 17:10:47 +0000 (19:10 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Mon, 3 Jun 2013 17:10:47 +0000 (19:10 +0200)
roguelike.c

index d7347261125487598cef36082a5f2c4d2c09c060..5d4207175f9031e568bb05d0bf90ac862d1fa62a 100644 (file)
@@ -347,14 +347,15 @@ int main (int argc, char *argv[]) {
   int key;
   unsigned char quit_called;
   if (0 == world.interactive) {
+    unsigned char still_reading_file = 1;
     int action;
     while (1) {
       draw_all_windows (&win_meta);
       key = getch();
-      if (key == get_action_key(world.keybindings, "wait / next turn") ) {
+      if (1 == still_reading_file && key == get_action_key(world.keybindings, "wait / next turn") ) {
         action = getc(file);
         if (EOF == action)
-          break;
+          still_reading_file = 0;
         else if (0 == action)
           player_wait (&world);
         else if ('s' == action)