]> git.pond.sub.org Git - empserver/blobdiff - src/lib/commands/expl.c
(move, explore): Return early when interdiction destroys everything
[empserver] / src / lib / commands / expl.c
index 40c332c70ffb29512498376c5a72a810a8b95528..c671abd7a6caac7f695388f56fe63d5e9b6f31d5 100644 (file)
@@ -192,6 +192,12 @@ explore(void)
      *      Check for a multitude of problems
      */
     getsect(endsect.sct_x, endsect.sct_y, &chksect);
+    if (amount <= 0) {
+       getsect(start.sct_x, start.sct_y, &start);
+       sect.sct_flags &= ~MOVE_IN_PROGRESS;
+       putsect(&sect);
+       return RET_FAIL;
+    }
     if (chksect.sct_type == '.') {
        pr("Bridge disappeared!\n");
        getsect(start.sct_x, start.sct_y, &start);