]> granicus.if.org Git - nethack/commitdiff
Only print giant snatching boulder message when cansee pos.
authorDavid Cohrs <davecohrs@gmail.com>
Sat, 16 Jan 2016 04:35:15 +0000 (20:35 -0800)
committerDavid Cohrs <davecohrs@gmail.com>
Sat, 16 Jan 2016 04:35:15 +0000 (20:35 -0800)
Reported by a couple times directly to devteam, no bz.

src/trap.c

index 4a065d1ef42e5bfcbd686faf337edd078a649372..535014befce66af22a9694e33c0597a08f420e9d 100644 (file)
@@ -1757,7 +1757,8 @@ int style;
         if ((mtmp = m_at(bhitpos.x, bhitpos.y)) != 0) {
             if (otyp == BOULDER && throws_rocks(mtmp->data)) {
                 if (rn2(3)) {
-                    pline("%s snatches the boulder.", Monnam(mtmp));
+                   if (cansee(bhitpos.x, bhitpos.y))
+                       pline("%s snatches the boulder.", Monnam(mtmp));
                     singleobj->otrapped = 0;
                     (void) mpickobj(mtmp, singleobj);
                     used_up = TRUE;