mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-21 02:32:18 +00:00
Station model: the docked set no longer depends on whether the model draws
Hiding the model (the Cockpit riding Tiangong) gave the docked dots back and with them forgot that the ridden vehicle was docked, which showed the model again the next frame, and so on: the hull flickered in the Cockpit at SZ-23 and Mengtian. The orbit-against-orbit scan now keeps its own docked set, kept current before the show decision, and the hand-over of the dots is a separate matter.
This commit is contained in:
1 parent
9cc077964f
commit
ae9cfa4ffb
2 files changed
+39
-14
No files matched your search
@@ -262,12 +262,18 @@ test('a station without views on its model hides it while the Cockpit rides the
|
||||
f.tick();
|
||||
assert.equal(f.modelItem().show, true, 'outside the Cockpit it draws');
|
||||
held = true;
|
||||
f.tick();
|
||||
assert.equal(
|
||||
f.modelItem().show,
|
||||
false,
|
||||
'the Cockpit camera would sit inside the hull',
|
||||
);
|
||||
// Frame after frame: hiding the model gives the docked dots back, and
|
||||
// that must not make the layer forget the companion is docked (which
|
||||
// showed the model again, and so on, every other frame).
|
||||
for (let i = 0; i < 4; i++) {
|
||||
f.tick();
|
||||
assert.equal(
|
||||
f.modelItem().show,
|
||||
false,
|
||||
`the Cockpit camera would sit inside the hull (tick ${i})`,
|
||||
);
|
||||
assert.equal(f.model._trackedOnStation(), true, `docked (tick ${i})`);
|
||||
}
|
||||
assert.equal(f.model._visualPosition(), null);
|
||||
// Riding the station itself.
|
||||
held = false;
|
||||
|
||||
Reference in new issue
Block a user