From ff9992dff8a2f7bfd47be7fd372c3c2359ac94c1 Mon Sep 17 00:00:00 2001 From: Shane McGovern Date: Mon, 3 Aug 2026 20:09:29 +0100 Subject: [PATCH] Stop boulders being pushed through walls (#754) checkBoulderPush had an isWarpTileCell escape hatch that let a boulder be pushed onto any door/warp tile, walkable or not. In pokered, CheckForCollisionWhenPushingBoulder walks the same wTilesetCollisionPtr list as player movement (CheckTilePassable) -- there is no hole/warp exception, so a boulder can never land on a cell the player cannot walk onto. The known push targets (CAVERN holes, Victory Road switches) are walkable tiles in their tileset's coll list already, so removing the escape hatch only stops pushing boulders into walls. Fixes #754 --- src/world/OverworldController.lua | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/world/OverworldController.lua b/src/world/OverworldController.lua index a6bf7d50..fe1c0f24 100644 --- a/src/world/OverworldController.lua +++ b/src/world/OverworldController.lua @@ -1216,12 +1216,16 @@ function OverworldState:checkBoulderPush(dir) end local bx, by = Collision.target(fx, fy, dir) if not self.map:inBounds(bx, by) then self.boulderTried = nil return false end + -- CheckForCollisionWhenPushingBoulder uses the same walkable check as + -- player movement (CheckTilePassable walks the same wTilesetCollisionPtr + -- list) -- there is no hole/warp escape hatch in the original, so a + -- boulder can never be pushed onto a cell the player cannot walk onto. + -- The known push targets (CAVERN $22 holes, Victory Road switches) are + -- walkable tiles in their tileset's coll list already, so removing the + -- port's isWarpTileCell exception only stops wall pushes (#754). if not self.map:isWalkableCell(bx, by) then - -- boulders may be pushed into holes/switch spots that aren't walkable - if not self.map:isWarpTileCell(bx, by) then - self.boulderTried = nil - return false - end + self.boulderTried = nil + return false end if Collision.occupied(self.entities, bx, by, npc) then self.boulderTried = nil