diff --git a/src/ball.c b/src/ball.c index c078f5ed3..3cd8e0eae 100644 --- a/src/ball.c +++ b/src/ball.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 ball.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 ball.c $NHDT-Date: 1430365884 2015/04/30 03:51:24 $ $NHDT-Branch: master $:$NHDT-Revision: 1.22 $ */ /* NetHack 3.5 ball.c $Date: 2011/08/30 22:13:26 $ $Revision: 1.17 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -102,7 +102,7 @@ ballfall() * It is assumed that when this is called, the ball and chain are NOT * attached to the object list. * - * Should not be called while swallowed. + * Should not be called while swallowed except on waterlevel. */ void placebc() @@ -112,14 +112,12 @@ placebc() return; } - obj_extract_self(uchain); (void) flooreffects(uchain, u.ux, u.uy, ""); /* chain might rust */ if (carried(uball)) /* the ball is carried */ u.bc_order = BCPOS_DIFFER; else { /* ball might rust -- already checked when carried */ - obj_extract_self(uball); (void) flooreffects(uball, u.ux, u.uy, ""); place_object(uball, u.ux, u.uy); u.bc_order = BCPOS_CHAIN; @@ -135,7 +133,19 @@ placebc() void unplacebc() { - if (u.uswallow) return; /* ball&chain not placed while swallowed */ + if (u.uswallow) { + if (Is_waterlevel(&u.uz)) { + /* we need to proceed with the removal from the floor + * so that movebubbles() processing will disregard it as + * intended. Ignore all the vision stuff. + */ + if (!carried(uball)) + obj_extract_self(uball); + obj_extract_self(uchain); + } + /* ball&chain not unplaced while swallowed */ + return; + } if (!carried(uball)) { obj_extract_self(uball); diff --git a/src/display.c b/src/display.c index f2e18df61..3cd92f916 100644 --- a/src/display.c +++ b/src/display.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 display.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 display.c $NHDT-Date: 1430365890 2015/04/30 03:51:30 $ $NHDT-Branch: master $:$NHDT-Revision: 1.49 $ */ /* NetHack 3.5 display.c $Date: 2011/12/05 03:17:36 $ $Revision: 1.34 $ */ /* Copyright (c) Dean Luick, with acknowledgements to Kevin Darcy */ /* and Dave Cohrs, 1990. */ @@ -1363,11 +1363,16 @@ row_refresh(start,stop,y) void cls() { + static boolean in_cls = 0; + + if (in_cls) return; + in_cls = TRUE; display_nhwindow(WIN_MESSAGE, FALSE); /* flush messages */ context.botlx = 1; /* force update of botl window */ clear_nhwindow(WIN_MAP); /* clear physical screen */ clear_glyph_buffer(); /* this is sort of an extra effort, but OK */ + in_cls = FALSE; } /* diff --git a/src/mon.c b/src/mon.c index 665ca989b..287b496d0 100644 --- a/src/mon.c +++ b/src/mon.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 mon.c $NHDT-Date: 1429666918 2015/04/22 01:41:58 $ $NHDT-Branch: master $:$NHDT-Revision: 1.165 $ */ +/* NetHack 3.5 mon.c $NHDT-Date: 1430365894 2015/04/30 03:51:34 $ $NHDT-Branch: master $:$NHDT-Revision: 1.168 $ */ /* NetHack 3.5 mon.c $Date: 2012/05/16 02:15:10 $ $Revision: 1.126 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1850,7 +1850,7 @@ register struct monst *mtmp; u.uy = mtmp->my; u.uswallow = 0; u.uswldtim = 0; - if (Punished) placebc(); + if (BALL_IN_MON) placebc(); vision_full_recalc = 1; docrt(); }