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.
This commit is contained in:
PatR
2020-03-16 15:40:52 -07:00
parent 15019248ae
commit 8ccc9773aa
2 changed files with 7 additions and 4 deletions

View File

@@ -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;