From: PatR Date: Mon, 16 Mar 2020 22:40:52 +0000 (-0700) Subject: fix #K608 - ball and chain distance warning X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8ccc9773aa9f2e51981e0dda8cc3f8e982b8b9bb;p=nethack fix #K608 - ball and chain distance warning This fixes the reported situation of recoiling from a throw while levitating and carrying the ball not bringing the chain but it might introduce other problems. If it does, drag_ball() would be the place to fix that, not hurtle_step(). Separate bug (not fixed): throwing while the ball is on the floor ought to let you recoil to as far as the chain will reach but it just yields "you feel a tug from the ball" and you don't recoil at all. --- diff --git a/doc/fixes37.0 b/doc/fixes37.0 index 56685a76e..46d09741e 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.128 $ $NHDT-Date: 1583926845 2020/03/11 11:40:45 $ +$NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.135 $ $NHDT-Date: 1584398443 2020/03/16 22:40:43 $ General Fixes and Modified Features ----------------------------------- @@ -80,6 +80,8 @@ fix vault guard occasionally encasing monsters in stone tone down scare monster by excluding humans and uniques lock the castle chest revamp amnesia to forget skills instead of objects or maps +when Punished and carrying the iron ball and levitating, hurtling in the + opposite direction of a thrown object didn't bring along the chain Fixes to 3.7.0-x Problems that Were Exposed Via git Repository diff --git a/src/dothrow.c b/src/dothrow.c index 3af418ecd..50e2f07bd 100644 --- a/src/dothrow.c +++ b/src/dothrow.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 dothrow.c $NHDT-Date: 1583073990 2020/03/01 14:46:30 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.183 $ */ +/* NetHack 3.6 dothrow.c $NHDT-Date: 1584398443 2020/03/16 22:40:43 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.184 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2013. */ /* NetHack may be freely redistributed. See license for details. */ @@ -714,8 +714,9 @@ int x, y; } } - /* Caller has already determined that dragging the ball is allowed */ - if (Punished && uball->where == OBJ_FLOOR) { + /* caller has already determined that dragging the ball is allowed; + if ball is carried we might still need to drag the chain */ + if (Punished) { int bc_control; xchar ballx, bally, chainx, chainy; boolean cause_delay;