Set game.newloc when reincarnated. Fixes a bug.
[open-adventure.git] / main.c
diff --git a/main.c b/main.c
index 0b3663940c05c75d82b28918742a752864c3067c..7e165a70040e3c8047f6eac763f65eab257b859b 100644 (file)
--- a/main.c
+++ b/main.c
@@ -501,8 +501,7 @@ static void croak(void)
                 drop(i, (i == LAMP) ? LOC_START : game.oldlc2);
             }
         }
-        game.loc = LOC_BUILDING;
-        game.oldloc = game.loc;
+        game.oldloc = game.loc = game.newloc = LOC_BUILDING;
     }
 }
 
@@ -648,8 +647,8 @@ static void playermove( int motion)
                         /* else fall through */
                     }
                     /* YAML [with OBJ] clause */
-                    if (TOTING(condarg1) ||
-                        (condtype == cond_with && AT(condarg1)))
+                    else if (TOTING(condarg1) ||
+                             (condtype == cond_with && AT(condarg1)))
                         break;
                     /* else fall through to check [not OBJ STATE] */
                 } else if (game.prop[condarg1] != condarg2)