Merge branch 'NetHack-3.6'

This commit is contained in:
nhmall
2019-10-04 22:31:35 -04:00
6 changed files with 93 additions and 52 deletions

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 teleport.c $NHDT-Date: 1564771880 2019/08/02 18:51:20 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.92 $ */
/* NetHack 3.6 teleport.c $NHDT-Date: 1570227405 2019/10/04 22:16:45 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.93 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2011. */
/* NetHack may be freely redistributed. See license for details. */
@@ -302,9 +302,9 @@ boolean allow_drag;
* rock in the way), in which case it teleports the ball on its own.
*/
if (ball_active) {
if (!carried(uball) && distmin(nux, nuy, uball->ox, uball->oy) <= 2)
if (!carried(uball) && distmin(nux, nuy, uball->ox, uball->oy) <= 2) {
ball_still_in_range = TRUE; /* don't have to move the ball */
else {
} else {
/* have to move the ball */
if (!allow_drag || distmin(u.ux, u.uy, nux, nuy) > 1) {
/* we should not have dist > 1 and allow_drag at the same
@@ -341,8 +341,13 @@ boolean allow_drag;
boolean cause_delay;
if (drag_ball(nux, nuy, &bc_control, &ballx, &bally, &chainx,
&chainy, &cause_delay, allow_drag))
&chainy, &cause_delay, allow_drag)) {
move_bc(0, bc_control, ballx, bally, chainx, chainy);
} else {
/* dragging fails if hero is encumbered beyond 'burdened' */
allow_drag = FALSE; /* teleport b&c to hero's new spot */
unplacebc(); /* to match placebc() below */
}
}
}
/* must set u.ux, u.uy after drag_ball(), which may need to know