From ebd9fcc8429c6e5a9e13380d473429e623493df6 Mon Sep 17 00:00:00 2001 From: The Dax Date: Sat, 5 Jul 2025 14:24:24 -0400 Subject: [PATCH] Fix a couple issues with the Unending Journey: -Fade to black smoothly so the transition into a cutscene isn't so jarring -Don't softlock when exiting the menu without playing anything --- resources/scripts/events/tosort/UnendingJourney.lua | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/resources/scripts/events/tosort/UnendingJourney.lua b/resources/scripts/events/tosort/UnendingJourney.lua index 212cb52..b11404f 100644 --- a/resources/scripts/events/tosort/UnendingJourney.lua +++ b/resources/scripts/events/tosort/UnendingJourney.lua @@ -1,3 +1,6 @@ +-- Cutscene flags, TODO: move these to Global.lua, or maybe a new file named Cutscene.lua or something along those lines, to store all of them +SET_BASE = 0xF8400EFB -- Pulled from Sapphire, perhaps the default flags the server sends for most cutscenes? + SCENE_SHOW_MENU = 00000 SCENE_PLAY_CUTSCENE = 00001 @@ -7,11 +10,12 @@ function onTalk(target, player) end function onReturn(scene, results, player) - if scene == 0 then - -- TODO: this is not the correct cutscene flags - -- TODO: we need to switch the player into viewingcutscene online status - player:play_scene(player.id, EVENT_ID, SCENE_PLAY_CUTSCENE, 8192, results) + -- A result of zero means the user exited the menu without playing anything. + if scene == 0 and results[1] ~= 0 then + -- TODO: we need to switch the player into viewingcutscene online status (on the Rust side?) + player:play_scene(player.id, EVENT_ID, SCENE_PLAY_CUTSCENE, SET_BASE, results) return + -- TODO: we cannot nest cutscenes right now, but control should return back to the UEJ menu when a cutscene finishes end player:finish_event(EVENT_ID) end