From: Pasi Kallinen Date: Thu, 26 Aug 2021 15:46:22 +0000 (+0300) Subject: Fix ball bypass sanity complaint X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2aaee76c5c17ebc4f7db522346e2a8708a21dfc4;p=nethack Fix ball bypass sanity complaint Be punished, get swallowed, drop the ball inside the monster via the 'D' drop, kill the swallower - this issued a sanity check complaint about the ball bypass flag. In this case, the ball was "floating", not on any object chain, when dropped inside the monster, so clear_bypasses didn't clear the flag. --- diff --git a/src/worn.c b/src/worn.c index 1a04fb066..0cd4fab21 100644 --- a/src/worn.c +++ b/src/worn.c @@ -839,6 +839,11 @@ clear_bypasses(void) /* no MCORPSENM(mtmp)==PM_LONG_WORM check here; long worms can't be just created by polymorph and migrating at the same time */ } + + /* ball can be "floating", not on any chain */ + if (uball) + uball->bypass = 0; + /* g.billobjs and g.mydogs chains don't matter here */ g.context.bypasses = FALSE; }