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.
This commit is contained in:
Pasi Kallinen
2023-04-23 07:47:43 +03:00
parent efd6b4081b
commit 80a8eaf7e6

View File

@@ -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);
}