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

30 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
c0abea1473 Merge pull request #109 from docentYT/fix-compilation-warnings
Fix compilation warnings
2026-06-16 11:14:25 +02:00
docentYT
be91c4da70 Fix C4566 2026-05-12 16:36:32 +02:00
docentYT
4c7cf22d06 Use texture id casting recommended by ImGui wiki 2026-05-12 00:18:11 +02:00
docentYT
373c04c0b7 Add missing return 2026-05-12 00:12:55 +02:00
docentYT
991fb02414 Remove function declaration that has no implementation and is not used 2026-05-12 00:05:36 +02:00
docentYT
4e0b4e6ff6 Check if Train pointer is not nullptr 2026-05-11 23:48:13 +02:00
3480d1c3a4 Replace wrap360 with clamp_circular 2026-05-10 22:49:58 +02:00
3419666070 scale/endscale/localscale per node model 2026-05-10 13:12:49 +02:00
docentYT
5367cb9940 Merge remote-tracking branch 'upstream/master' into utilities-simplification 2026-05-05 23:08:43 +02:00
docentYT
13c7317f6e Do not allow implicit cast for inline std::string to_string(bool Value) and change to_string to std::string for non boolean values 2026-05-03 15:49:29 +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
bae20a69e8 Bring back old simulator console as ini option showsystemconsole 2026-05-01 23:51:57 +02:00
docentYT
d1f16411a1 Replace clamp with std::clamp 2026-05-01 22:14:29 +02:00
docentYT
9c27b54960 Simplify len_common_prefix 2026-05-01 13:57:33 +02:00
docentYT
350123fb9e Replace ExchangeCharInString with std::ranges::replace 2026-05-01 00:43:22 +02:00
docentYT
ee3af0bf18 Change RandomInt to Random overload and reuse global random engine. 2026-05-01 00:25:16 +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
2ed1e63416 use glm instead of Math3D in editormode 2026-04-26 22:41:54 +02:00
docentYT
bdff45b584 use glm instead of Math3D in drivermode 2026-04-26 22:40:02 +02:00
7b82ab9502 Merge pull request #89 from jakubg1/dev
Fix a segfault when closing on Wayland
2026-04-14 20:46:55 +02:00
bc8c604e25 Add scenery name for eligible trivia in scenery loading uilayer 2026-04-14 20:39:43 +02:00
jakubg1
8a94bfbfa2 Fix a segfault when closing on Wayland
According to https://github.com/glfw/glfw/issues/2744, this will be fixed in GLFW 3.5.
2026-04-14 15:08:44 +02:00
jakubg1
407b187688 Tweak the door closing and warning signal delays
- The warning signal is no longer going to be played for an obnoxiously long amount of time by AI drivers when driving vehicles with a manual warning signal switch, most notably EN57.
  - A new `moveDepartureWarned` driving flag has been created to accomodate this behavior.
- Added the action time counter and the missing driving flags to the Vehicle AI section.
2026-04-04 00:13:26 +02:00
jerrrrycho
9f43dca48b refactor: create paths namespace instead of global variables 2026-03-15 11:55:30 +01: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