Fix original cutscene music lifecycle and verify walking lab route

This commit is contained in:
UnixNight committed 2026-10-24 20:42:21 -04:00
1 parent c929f942e1
commit b58138d7ba
16 files changed
+282 -18

No files matched your search

+10
View File
@@ -80,6 +80,8 @@ public sealed class SceneDirector
public Vector3? CameraEye { get; private set; }
public Vector3? CameraTarget { get; private set; }
public event Action<string, int>? Speech;
public event Action? MusicStopped;
public event Action? MusicRestarted;
public event Action<DirectorActor>? ActorChanged;
public event Action<string, string>? Unsupported;
@@ -359,6 +361,10 @@ public sealed class SceneDirector
if (!IsNone(animation)) { target.Animation = animation!; ActorChanged?.Invoke(target); }
shot = new Shot(entity, index, target, duration);
UpdateCamera(shot);
// CAM416776..4167E1 stops the selected music handle and unloads its
// database before speech. Do not infer this from every speech stream:
// standalone MCA activation has a separate source path.
if (index < 0) MusicStopped?.Invoke();
Speech?.Invoke(database, sound);
}
@@ -482,11 +488,15 @@ public sealed class SceneDirector
private void RestoreControl()
{
var wasControlled = Controlled;
shot = null;
ControlledTag = level.Player?.Tag;
InventoryEnabled = true;
CameraEye = CameraTarget = null;
skipping = false;
// DEFAULT447D5C skips the restart if Jimmy already owns control;
//447F12..447F45 reloads his selected music and starts wave0 again.
if (!wasControlled) MusicRestarted?.Invoke();
// Original DEFAULT invokes a Jimmy help/inventory callback at SCENE30;
// it does not assign a new task value or complete the lab.
}