Count a running mission replay as the camera's owner in readiness

A Space Missions replay flies the camera until it ends, so waiting for a
still camera after a switch let the replay finish before the scenario
looked at it. While a replay runs, readiness no longer asks for enabled
inputs or a still pose, as for the cockpit and a followed target.
This commit is contained in:
German Khokhlov committed 2026-11-10 19:11:08 +04:00
1 parent d3433f66c9
commit 087adc6dc9
2 files changed
+17 -4

No files matched your search

+7 -1
View File
@@ -94,14 +94,20 @@ export function waitForSettled(createState, { frames, timeoutMs }) {
const cockpitActive = Boolean(
window.__godsEyeView?.styleManager?.getCockpitState?.()?.active,
);
// A running Space Missions replay flies the camera until it ends.
const drawn = window.__godsEyeView?.dataManager?.layers
?.get('rocket-launches')
?.module?.qaDrawn?.();
const replaying = Boolean(drawn?.replay?.active && !drawn.paused);
status.observed = {
inputsEnabled: status.conditions.cameraInputsEnabled,
following,
cockpitActive,
replaying,
lastPoseDelta,
};
// Only a live camera owner excuses motion or held inputs, never a scenario flag.
if (following || cockpitActive) {
if (following || cockpitActive || replaying) {
status.conditions.cameraInputsEnabled = true;
status.conditions.cameraPoseStable = true;
}