From adacde80e7a66c915124f2ddda31844fb0197743 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Fri, 1 Feb 2019 13:38:21 +0200 Subject: [PATCH 1/2] Fix logic error in stuck_in_wall --- src/pray.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pray.c b/src/pray.c index 29cf878a4..d63778d52 100644 --- a/src/pray.c +++ b/src/pray.c @@ -157,7 +157,7 @@ stuck_in_wall() y = u.uy + j; if (!isok(x, y) || (IS_ROCK(levl[x][y].typ) - && (levl[x][y].typ != SDOOR || levl[x][y].typ != SCORR)) + && (levl[x][y].typ != SDOOR && levl[x][y].typ != SCORR)) || (blocked_boulder(i, j) && !throws_rocks(youmonst.data))) ++count; } From 9f1ae0fe740df2ff2e5c33c3a1c2d1f42d3f7b96 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Fri, 1 Feb 2019 18:19:00 +0200 Subject: [PATCH 2/2] Fix making fake leash object with leashmon set When farlooking at a leash glyph on a map, the fake object should never have leashmon set. This happened when a mimic was on the same spot and was mimicing a corpse or statue, due to leashmon and corpsenm using the same field. --- src/pager.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pager.c b/src/pager.c index e0c727479..775eabbc9 100644 --- a/src/pager.c +++ b/src/pager.c @@ -187,14 +187,14 @@ struct obj **obj_p; otmp->quan = 2L; /* to force pluralization */ else if (otmp->otyp == SLIME_MOLD) otmp->spe = context.current_fruit; /* give it a type */ - else if (otmp->otyp == LEASH) - otmp->leashmon = 0; if (mtmp && has_mcorpsenm(mtmp)) /* mimic as corpse/statue */ otmp->corpsenm = MCORPSENM(mtmp); else if (otmp->otyp == CORPSE && glyph_is_body(glyph)) otmp->corpsenm = glyph - GLYPH_BODY_OFF; else if (otmp->otyp == STATUE && glyph_is_statue(glyph)) otmp->corpsenm = glyph - GLYPH_STATUE_OFF; + if (otmp->otyp == LEASH) + otmp->leashmon = 0; } /* if located at adjacent spot, mark it as having been seen up close (corpse type will be known even if dknown is 0, so we don't need a