17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-30 14:20:28 +01:00
Commit Graph

14 Commits

Author SHA1 Message Date
maj00r
4512ed4e0b fix(editor): guard the places where the editor could crash outright
Found with an address and undefined behaviour sanitizer build, random
monkey sessions on the test sceneries and broken inputs:

- A deleted model left its pointer in the pick list of the renderer, the
  bound node of the panels, the bindings of the infrastructure and the
  selection: the next pick or panel frame read freed memory. The renderer
  forgets it, and one erase_model does the cleaning for all the places
  which deleted a model by hand.
- The plan band of a route read the vertex before the first one in the
  frame a drag was let go.
- A scenery which can't be opened goes back to the launcher with the
  reason in the log, a track of an unknown type or a tributary loads as
  a normal track or a river with a message, and a spline with no finite
  length or step gets a sane number of segments.
- Typed numbers which aren't (NaN, inf, ends 0 m or 1000 km apart, a
  vector of 1e30, a diverging track part of 5 km, a curve threshold of 0,
  a zero history size, radius norms below zero) are refused or clamped,
  where they made the geometry run away or divide by zero.
- Folders which can't be read and file names which aren't valid in the
  locale no longer throw out of the scans of sceneries, textures, sweeps,
  roads and signal plates; the scans skip them.
- The launcher: Ctrl+Del with no trainset selected, a dropped vehicle
  whose skin is gone and a text with a percent sign.
- A terrain mesh made for another resolution of its chunk isn't put into
  the chunk, and a slot is reused only for a mesh of the same size.
- Vehicles on a track changed by the editor are moved over a copy of the
  list they leave.
- The table of the keyboard shortcuts gives its stretched column a
  weight, else ImGui divides 0 by 0 in the first frame of the window.
2026-10-21 08:42:29 +02:00
maj00r
978b99b7e5 feat(scenery): models laid along curves (sweep nodes), bent to follow the paths or repeated along them, loaded and saved with the scenery; trainsets put on a path while the simulation runs; trainset turned around by reversed after its header: the first vehicle stays at the offset and leads towards point 1, the rest stands behind it; launcher keeps reversed trainsets and can turn one around; memory cells saved with the new name of the path they name; events tell their targets and the events of a multiple event; renderer tells whether the cursor is over a surface; vehicle placed in the editor entered when the driving goes on 2026-10-06 22:19:32 +02:00
jerrrrycho
d85096f64d reformat: remove redundant parentheses 2026-06-30 21:19:46 +02:00
docentYT
bd21b8f49c Replace string_starts_with and string_ends_with with string::starts_with and string::ends_with 2026-05-01 13:33:32 +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
jakubg1
c83c123596 Add scenery category detection, launcher category list parity with Starter 2025-09-04 18:01:48 +02:00
milek7
078cbdb71b show file in scenery scanner errors 2020-03-29 21:56:36 +02:00
milek7
f7ac7cc581 launcher link start fix, assume scn files in win1250 2019-09-01 17:41:23 +02:00
milek7
aa9bee57da further WIP on launcher 2019-08-24 01:28:55 +02:00
milek7
2bcdb36df1 further work on launcher 2019-08-21 17:18:39 +02:00
milek7
bd850655a9 scenery parser work 2019-08-10 22:52:23 +02:00
milek7
4489aa31ee more work at parsing trainsets in launcher 2019-08-10 15:16:38 +02:00
milek7
da6343166a scn parsing with directive and trainset matching 2019-08-10 12:00:37 +02:00
milek7
1626864bfe cleanup 2019-08-09 00:45:38 +02:00