lara: test alignment position height validity in TR1

This applies a fix introduced in TR2 to TR1 so that Lara doesn't become
clamped under a steeply sloped ceiling if picking up an item there.

Resolves #2879.
This commit is contained in:
lahm86 2025-04-27 18:59:38 +01:00
parent e03c65ca0f
commit 61cdc7cd1e
3 changed files with 2 additions and 3 deletions

View file

@ -25,6 +25,7 @@
- fixed the scale of the four keys in St. Francis' Folly (#2652)
- fixed the panther at times not making a sound when it dies, and restored Skate Kid's death SFX (#2647)
- fixed pushblocks being rotated when Lara grabs them, most noticeable if asymmetric textures have been used (#2776)
- fixed Lara becoming clamped if she picks up an item under a steeply sloped ceiling (#2879)
- fixed a crash when 3D pickups are disabled and Lara crosses a trigger to look at a pickup item (#2711, regression from 4.8)
- fixed trapezoid filter warping on faces close to the camera (#2629, regression from 4.9)
- fixed Mac builds crashing upon start (regression from 4.9)

View file

@ -485,6 +485,7 @@ Not all options are turned on by default. Refer to `TR1X_ConfigTool.exe` for det
- fixed being able to shoot the scion multiple times if save/load is used while it blows up
- fixed the game crashing if a cinematic is triggered but the level contains no cinematic frames
- fixed pushblocks being rotated when Lara grabs them, most noticeable if asymmetric textures have been used
- fixed Lara becoming clamped if she picks up an item under a steeply sloped ceiling
#### Cheats
- added a fly cheat

View file

@ -228,8 +228,6 @@ void Lara_AlignPosition(const ITEM *const item, const XYZ_32 *const vec)
.z = item->pos.z + shift.z,
};
#if TR_VERSION == 2
// TODO: check the significance of this in TR1
int16_t room_num = lara->room_num;
const SECTOR *const sector =
Room_GetSector(new_pos.x, new_pos.y, new_pos.z, &room_num);
@ -242,7 +240,6 @@ void Lara_AlignPosition(const ITEM *const item, const XYZ_32 *const vec)
|| ABS(ceiling - lara->pos.y) < LARA_HEIGHT) {
return;
}
#endif
lara->pos = new_pos;
}