reminder that it needs to be on in order for those to become effective
setting second or later named fruit to value beginning with two or more spaces
followed by non-space gave "singular of null?" warning
+when blocking/unblocking of levitation or flying was updated due to walking
+ onto different terrain, the relevant status condition wasn't updated
+ on the screen until some other status update happened
+if levitating hero poly'd into pass-wall creature jumped or teleported from
+ terrain that allowed levitation to terrain that didn't or vice versa,
+ blocking of levitation wasn't updated properly
Fixes to Post-3.6.1 Problems that Were Exposed Via git Repository
-/* NetHack 3.6 extern.h $NHDT-Date: 1543892214 2018/12/04 02:56:54 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.665 $ */
+/* NetHack 3.6 extern.h $NHDT-Date: 1544401264 2018/12/10 00:21:04 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.666 $ */
/* Copyright (c) Steve Creps, 1988. */
/* NetHack may be freely redistributed. See license for details. */
E void NDECL(domove);
E boolean NDECL(overexertion);
E void NDECL(invocation_message);
+E void NDECL(switch_terrain);
E boolean FDECL(pooleffects, (BOOLEAN_P));
E void FDECL(spoteffects, (BOOLEAN_P));
E char *FDECL(in_rooms, (XCHAR_P, XCHAR_P, int));
-/* NetHack 3.6 dothrow.c $NHDT-Date: 1543892215 2018/12/04 02:56:55 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.152 $ */
+/* NetHack 3.6 dothrow.c $NHDT-Date: 1544401268 2018/12/10 00:21:08 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.153 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2013. */
/* NetHack may be freely redistributed. See license for details. */
newsym(ox, oy); /* update old position */
vision_recalc(1); /* update for new position */
flush_screen(1);
+ /* if terrain type changes, levitation or flying might become blocked
+ or unblocked; might issue message, so do this after map+vision has
+ been updated for new location instead of right after u_on_newpos() */
+ if (levl[u.ux][u.uy].typ != levl[ox][oy].typ)
+ switch_terrain();
if (is_pool(x, y) && !u.uinwater) {
if ((Is_waterlevel(&u.uz) && levl[x][y].typ == WATER)
-/* NetHack 3.6 hack.c $NHDT-Date: 1543972190 2018/12/05 01:09:50 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.200 $ */
+/* NetHack 3.6 hack.c $NHDT-Date: 1544401269 2018/12/10 00:21:09 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.201 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Derek S. Ray, 2015. */
/* NetHack may be freely redistributed. See license for details. */
STATIC_DCL void NDECL(dosinkfall);
STATIC_DCL boolean FDECL(findtravelpath, (int));
STATIC_DCL boolean FDECL(trapmove, (int, int, struct trap *));
-STATIC_DCL void NDECL(switch_terrain);
STATIC_DCL struct monst *FDECL(monstinroom, (struct permonst *, int));
STATIC_DCL boolean FDECL(doorless_door, (int, int));
STATIC_DCL void FDECL(move_update, (BOOLEAN_P));
/* moving onto different terrain;
might be going into solid rock, inhibiting levitation or flight,
or coming back out of such, reinstating levitation/flying */
-STATIC_OVL void
+void
switch_terrain()
{
struct rm *lev = &levl[u.ux][u.uy];
boolean blocklev = (IS_ROCK(lev->typ) || closed_door(u.ux, u.uy)
- || (Is_waterlevel(&u.uz) && lev->typ == WATER));
+ || (Is_waterlevel(&u.uz) && lev->typ == WATER)),
+ was_levitating = !!Levitation, was_flying = !!Flying;
if (blocklev) {
/* called from spoteffects(), stop levitating but skip float_down() */
if (Flying)
You("start flying.");
}
+ if ((!Levitation ^ was_levitating) || (!Flying ^ was_flying))
+ context.botl = TRUE; /* update Lev/Fly status condition */
}
/* extracted from spoteffects; called by spoteffects to check for entering or
else if (!nomovemsg)
nomovemsg = You_can_move_again;
if (*nomovemsg)
- pline1(nomovemsg);
+ pline("%s", nomovemsg);
nomovemsg = 0;
u.usleep = 0;
multi_reason = NULL;
if (afternmv) {
int NDECL((*f)) = afternmv;
+
/* clear afternmv before calling it (to override the
encumbrance hack for levitation--see weight_cap()) */
afternmv = (int NDECL((*))) 0;
-/* NetHack 3.6 teleport.c $NHDT-Date: 1523306912 2018/04/09 20:48:32 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.73 $ */
+/* NetHack 3.6 teleport.c $NHDT-Date: 1544401270 2018/12/10 00:21:10 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.81 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2011. */
/* NetHack may be freely redistributed. See license for details. */
vision_full_recalc = 1;
nomul(0);
vision_recalc(0); /* vision before effects */
+ /* if terrain type changes, levitation or flying might become blocked
+ or unblocked; might issue message, so do this after map+vision has
+ been updated for new location instead of right after u_on_newpos() */
+ if (levl[u.ux][u.uy].typ != levl[u.ux0][u.uy0].typ)
+ switch_terrain();
if (telescroll) {
/* when teleporting by scroll, we need to handle discovery
now before getting feedback about any objects at our