tr2/room: fix floor height alteration creating walls

This fixes altering the floor height to a wall in the case where
pushblocks have been stacked and the one on top is touching the
ceiling.
This commit is contained in:
lahm86 2025-02-21 12:45:27 +00:00
parent 73d5c88a2e
commit 8621b05dd8
3 changed files with 6 additions and 1 deletions

View file

@ -6,6 +6,8 @@
- fixed Lara getting stuck in a T-pose after jumping/falling and then dying before reaching fast fall speed (#2575)
- fixed a rare issue whereby Lara would be unable to move after disposing a flare (#2545, regression from 0.9)
- fixed flare pickups only adding one flare to Lara's inventory rather than six (#2551, regression from 0.9)
- fixed several issues with pushblocks (#2036)
- fixed an invisible wall above stacked pushblocks if near a ceiling portal
- fixed play any level causing the game to hang when no gym level is present (#2560, regression from 0.9)
- fixed extremely large item quantities crashing the game (#2497, regression from 0.3)
- fixed missing new game text in the passport when play any level is enabled (#2563, regression from 0.9)

View file

@ -80,6 +80,8 @@ game with new enhancements and features.
- fixed the game crashing if a cinematic is triggered but the level contains no cinematic frames
- fixed smashed windows blocking enemy pathing after loading a save
- fixed Lara getting stuck in a T-pose after jumping/falling and then dying before reaching fast fall speed
- fixed several issues with pushblocks
- fixed an invisible wall above stacked pushblocks if near a ceiling portal
- improved the animation of Lara's braid
#### Cheats

View file

@ -569,7 +569,8 @@ void Room_AlterFloorHeight(const ITEM *const item, const int32_t height)
sector->floor.height = ceiling->ceiling.height + ROUND_TO_CLICK(height);
} else {
sector->floor.height += ROUND_TO_CLICK(height);
if (sector->floor.height == ceiling->ceiling.height) {
if (sector->floor.height == ceiling->ceiling.height
&& sector->portal_room.sky == NO_ROOM) {
sector->floor.height = NO_HEIGHT;
}
}