]> granicus.if.org Git - nethack/commitdiff
another vision-related message
authorcohrs <cohrs>
Thu, 24 Jan 2002 02:34:52 +0000 (02:34 +0000)
committercohrs <cohrs>
Thu, 24 Jan 2002 02:34:52 +0000 (02:34 +0000)
don't just say "the knife misses" when you can actually see the monster
with infravision by testing using the correct function

src/dothrow.c

index 25400343579d01e24349ea74f41dd8221d730851..4f238ab2c1c03a0632419a5a4cee09e1fd460799 100644 (file)
@@ -1091,8 +1091,7 @@ struct monst *mon;
        An attentive player will still notice that this is different from
        an arrow just landing short of any target (no message in that case),
        so will realize that there is a valid target here anyway. */
-    if (!cansee(bhitpos.x, bhitpos.y) ||
-           (mon->m_ap_type && mon->m_ap_type != M_AP_MONSTER))
+    if (!canseemon(mon) || (mon->m_ap_type && mon->m_ap_type != M_AP_MONSTER))
        pline("%s misses.", The(missile));
     else
        miss(missile, mon);