From b9768ad43a2b4ca54b8f4c8b88d0bf9e80c2815d Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Wed, 13 Dec 2023 14:25:24 +0200 Subject: [PATCH] Fix earthquake causing boulder on lava sanity Before checking if lava or water fills in the pit created by an earthquake, drop the boulder on the pit into it. --- src/music.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/music.c b/src/music.c index 779974bdb..8588e9441 100644 --- a/src/music.c +++ b/src/music.c @@ -333,18 +333,6 @@ do_earthquake(int force) break; /* no pit if portal at that location */ chasm->tseen = 1; - /* Let liquid flow into the newly created chasm. - Adjust corresponding code in apply.c for exploding - wand of digging if you alter this sequence. */ - filltype = fillholetyp(x, y, FALSE); - if (filltype != ROOM) { - set_levltyp(x, y, filltype); /* levl[x][y] = filltype; */ - liquid_flow(x, y, filltype, chasm, (char *) 0); - /* liquid_flow() deletes trap, might kill mtmp */ - if ((chasm = t_at(x, y)) == NULL) - break; /* from switch, not loop */ - } - mtmp = m_at(x, y); /* (redundant?) */ if ((otmp = sobj_at(BOULDER, x, y)) != 0) { if (cansee(x, y)) @@ -357,6 +345,18 @@ do_earthquake(int force) break; /* from switch, not loop */ } + /* Let liquid flow into the newly created chasm. + Adjust corresponding code in apply.c for exploding + wand of digging if you alter this sequence. */ + filltype = fillholetyp(x, y, FALSE); + if (filltype != ROOM) { + set_levltyp(x, y, filltype); /* levl[x][y] = filltype; */ + liquid_flow(x, y, filltype, chasm, (char *) 0); + /* liquid_flow() deletes trap, might kill mtmp */ + if ((chasm = t_at(x, y)) == NULL) + break; /* from switch, not loop */ + } + /* We have to check whether monsters or hero falls into a new pit.... Note: if we get here, chasm is non-Null. */ if (mtmp) {