From 2ebe8915f6ad7e66cbaebfacd5754397ed3dd1d1 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Sat, 4 Jan 2025 16:05:03 +0200 Subject: [PATCH] Prevent melting ice destroying necessary traps A magic portal ended up on a melting ice. --- src/trap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/trap.c b/src/trap.c index d87f4131f..9c0ec1304 100644 --- a/src/trap.c +++ b/src/trap.c @@ -7064,7 +7064,8 @@ trap_ice_effects(coordxy x, coordxy y, boolean ice_is_melting) int otyp = (ttmp->ttyp == LANDMINE) ? LAND_MINE : BEARTRAP; cnv_trap_obj(otyp, 1, ttmp, TRUE); } else { - deltrap(ttmp); + if (!undestroyable_trap(ttmp->ttyp)) + deltrap(ttmp); } } }