diff --git a/src/lib/commands/expl.c b/src/lib/commands/expl.c index 40c332c7..c671abd7 100644 --- a/src/lib/commands/expl.c +++ b/src/lib/commands/expl.c @@ -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(§); + return RET_FAIL; + } if (chksect.sct_type == '.') { pr("Bridge disappeared!\n"); getsect(start.sct_x, start.sct_y, &start); diff --git a/src/lib/commands/move.c b/src/lib/commands/move.c index c735ef68..8d8d185a 100644 --- a/src/lib/commands/move.c +++ b/src/lib/commands/move.c @@ -269,6 +269,13 @@ move(void) pr("%d mob left in %s\n", left, xyas(start.sct_x, start.sct_y, player->cnum)); + if (amount <= 0) { + getsect(x, y, &start); + start.sct_flags &= ~MOVE_IN_PROGRESS; + putsect(&start); + return RET_OK; + } + /* If the sector that things are going to is no longer owned by the player, and was the starting sector, try to find somewhere to dump the stuff. If nowhere