mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-18 19:19:19 +02:00
When replaying a binary twin, load in two passes over the same data: the first pass loads infrastructure (tracks/traction/events/memcells/sounds + directives), the second pass loads the visual nodes (3d models, terrain shapes/lines) that the reader skipped via the v6 node-class markers. - cParser: setReplayPass() selects the served node class (propagated to include children); restartReplay() rewinds the twin for the second pass. - state_serializer: first pass uses the infrastructure pass; on completion it restarts the twin for the visual pass. Stateful directives (trainset, event, camera, light, sky, time, ...) are skipped on the visual pass so their side effects do not duplicate; transform/group directives re-run so deferred visual nodes get correct placement. A text/compile load (no twin) stays single-pass. Verified: td.scn replays through both passes with no duplicate vehicles/events and reaches the normal load endpoint. This is the sequential foundation; moving the visual pass into the driver (so play starts after the infrastructure pass) is the next step. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>