mirror of
https://github.com/LostArtefacts/TRX.git
synced 2025-04-28 12:47:58 +03:00
tr2/camera: determine room for in-game cutscenes
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:
parent
7c8fadc0d2
commit
234c339bd2
2 changed files with 7 additions and 0 deletions
|
@ -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)
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue