tr2/camera: determine room for in-game cutscenes
Some checks are pending
Run code linters / Run code linters (push) Waiting to run
Publish a pre-release / Build TR1 (push) Has been skipped
Publish a pre-release / Build TR2 (push) Has been skipped
Publish a pre-release / Create a prerelease (push) Has been skipped

Standalone cutscene levels already determine the room for cinematic
positions, but in-game cutscenes do not and hence camera interpolation
clamping can yield bad results for wide ranging cinematics. This
ensures the camera is always in the correct room for in-game cutscenes.

Resolves #2754.
This commit is contained in:
lahm86 2025-04-13 18:07:30 +01:00
parent 7c8fadc0d2
commit 234c339bd2
2 changed files with 7 additions and 0 deletions

View file

@ -24,6 +24,7 @@
- fixed the drawbridge producing dynamic light when open (#2294)
- fixed the scale of several pickup models in The Golden Mask (#2652)
- fixed the shark in The Cold War not making any sounds when biting Lara (#2678)
- fixed the in-game cinematic camera at times yielding invalid positions (and hence views) in custom levels (#2754)
- fixed sprites rendering black if no shade value is assigned in the level (#2701, regression from 0.8)
- fixed a crash if an image was missing
- fixed a crash on level load if an animation has no frames (#2746, regression from 0.8)

View file

@ -877,6 +877,12 @@ void Camera_LoadCutsceneFrame(void)
g_Camera.roll = roll;
g_Camera.shift = 0;
const int16_t room_num =
Room_FindByPos(g_Camera.pos.x, g_Camera.pos.y, g_Camera.pos.z);
if (room_num != NO_ROOM_NEG) {
g_Camera.pos.room_num = room_num;
}
Viewport_AlterFOV(fov);
if (g_Config.audio.enable_lara_mic) {