diff --git a/Source/engine/render/scrollrt.cpp b/Source/engine/render/scrollrt.cpp index 32dc679376f..2f674df99c9 100644 --- a/Source/engine/render/scrollrt.cpp +++ b/Source/engine/render/scrollrt.cpp @@ -84,7 +84,7 @@ constexpr auto RightFrameDisplacement = Displacement { DunFrameWidth, 0 }; [[nodiscard]] DVL_ALWAYS_INLINE bool IsFloor(Point tilePosition) { - return !TileHasAny(tilePosition, TileProperties::Solid); + return !TileHasAny(tilePosition, TileProperties::Solid | TileProperties::BlockMissile); } [[nodiscard]] DVL_ALWAYS_INLINE bool IsWall(Point tilePosition) diff --git a/Source/levels/gendung.cpp b/Source/levels/gendung.cpp index 4a59eb13435..8f5d9e6dadc 100644 --- a/Source/levels/gendung.cpp +++ b/Source/levels/gendung.cpp @@ -468,6 +468,10 @@ void LoadLevelSOLData() break; case DTYPE_CAVES: LoadFileInMem("levels\\l3data\\l3.sol", SOLData); + // The graphics for tile 48 sub-tile 171 frame 461 are partly incorrect, as they + // have a few pixels that should belong to the solid tile 49 instead. + // Marks the sub-tile as "BlockMissile" to avoid treating it as a floor during rendering. + SOLData[170] |= TileProperties::BlockMissile; break; case DTYPE_HELL: LoadFileInMem("levels\\l4data\\l4.sol", SOLData); diff --git a/Source/levels/reencode_dun_cels.hpp b/Source/levels/reencode_dun_cels.hpp index 977f1dd83eb..c91482d862f 100644 --- a/Source/levels/reencode_dun_cels.hpp +++ b/Source/levels/reencode_dun_cels.hpp @@ -19,7 +19,8 @@ struct DunFrameInfo { [[nodiscard]] bool isFloor() const { - return !HasAnyOf(properties, TileProperties::Solid) + // The BlockMissile check is for stairs in L3 and L4, e.g. tile 46 sub-tile 141 frame 386 in L4. + return !HasAnyOf(properties, TileProperties::Solid | TileProperties::BlockMissile) && (microTileIndex == 0 || microTileIndex == 1); } [[nodiscard]] bool isFloorLeft() const { return microTileIndex == 0; }