mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-18 01:02:23 +00:00
Mark a resumed or share-restored follow only while it starts so a later follow of the same subject is navigation again
The aircraft scene binding re-tracked with origin share-restore, which stayed on the entity: a later trackedEntityChanged for it (cockpit exit, refocus) never stamped navigation, and the aircraft lost its selection origin. Flights, military and satellites now set a transient gevRestoring mark around follow.start, and the aircraft binding resumes with the origin the aircraft was selected by.
This commit is contained in:
1 parent
cbe1d841ea
commit
90d64e6916
7 files changed
+176
-41
No files matched your search
@@ -1011,10 +1011,20 @@ export function createTracking({
|
||||
refreshTrackedReadout(flightState._trackedEntity);
|
||||
// Camera follows the tracked entity (the renderer cancels any flight
|
||||
// first and applies the one exact tracked frame).
|
||||
// A resumed binding or a share restore re-follows the session's own
|
||||
// subject: marked only while the follow starts, so the shell does not
|
||||
// read it as new navigation (LayerBindings.observeCamera) yet any later
|
||||
// follow of the same aircraft still is.
|
||||
if (follow) {
|
||||
flightState._trackedCameraFrameStop = flightState._renderer.follow.start(
|
||||
flightState._trackedEntity,
|
||||
);
|
||||
const entity = flightState._trackedEntity;
|
||||
const restoring = resume || origin === 'share-restore';
|
||||
if (restoring) entity.gevRestoring = true;
|
||||
try {
|
||||
flightState._trackedCameraFrameStop =
|
||||
flightState._renderer.follow.start(entity);
|
||||
} finally {
|
||||
if (restoring) delete entity.gevRestoring;
|
||||
}
|
||||
}
|
||||
|
||||
// Track-history trail (PRD F1): seed from local history + async backfill.
|
||||
|
||||
Reference in new issue
Block a user