Skip to content

Commit

Permalink
camera: remove LOS check on fixed cameras
Browse files Browse the repository at this point in the history
LOS checks are removed in TR3 onwards for fixed cameras, so implemented
here to fix the camera being thrown through doors that are yet to open.
This also improves other areas of the game, for example if Lara is
jumping down a slope with a low-ceiling and fixed camera, and if she
begins a level on a fixed camera but is just out of sight.

Resolves LostArtefacts#954.
  • Loading branch information
lahm86 committed Apr 18, 2024
1 parent 19212d7 commit 2e2d674
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## [Unreleased](https://github.com/LostArtefacts/TR1X/compare/stable...develop) - ××××-××-××
- changed injection files to be placed in its own directory (#1306)
- fixed camera vibrations when using the teleport command in 60 FPS (#1274)
- fixed the camera being thrown through doors for one frame when looked at from fixed camera positions (#954)

## [4.0.3](https://github.com/LostArtefacts/TR1X/compare/4.0.2...4.0.3) - 2024-04-14
- fixed flickering sprite pickups (#1298)
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ Not all options are turned on by default. Refer to `TR1X_ConfigTool.exe` for det
- fixed Scion 1 respawning on load
- fixed triggered flip effects not working if there are no sound devices
- fixed ceiling heights at times being miscalculated, resulting in camera issues and Lara being able to jump into the ceiling
- fixed the camera being thrown through doors for one frame when looked at from fixed camera positions
- fixed the ape not performing the vault animation when climbing
- fixed Natla's gun moving while she is in her semi death state
- fixed the bear pat attack so it does not miss Lara
Expand Down
4 changes: 0 additions & 4 deletions src/game/camera.c
Original file line number Diff line number Diff line change
Expand Up @@ -576,10 +576,6 @@ void Camera_Fixed(void)
ideal.z = fixed->z;
ideal.room_number = fixed->data;

if (!LOS_Check(&g_Camera.target, &ideal)) {
Camera_ShiftClamp(&ideal, STEP_L);
}

g_Camera.fixed_camera = 1;

Camera_Move(&ideal, g_Camera.speed);
Expand Down

0 comments on commit 2e2d674

Please sign in to comment.