wizard mode's sanity_check option missed nested containers and migrating mons
always update map display and use up turn if open or close command attempted
while blind reveals change in door state or discloses non-door spot
+secret door detection's trap finding is no longer blocked by water or clouds
+ on the Planes of Water and Air
Platform- and/or Interface-Specific Fixes
#endif
E int NDECL(findit);
E int NDECL(openit);
+E boolean FDECL(detecting, (void (*)(int,int,genericptr)));
E void FDECL(find_trap, (struct trap *));
E int FDECL(dosearch0, (int));
E int NDECL(dosearch);
-/* SCCS Id: @(#)detect.c 3.5 2006/05/13 */
+/* SCCS Id: @(#)detect.c 3.5 2007/11/05 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
return(num);
}
+/* callback hack for overriding vision in do_clear_area() */
+boolean
+detecting(func)
+ void FDECL((*func), (int,int,genericptr_t));
+{
+ return (func == findone || func == openone);
+}
+
void
find_trap(trap)
struct trap *trap;
-/* SCCS Id: @(#)vision.c 3.5 2007/05/11 */
+/* SCCS Id: @(#)vision.c 3.5 2007/11/05 */
/* Copyright (c) Dean Luick, with acknowledgements to Dave Cohrs, 1990. */
/* NetHack may be freely redistributed. See license for details. */
register int x;
int y, min_x, max_x, max_y, offset;
char *limits;
+ boolean override_vision;
+
+ /* vision doesn't pass through water or clouds, detection should
+ [this probably ought to be an arg supplied by our caller...] */
+ override_vision = (Is_waterlevel(&u.uz) || Is_airlevel(&u.uz)) &&
+ detecting(func);
if (range > MAX_RADIUS || range < 1)
panic("do_clear_area: illegal range %d", range);
if((min_x = (scol - offset)) < 0) min_x = 0;
if((max_x = (scol + offset)) >= COLNO) max_x = COLNO-1;
for (x = min_x; x <= max_x; x++)
- if (couldsee(x, y))
+ if (couldsee(x, y) || override_vision)
(*func)(x, y, arg);
}
}