From d20f670710ca8d01297ee71ed0e48dd58d022772 Mon Sep 17 00:00:00 2001 From: PatR Date: Mon, 2 Jan 2023 14:25:23 -0800 Subject: [PATCH] striking/force-bolt comment I'm not sure whether newsym_force() is still necessary, but add a comment about why it's being used in bhito(). --- src/zap.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/zap.c b/src/zap.c index 99b31b139..18c872947 100644 --- a/src/zap.c +++ b/src/zap.c @@ -2137,14 +2137,16 @@ bhito(struct obj *obj, struct obj *otmp) You_hear("a crumbling sound."); } } else { - int oox = obj->ox; - int ooy = obj->oy; - if (gc.context.mon_moving - ? !breaks(obj, obj->ox, obj->oy) - : !hero_breaks(obj, obj->ox, obj->oy, 0)) + int oox = obj->ox, ooy = obj->oy; + + if (gc.context.mon_moving ? !breaks(obj, oox, ooy) + : !hero_breaks(obj, oox, ooy, 0)) maybelearnit = FALSE; /* nothing broke */ else - newsym_force(oox,ooy); + /* obj broke; force redisplay in case it was the only-- + or last--item under non-breaking pile-top; top item + here might now be a lone object rather than a pile */ + newsym_force(oox, ooy); res = 0; } if (maybelearnit)