]> granicus.if.org Git - nethack/commitdiff
Handle gone portal when going back in quest
authorPasi Kallinen <paxed@alt.org>
Tue, 10 Mar 2020 19:49:38 +0000 (21:49 +0200)
committerPasi Kallinen <paxed@alt.org>
Tue, 10 Mar 2020 19:49:38 +0000 (21:49 +0200)
src/do.c

index cb7480e6828cc8806ba6bb8995b8701672b97e3e..ab38386c8c4fd4b3a9d9f208f27eb713dafe335a 100644 (file)
--- a/src/do.c
+++ b/src/do.c
@@ -1507,12 +1507,11 @@ boolean at_stairs, falling, portal;
                 break;
 
         if (!ttrap) {
-            if (u.uevent.qexpelled && Is_qstart(&u.uz0)) {
-                /* we're coming back from the quest home level, after
-                   already getting expelled once. The portal back doesn't
-                   exist anymore - see expulsion(). This can only happen
-                   in wizmode.
-                 */
+            if (u.uevent.qexpelled
+                && (Is_qstart(&u.uz0) || Is_qstart(&u.uz))) {
+                /* we're coming back from or going into the quest home level,
+                   after already getting expelled once. The portal back
+                   doesn't exist anymore - see expulsion(). */
                 u_on_rndspot(0);
             } else {
                 panic("goto_level: no corresponding portal!");