local a,n=calculateShowTimes()local t=true for a,H in ipairs(SHOW_SCENES)do local O=H:GetAttribute("\084\105\109\101\076\101\110\103\116\104")if n then if n<O then EventSequencer.loadScene(H.Name,n)t=false break else n=n-O end end end if t then loadPreShowVenue()end
------------------------------------------------------------------------------
---------- This code tries to load dynamically into an ongoing show ----------

local timeUntilNextShow, timeIntoShow = calculateShowTimes()
local shouldLoadPSV = true

for _, scene in ipairs(SHOW_SCENES) do
	local sceneLength = scene:GetAttribute("TimeLength")
	if timeIntoShow then
		if timeIntoShow < sceneLength then
			-- Jump into mid scene of show
			EventSequencer.loadScene(scene.Name, timeIntoShow)
			shouldLoadPSV = false
			break
		else
			timeIntoShow = timeIntoShow - sceneLength
		end
	end
end

if shouldLoadPSV then
	loadPreShowVenue()
end
