]> granicus.if.org Git - nethack/commitdiff
Should see rusting next to you if underwater
authorPasi Kallinen <paxed@alt.org>
Sat, 12 Feb 2022 09:54:47 +0000 (11:54 +0200)
committerPasi Kallinen <paxed@alt.org>
Sat, 12 Feb 2022 09:54:50 +0000 (11:54 +0200)
You can see to the adjacent squares, if they're water and you're
underwater - show the item rusting there in that case.

src/trap.c

index 2cce9d5482d777dd3524dd52c02184c4578054ac..2d96ff04418f14e2b15cde4f28e79e74c0f0d546 100644 (file)
@@ -184,7 +184,7 @@ erode_obj(
     /* Is g.bhitpos correct here? Ugh. */
     visobj = !victim && cansee(g.bhitpos.x, g.bhitpos.y)
         && (!is_pool(g.bhitpos.x, g.bhitpos.y)
-            || (u.ux == g.bhitpos.x && u.uy == g.bhitpos.y && Underwater));
+            || (next2u(g.bhitpos.x,g.bhitpos.y) && Underwater));
 
     switch (type) {
     case ERODE_BURN: