From 80a8eaf7e6a375a1ee538f0eef516e7278ae434d Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Sun, 23 Apr 2023 07:47:43 +0300 Subject: [PATCH] Prevent calling doaltarobj twice My change to make items thrown by monsters landing on altar caused doaltarobj being called twice when hero dropped an item on it. Call the newer instance only when monsters are moving. --- src/do.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/do.c b/src/do.c index 822c9ec99..ca3c9819f 100644 --- a/src/do.c +++ b/src/do.c @@ -299,7 +299,8 @@ flooreffects(struct obj *obj, coordxy x, coordxy y, const char *verb) (void) obj_meld(&obj, &otmp); } res = (boolean) !obj; - } else if (IS_ALTAR(levl[x][y].typ) && cansee(x,y)) { + } else if (gc.context.mon_moving && IS_ALTAR(levl[x][y].typ) + && cansee(x,y)) { doaltarobj(obj); }