From: PatR Date: Fri, 13 May 2016 15:48:27 +0000 (-0700) Subject: water vs ice X-Git-Tag: NetHack-3.6.1_RC01~774 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f768e1fd51a30b1cb74888e76b88774861a9a020;p=nethack water vs ice Like lava, see/feel adjacent ice when underwater. Unlike lava, no special display hacks involved. --- diff --git a/doc/fixes36.1 b/doc/fixes36.1 index 2e2bdd836..f812c44de 100644 --- a/doc/fixes36.1 +++ b/doc/fixes36.1 @@ -242,7 +242,7 @@ after using detection magic or #terrain while underwater, then leaving water and saving while on land, save would flag you as underwater again and then restore would limit the map display accordingly; next move would notice, retify things, and report "you are on solid land again" -can see or feel adjacent lava when underwater +can see or feel adjacent lava or ice when underwater Fixes to Post-3.6.0 Problems that Were Exposed Via git Respository diff --git a/src/display.c b/src/display.c index 600f3fc9e..235de6c36 100644 --- a/src/display.c +++ b/src/display.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 display.c $NHDT-Date: 1461979957 2016/04/30 01:32:37 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.83 $ */ +/* NetHack 3.6 display.c $NHDT-Date: 1463154502 2016/05/13 15:48:22 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.85 $ */ /* Copyright (c) Dean Luick, with acknowledgements to Kevin Darcy */ /* and Dave Cohrs, 1990. */ /* NetHack may be freely redistributed. See license for details. */ @@ -530,8 +530,7 @@ xchar x, y; if (!isok(x, y)) return; lev = &(levl[x][y]); - /* If the hero's memory of an invisible monster is accurate, we want to - * keep + /* If hero's memory of an invisible monster is accurate, we want to keep * him from detecting the same monster over and over again on each turn. * We must return (so we don't erase the monster). (We must also, in the * search function, be sure to skip over previously detected 'I's.) @@ -539,8 +538,10 @@ xchar x, y; if (glyph_is_invisible(lev->glyph) && m_at(x, y)) return; - /* The hero can't feel non pool locations while under water. */ - if (Underwater && !Is_waterlevel(&u.uz) && !is_pool_or_lava(x, y)) + /* The hero can't feel non pool locations while under water + except for lava and ice. */ + if (Underwater && !Is_waterlevel(&u.uz) + && !is_pool_or_lava(x, y) && !is_ice(x, y)) return; /* Set the seen vector as if the hero had seen it. @@ -702,8 +703,8 @@ register int x, y; } if (Underwater && !Is_waterlevel(&u.uz)) { /* when underwater, don't do anything unless is an - adjacent underwater or lava position */ - if (!is_pool_or_lava(x, y) || distu(x, y) > 2) + adjacent water or lava or ice position */ + if (!(is_pool_or_lava(x, y) || is_ice(x, y)) || distu(x, y) > 2) return; } @@ -1100,7 +1101,7 @@ int mode; for (x = u.ux - 1; x <= u.ux + 1; x++) for (y = u.uy - 1; y <= u.uy + 1; y++) - if (isok(x, y) && is_pool_or_lava(x, y)) { + if (isok(x, y) && (is_pool_or_lava(x, y) || is_ice(x, y))) { if (Blind && !(x == u.ux && y == u.uy)) show_glyph(x, y, cmap_to_glyph(S_stone)); else