fix H2766 - jumping while punished could leave ball in wrong place

Affected both intrinsic and spell-based jumping.
hurtle_step now drags the ball.
This commit is contained in:
David Cohrs
2016-02-10 13:47:43 -08:00
parent a41382d308
commit 25130e394c
4 changed files with 21 additions and 5 deletions

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 dothrow.c $NHDT-Date: 1446975465 2015/11/08 09:37:45 $ $NHDT-Branch: master $:$NHDT-Revision: 1.113 $ */
/* NetHack 3.6 dothrow.c $NHDT-Date: 1455140444 2016/02/10 21:40:44 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.118 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
@@ -615,6 +615,17 @@ int x, y;
}
}
/* Caller has already determined that dragging the ball is allowed */
if (Punished && uball->where == OBJ_FLOOR) {
int bc_control;
xchar ballx, bally, chainx, chainy;
boolean cause_delay;
if (drag_ball(x, y, &bc_control, &ballx, &bally, &chainx,
&chainy, &cause_delay, TRUE))
move_bc(0, bc_control, ballx, bally, chainx, chainy);
}
ox = u.ux;
oy = u.uy;
u_on_newpos(x, y); /* set u.<ux,uy>, u.usteed-><mx,my>; cliparound(); */