]> granicus.if.org Git - nethack/commitdiff
<Someone>'s trap detection complaint
authornethack.allison <nethack.allison>
Sun, 17 Mar 2002 16:03:29 +0000 (16:03 +0000)
committernethack.allison <nethack.allison>
Sun, 17 Mar 2002 16:03:29 +0000 (16:03 +0000)
To address <Someone>'s complaint, make the cluttered
trap detection tty only. Also put in some dead
code that could make it work elsewhere in future
when there is time to test.

src/detect.c

index d7180bf189549310f4768c8e3bb602d182be8c8a..0490b04de78fc2a3f44d2815646eabcc6c15c475 100644 (file)
@@ -1112,10 +1112,24 @@ struct trap *trap;
 
     if (levl[trap->tx][trap->ty].glyph != trap_to_glyph(trap)) {
        /* There's too much clutter to see your find otherwise */
-       tmp_at(DISP_ALWAYS, trap_to_glyph(trap));
-       tmp_at(trap->tx, trap->ty);
-       display_nhwindow(WIN_MAP, TRUE);        /* wait */
-       tmp_at(DISP_END,0);
+       if (!strncmpi(windowprocs.name, "tty", 3)) {
+               tmp_at(DISP_ALWAYS, trap_to_glyph(trap));
+               tmp_at(trap->tx, trap->ty);
+               display_nhwindow(WIN_MAP, TRUE);        /* wait */
+               tmp_at(DISP_END,0);
+       }
+#if 0
+       /* This could flash the trap in a future post-3.4.0 release? (untested) */
+       else {
+               int i, tglyph = levl[trap->tx][trap->ty].glyph;
+               for (i = 0; i < 4; i++) {
+                       tmp_at(DISP_FLASH, trap_to_glyph(trap));
+                       tmp_at(trap->tx, trap->ty);
+                       delay_output();
+                       tmp_at(DISP_END, 0);
+               }
+       }
+#endif
     }
 }