alternate bear trap fix

Fix the situation of Flying hero failing to untrap a bear trap that
was resulting in the trap becoming hidden.  Previous fix prevented
hero from moving onto the trap's location so that the reason for
hiding it didn't occur.  This moves the hero and forces the trap,
so it will become unhidden again before there's any chance to notice
that it had been hidden.

Status 'Flying' conflicts with being trapped at floor level, but that
is a separate, known issue.  I'll have to resurrect my unfinished fix
for that sooner rather than later.
This commit is contained in:
PatR
2018-09-27 18:42:12 -07:00
parent f87931a7bf
commit 21db5a3ae6
3 changed files with 26 additions and 21 deletions

View File

@@ -2042,6 +2042,7 @@ boolean pick;
struct monst *mtmp;
struct trap *trap = t_at(u.ux, u.uy);
int trapflag = iflags.failing_untrap ? FORCETRAP : 0;
/* prevent recursion from affecting the hero all over again
[hero poly'd to iron golem enters water here, drown() inflicts
@@ -2107,7 +2108,7 @@ boolean pick;
if (!spottrap || spottraptyp != trap->ttyp) {
spottrap = trap;
spottraptyp = trap->ttyp;
dotrap(trap, 0); /* fall into arrow trap, etc. */
dotrap(trap, trapflag); /* fall into arrow trap, etc. */
spottrap = (struct trap *) 0;
spottraptyp = NO_TRAP;
}