16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-18 10:09:17 +02:00
Commit Graph

10 Commits

Author SHA1 Message Date
maj00r
512595234f Stream visual scenery in the driver (play starts after infrastructure pass)
Splits the progressive load across modes: the loader runs only the first
(infrastructure) pass and then hands off to the driver, so play begins as soon
as tracks/traction/events/signals/the player train are ready. The deferred
visual nodes (3d models, terrain shapes/lines) then stream in from the driver,
a small budget per frame, so the world fills in without a long up-front wait.

- state_serializer: the infrastructure pass now returns to the caller (instead of
  chaining the visual pass), restarting the twin for the visual pass; the visual
  pass uses a small ~8 ms/frame budget and marks the load done at the end. A
  text/compile load (no twin) stays single-pass and finishes as before.
- state_manager: retains the load state across the loader->driver hand-off and
  exposes loading_visuals()/continue_loading_visuals().
- driver_mode::update(): advances the deferred visual load each frame.

Verified on td.scn (playable in ~2 s, visuals complete a few seconds later, no
duplicate objects) and on the large tomaszewo scenery (flora/terrain/models
deferred while infrastructure loads). Inserts run on the main thread before the
render step, so progressive loading needs no locking.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-22 23:23:36 +02:00
docentYT
4e0b4e6ff6 Check if Train pointer is not nullptr 2026-05-11 23:48:13 +02:00
docentYT
7081dab3c2 Replace RadToDeg and DegToRad with glm::degrees and glm::radians 2026-05-02 14:51:13 +02:00
docentYT
ca699d117f Remove not needed includes 2026-05-02 14:40:31 +02:00
docentYT
ca839652bf Use the sq function to force constexpr expressions for numeric literals and enhance readability 2026-04-28 13:23:14 +02:00
docentYT
cba106e22e Use glm::length2 instead of glm::length where possible 2026-04-27 23:27:08 +02:00
docentYT
fae68642bc use glm instead of Math3D in vehicle
WARNING: Model rotation is broken
2026-04-27 13:07:38 +02:00
docentYT
bdff45b584 use glm instead of Math3D in drivermode 2026-04-26 22:40:02 +02:00
copilot-swe-agent[bot]
7e49aa8740 Rewrite #includes to use explicit subdirectory paths
Co-authored-by: Hirek193 <23196899+Hirek193@users.noreply.github.com>
2026-03-14 19:16:48 +00:00
copilot-swe-agent[bot]
0531086bb9 Reorganize source files into logical subdirectories
Co-authored-by: Hirek193 <23196899+Hirek193@users.noreply.github.com>
2026-03-14 19:01:57 +00:00