secret doors in Garden filled rooms, take two
A comment in rm.h claimed that secret doors can't be trapped so I used door flag D_TRAPPED to handle secret doors that should be shown as trees instead of walls. But the comment was inaccurate and secret doors can be trapped. Such trapped secret doors in ordinary rooms ended up being shown as trees too. Switch from using D_ARBOREAL in levl[][].doormask to new levl[][].arboreal_sdoor which overloads levl[][].candig. Also, wizard mode wishing for secret doors needed updating to allow creating trapped ones (at wall or door locations). This ought to update EDITLEVEL but I think existing save files can live with secret door display issues. Untrapped secret doors in garden-fill rooms will end up becoming trapped. Replaces the fix for github issue #1309
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.7 display.c $NHDT-Date: 1723834773 2024/08/16 18:59:33 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.244 $ */
|
||||
/* NetHack 3.7 display.c $NHDT-Date: 1745114235 2025/04/19 17:57:15 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.260 $ */
|
||||
/* Copyright (c) Dean Luick, with acknowledgements to Kevin Darcy */
|
||||
/* and Dave Cohrs, 1990. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -2291,7 +2291,7 @@ back_to_glyph(coordxy x, coordxy y)
|
||||
idx = (ptr->waslit || flags.lit_corridor) ? S_litcorr : S_corr;
|
||||
break;
|
||||
case SDOOR:
|
||||
if ((ptr->doormask & D_ARBOREAL) != 0) {
|
||||
if (ptr->arboreal_sdoor) {
|
||||
idx = S_tree;
|
||||
break;
|
||||
}
|
||||
@@ -3586,7 +3586,7 @@ wall_angle(struct rm *lev)
|
||||
break;
|
||||
|
||||
case SDOOR:
|
||||
if ((lev->doormask & D_ARBOREAL) != 0) {
|
||||
if (lev->arboreal_sdoor) {
|
||||
idx = S_tree;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user