From 9f7fffc823aa05a2282e32804c704d20b9d68c47 Mon Sep 17 00:00:00 2001 From: PatR Date: Thu, 22 Feb 2024 11:00:18 -0800 Subject: [PATCH] rolling boulder trap fix The recent "trap.c reformatting" commit included a non-formatting change switching from gb.bhitpos.x,.y to local x,y in the rolling boudler trap routine. The part of that routine used when a rolling boulder hits another boulder and transfers its remaining momentum to that other one got switched to wrong x,y and the first boulder basically kept going, possibly hitting itself at each new position. --- src/trap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/trap.c b/src/trap.c index 0026dea13..0f0729fde 100644 --- a/src/trap.c +++ b/src/trap.c @@ -3344,15 +3344,15 @@ launch_obj( bmsg = " as one boulder hits another"; Soundeffect(se_loud_crash, 80); - You_hear("a loud crash%s!", cansee(fx, fy) ? bmsg : ""); + You_hear("a loud crash%s!", cansee(x, y) ? bmsg : ""); obj_extract_self(otmp2); /* pass off the otrapped flag to the next boulder */ otmp2->otrapped = singleobj->otrapped; singleobj->otrapped = 0; - place_object(singleobj, fx, fy); + place_object(singleobj, x, y); singleobj = otmp2; otmp2 = (struct obj *) 0; - wake_nearto(fx, fy, 10 * 10); + wake_nearto(x, y, 10 * 10); } } if (otyp == BOULDER && closed_door(x, y)) {