better trap searching behavior

- if a trap is hidden by clutter, cls() before delay, remove windowport
specific behavior, makes trap more obvious in all cases
This commit is contained in:
cohrs
2002-03-18 07:30:48 +00:00
parent a0a0a0e5dd
commit 6fc7d44345
+12 -19
View File
@@ -1101,8 +1101,8 @@ find_trap(trap)
struct trap *trap; struct trap *trap;
{ {
int tt = what_trap(trap->ttyp); int tt = what_trap(trap->ttyp);
boolean cleared = FALSE;
You("find %s.", an(defsyms[trap_to_defsym(tt)].explanation));
trap->tseen = 1; trap->tseen = 1;
exercise(A_WIS, TRUE); exercise(A_WIS, TRUE);
if (Blind) if (Blind)
@@ -1112,24 +1112,17 @@ struct trap *trap;
if (levl[trap->tx][trap->ty].glyph != trap_to_glyph(trap)) { if (levl[trap->tx][trap->ty].glyph != trap_to_glyph(trap)) {
/* There's too much clutter to see your find otherwise */ /* There's too much clutter to see your find otherwise */
if (!strncmpi(windowprocs.name, "tty", 3)) { cls();
tmp_at(DISP_ALWAYS, trap_to_glyph(trap)); map_trap(trap, 1);
tmp_at(trap->tx, trap->ty); display_self();
display_nhwindow(WIN_MAP, TRUE); /* wait */ cleared = TRUE;
tmp_at(DISP_END,0); }
}
#if 0 You("find %s.", an(defsyms[trap_to_defsym(tt)].explanation));
/* This could flash the trap in a future post-3.4.0 release? (untested) */
else { if (cleared) {
int i, tglyph = levl[trap->tx][trap->ty].glyph; display_nhwindow(WIN_MAP, TRUE); /* wait */
for (i = 0; i < 4; i++) { docrt();
tmp_at(DISP_FLASH, trap_to_glyph(trap));
tmp_at(trap->tx, trap->ty);
delay_output();
tmp_at(DISP_END, 0);
}
}
#endif
} }
} }