more vault guard (trunk only)
Fix several obscure bugs that can happen when a guard leads someone out of a vault: 1) non-pit traps created in the temporary corridor would persist inside solid rock after the corridor was removed (pits dug by the hero were explicitly removed but several other trap types are possible); 2) lighting the corridor with scroll/wand/spell left the affected spots flagged as lit after they reverted to rock; tunneling through that area, either by digging or by teleporting back to the vault and having another guard appear, unearthed lit corridor there; 3) if you became encased in solid rock because you were in the temporary corridor when it was removed (which will happen if the guard is killed while you're in his corridor), you were only told so if you saw part of it revert to rock; when blind, you simply found yourself unable to move; 4) dragging an iron ball in the temporary corridor could result in part of that corridor becoming permanent if the guard was killed; in 3.4.3, it would only occur if the cause of death took away all the guard's hit points (which happens for most but not all deaths); in development code after my recent patch, that would be every cause of death. #4 could also yield "dmonsfree: <N+1> removed doesn't match <N> pending" warning in 3.4.3 when the fmon list was scanned and a guard at <0,0> with no hit points was found but hadn't passed through to the end of mondead() and m_detach(). The previous patch fixed that, I think/hope. Most guard deaths won't trigger that; grddead() moves the guard to <0,0> but then removes the temp corridor on its second try, returns true, and mondead() finishes normally.
This commit is contained in:
@@ -332,6 +332,7 @@ E int FDECL(back_to_glyph, (XCHAR_P,XCHAR_P));
|
||||
E int FDECL(zapdir_to_glyph, (int,int,int));
|
||||
E int FDECL(glyph_at, (XCHAR_P,XCHAR_P));
|
||||
E void NDECL(set_wall_state);
|
||||
E void FDECL(unset_seenv, (struct rm *,int,int,int,int));
|
||||
|
||||
/* ### do.c ### */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user