From a859d668f915983aa1e8e5a49e7d5a48394bce5c Mon Sep 17 00:00:00 2001 From: lahm86 <33758420+lahm86@users.noreply.github.com> Date: Sun, 27 Apr 2025 18:59:38 +0100 Subject: [PATCH] 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. --- docs/tr1/CHANGELOG.md | 1 + docs/tr1/README.md | 1 + src/libtrx/game/lara/common.c | 3 --- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/tr1/CHANGELOG.md b/docs/tr1/CHANGELOG.md index e885f60fe..97c2ae10f 100644 --- a/docs/tr1/CHANGELOG.md +++ b/docs/tr1/CHANGELOG.md @@ -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) diff --git a/docs/tr1/README.md b/docs/tr1/README.md index d128fb4b3..e49c78f4e 100644 --- a/docs/tr1/README.md +++ b/docs/tr1/README.md @@ -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 diff --git a/src/libtrx/game/lara/common.c b/src/libtrx/game/lara/common.c index eded61e70..ad6136f5a 100644 --- a/src/libtrx/game/lara/common.c +++ b/src/libtrx/game/lara/common.c @@ -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; }