From ab30c3d79d7ba7b058f5ce68663bdb561060e4d5 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Fri, 11 Oct 2019 20:11:24 +0300 Subject: [PATCH] Fix vault guard impossible ... when the guard is angry, and he's in the vault or in his corridor, you're not in the vault nor in his corridor, and the level is full so the guard cannot relocate. --- doc/fixes36.3 | 1 + src/vault.c | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index c62dfc1d1..32a45e720 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -179,6 +179,7 @@ avoid 'object lost' panic when polymorph causes loss of levitation boots or multiple movement; stop running if/when an engraving is reached fix exploding land mine moving ball or chain and causing a sanity error fix firing attached iron ball when swallowed causing a sanity error +fix vault guard impossible when he could not relocate in certain situation Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository diff --git a/src/vault.c b/src/vault.c index 6ff80fa76..00369fd61 100644 --- a/src/vault.c +++ b/src/vault.c @@ -775,9 +775,10 @@ register struct monst *grd; if (!u_in_vault && (grd_in_vault || (in_fcorridor(grd, grd->mx, grd->my) && !in_fcorridor(grd, u.ux, u.uy)))) { - (void) rloc(grd, FALSE); + (void) rloc(grd, TRUE); wallify_vault(grd); - (void) clear_fcorr(grd, TRUE); + if (!in_fcorridor(grd, grd->mx, grd->my)) + (void) clear_fcorr(grd, TRUE); goto letknow; } if (!in_fcorridor(grd, grd->mx, grd->my))