18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-27 21:45:16 +01:00
Commit Graph

3676 Commits

Author SHA1 Message Date
maj00r
68245f4fae Merge pull request #397 from MaSzyna-EU07/feat/doors-animation-per-door
feat: own kind of animation for a door wing in the .mmd (#70, point 1)
2026-11-18 01:19:30 +01:00
maj00r
dd919cc179 Merge pull request #398 from MaSzyna-EU07/feat/timetable-ai-flags
feat: timetable flags for the AI driver: central doors, doorstep, conductor, brake test (#95)
2026-11-18 01:19:16 +01:00
maj00r
0fdb4c78c8 Merge pull request #387 from MaSzyna-EU07/fix/brake-pipe-coupler-substep
fix(brakes): exchange the brake pipe air between vehicles after all of them stepped, in sub-steps
2026-11-18 01:19:01 +01:00
jerrrrycho
aa2200418a fix(doors): an animdoor entry without its } leaves the rest of the .mmd to be read
read_spec() took every token up to the end of the file into the block when the closing brace was
missing, so endmodels, sounds:, the lights and the rest were lost. The block now ends at the first
token that is neither a key nor the value right after one (or at endmodels), and that token is
put back for the caller.
build-feat-doors-animation-per-door
2026-11-17 10:06:41 +01:00
jerrrrycho
66b8a67361 fix(timetable): read the table from its start, bound the station index both ways
read_timetable() went on from the StationCount it was given and checked only the upper bound, so
TimeTable[StationCount] and TimeTable[StationCount - 1] could index out of the table (Sonar cpp:S3519).
It now resets the count and the table first, and checks both bounds before the next station.
build-feat-timetable-ai-flags
2026-11-17 08:54:50 +01:00
maj00r
bad94c96b5 Merge pull request #391 from MaSzyna-EU07/feat/split-cruise-control-and-shunting
feat: the cruise control apart from the field shunting (#69)
2026-11-17 03:13:43 +01:00
maj00r
2a22e4df1e Merge pull request #388 from MaSzyna-EU07/fix/feed-pipe-coupler-substep
fix(brakes): exchange the main reservoir pipe air between vehicles after all of them stepped, in sub-steps
build-fix-brake-pipe-coupler-substep
2026-11-17 03:13:17 +01:00
maj00r
a7b28cc1b8 Merge pull request #401 from MaSzyna-EU07/feat/universal-smooth-drag
feat: drag universal cab controls to any position with the mouse, opt-in per .mmd entry (#62)
2026-11-17 03:10:08 +01:00
maj00r
e1380e9b99 Merge pull request #365 from MaSzyna-EU07/refactor/sonar-localtime-goto
refactor: reentrant localtime and no goto in the cross switch lookup (Sonar S1912, S1909)
2026-11-17 03:06:03 +01:00
maj00r
332abc74df Merge pull request #337 from MaSzyna-EU07/test/scenario-cases-ge-reports
Scenario cases for the mission reports eu07/maszyna#421, #506, #524, #525
2026-11-17 03:05:35 +01:00
jerrrrycho
81bae7cdd4 feat: drag universal cab controls to any position with the mouse (#62)
A universal control (window, door, sun blind) whose definition in the .mmd
has the new optional key drag: can be dragged with the left mouse button to
any position between its ends, and stays where it is let go:

  universal1: { okno_p mov -0.71 0 0.3 drag: left soundinc: ... }

The value is the direction the mouse moves to open the control: up, down,
left or right (yes = up, no = off). The drag works like the sliders of the
controllers: the cursor is hidden, its move over 0.6 of the window height
takes the control from one end to the other. A click without dragging
toggles the control as before, and so do the keys: to the end farther from
where it is. Push controls aren't dragged. Without the key every universal
works as it did; none of the cab definitions has it yet.

New commands genericset0..29 set universal N to the position in param1
(0-1); the mouse sends them, and they can be bound to a gamepad axis.
The rules (the key's values, the move of the cursor along the direction,
the ends, click or drag, the keys) are in vehicle/universaldrag.h, with
unit tests.
build-feat-universal-smooth-drag
2026-11-17 01:42:49 +01:00
jerrrrycho
a3df3a07c8 test: count the shunting seconds in a function of its own, not a lambda holding the vehicle build-feat-split-cruise-control-and-shunting 2026-11-17 00:48:28 +01:00
jerrrrycho
aa84e41f09 feat: timetable service flags for the AI driver (eu07/maszyna#95)
A timetable can now tell the AI how the train is served, for trams,
underground trains and the like. The whole train gets them from a new
row of the first box of the header:

  [ Flagi AI | drzwi_centralne=tak,stopien=nie,kierownik=nie,proba_hamulca=nie ]

and a station changes them from there on with entries of its station
ware (the second line of the station, next to R2, ph, @):

  [       |     | po,kierownik=nie                 1  12.54  |        ]

- drzwi_centralne=tak: the driver opens all the doors from the cab,
  those of mixed control too (otherwise left to the passengers)
- stopien=tak/nie: the doorsteps switched on/off before the doors open
  (the AI didn't touch them before; new driver hints for it)
- kierownik=nie: no conductor, so no departure signal (direct or by
  radio) and no first door kept open for him before the departure
- proba_hamulca=nie: no running brake test

A flag left out keeps today's behaviour, so a timetable without flags
drives as before. Old builds skip the header row and keep the station
entries as station ware text (none starts with R or holds @, po, pt).

The reader moves out of TTrainParameters::LoadTTfile into
world/timetablereader.cpp (eu07_core) unchanged, so the tests can run it;
the flags come out of the station ware there. It now ends at the end of
the file with an error where the old one spun forever (a truncated file,
a missing number), and stops at 100 stations instead of writing past
the table.

Every .txt of the game's sceneries and of the SVN data reads the same
as with the old reader (compared field by field against a verbatim copy
of it); EU07_UNIT_TESTS_TIMETABLES=<scenery folder> reads them in the
unit tests and EU07_UNIT_TESTS_TIMETABLES_DUMP writes what was read.
2026-11-17 00:17:22 +01:00
jerrrrycho
8d2d9badb5 feat: own kind of animation for a door wing in the .mmd (eu07/maszyna#70)
A vehicle can now have door wings of different kinds on one side, e.g.
111Ainw (Bdhinu) with folding doors at one end and wider ones at the other.
A new optional entry in the models section of the .mmd:

  animdoor: <wing number> { type: <Shift|Rotate|Fold|Plug> range: <m or deg> rangeout: <m> }

gives one wing (door1, door2... of animdoorprefix) its own kind of
animation and range; the keys left out keep the values of the .fiz. The
wing still follows the door of its side: it is as far along its own range
as the door is along DoorMaxShift. The entry may come before or after
animdoorprefix; a faulty one is logged and the wing keeps the .fiz kind.

Wings without an entry get the same update functions as before, so the
existing vehicles, .mmd and .fiz files are unchanged. The door state, the
physics, AI, cab controls, sounds and exports are not touched.

The parsing and the wing position live in vehicle/doorwings.h, tested in
test_door_wings.cpp.
2026-11-16 23:36:26 +01:00
jerrrrycho
611dc365eb test: Sonar on the cruise control test: no empty statements, the lambda's captures named 2026-11-16 22:37:04 +01:00
jerrrrycho
dda38b6c0d feat: the cruise control apart from the field shunting (eu07/maszyna#69)
The secondary controller (ScndCtrl) is the switch of the cruise control
(SpeedCtrl) on the vehicles which have one: its first position switches
it on (IncScndCtrl), zero off (DecScndCtrl), and the speed buttons and
steps work only off its zero position. On the 6Dg, the ST45 and the
BR285, diesel-electrics with SpeedCtrl=Yes, the same controller shunts
the field of the traction motors by itself (AutoRelay), refuses the
driver's moves, and nothing could switch the cruise control on.

Now the cruise control has a switch of its own wherever the secondary
controller shunts the field (ElectricSeriesMotor, DieselElectric) or
there's none:

- IsSpeedCtrlSeparate(): which vehicles; IsSpeedCtrlEngaged(): on or
  off, SpeedCtrlUnit.IsActive for those, ScndCtrlPos > 0 for the rest;
- SpeedCtrlSwitch(): the driver's switch, on at the speed of the moment
  or off; on the others IncScndCtrl(1) / DecScndCtrl(2), as before;
- the buttons, the steps and the power limit go by IsSpeedCtrlEngaged(),
  the automatic turning off (SpeedCtrlATOF) by SpeedCtrlSwitch(false);
- the cab's tempomat_sw / tempomatoff_sw toggle it, and follow its state
  rather than the secondary controller's; the AI's SpeedCntrl() uses it.

The .fiz and .mmd formats are unchanged, with no new keys: the
SpeedControl section and the cab's scndctrl and tempomat_sw entries
stay as they are and now work side by side. Nothing changes for the
vehicles with only one of the two: the whole unit test suite matches
golden traces recorded before the change bit for bit.

Tests (test_speed_control.cpp): the field shunting of the EU07, SM42 and
SU45 and the cruise control of the Impuls and EU47 as before, the 6Dg's
and ST45's shunting as before, the 6Dg's and ST45's cruise control on
its own switch holding and changing the speed with the shunting going
on by itself, the 214M railbus switched by the secondary controller
through SpeedCtrlSwitch(). The 6Dg's definition joins
tests/unit/data/fiz as on test/6dg-power-steps-real-data.
2026-11-16 21:38:18 +01:00
jerrrrycho
c8f52c8b03 test: Sonar on the main reservoir pipe test: an integer step counter, const references, one declaration a line build-fix-feed-pipe-coupler-substep 2026-11-16 20:22:53 +01:00
jerrrrycho
8a185ee980 fix: exchange the main reservoir pipe air between vehicles after all of them stepped, in sub-steps
The main reservoir hoses (ctrain_scndpneumatic) exchanged the air explicitly inside each vehicle's step at the
physics step of 0.01 s, as the brake hoses did before eu07/maszyna#387. One step through the hose (0.38 of
area, whatever the vehicles) moves about 1.5 times the air which evens out the pipes on its ends (EN57 cars
8.3 l per bar against 5.5 l, SM40 8.6 against 5.7, passenger cars 9.3 against 6.3), and the vehicles with a
main reservoir of their own feed the pipe from it in the same step. Where a vehicle has both, and hoses on both
ends, the pipe can't settle: with all the main reservoirs held at 7.0 bar, the middle cars of a three unit EN57
kept jumping 0.8 bar to and fro between the steps for good (6.6/7.4), three SM40s in multiple traction the
same, a two unit Impuls 1.7 bar. Freely evening out, the reservoirs of a three unit EN57 took 13.9 s at 0.01 s
against 7.6 s at 0.001 s. A locomotive with passenger cars, whose pipe only it feeds, was stable already.

The main reservoir pipe now goes through the brake pipe's mechanism: UpdateScndPipePressure() leaves the hose
exchange to UpdatePipeCouplers() (GetScndDVc(), ScndPipeCouplersSubsteps(), 2 sub-steps for these vehicles),
which vehicle_table::update_brake_pipes() calls after every vehicle stepped. The two pipes share the code and
take their sub-steps apart, so the brake pipe's exchange is as it was. With it the EN57 pipes stand at 7.000,
and its reservoirs even out in 7.0 s against 7.5 s at 0.001 s.
2026-11-16 18:03:03 +01:00
jerrrrycho
c0bcdc23c7 fix: Sonar on the brake pipe sub-steps: no shadowed enumerator, const test helper, template callback 2026-11-16 17:35:42 +01:00
jerrrrycho
6ee2cc8eb8 fix: exchange the brake pipe air between vehicles after all of them stepped, in sub-steps
The air the brake hoses carry between the vehicles was taken explicitly inside each vehicle's step, at the
physics step of 0.01 s. Through the hose between two 14 m freight wagons (Spg 0.792, 11.5 l of pipe) one
step moved 11.8 l per bar, 2.06 times the 5.7 l that evens out the two pipes: the pipes overshot each other
in turns and settled into a pattern in which every distributor saw the pipe up to 0.28 bar off the pressure
left in it after the step. ESt3 valves charged at 5.0 bar saw 4.79 and lapped at the first stage, and the AI
of a standing freight train never got its brakes released (the report of eu07/maszyna#368).

The exchange now comes after every vehicle has stepped (vehicle_table::update_brake_pipes(), once per
physics iteration), for the vehicles which stepped their pipe, in as many sub-steps as keep the air a hose
carries in one below what evens out the pipes on its ends (3 for 14 m freight wagons, 2 for passenger
cars), each going through the vehicles in the order they step. The distributors see the pressure the pipe
holds, and an application reaches the end of the train as with a step of 0.001 s.
2026-11-16 13:24:06 +01:00
jerrrrycho
cff1232cce refactor: the dates of the scenery wizard and of the editor's backups through std::format, ranges all_of (Sonar S6229, S6197) build-refactor-sonar-localtime-goto 2026-11-16 07:25:04 +01:00
jerrrrycho
386a1df999 test(scenarios): with -j N a case clearing the physicslogs of the game dir runs alone, after the others build-test-scenario-cases-ge-reports 2026-11-16 07:00:31 +01:00
jerrrrycho
57c723a72e refactor: reentrant localtime and no goto in the cross switch lookup (Sonar S1912, S1909)
The date of the scenery wizard's .scn header and the stamp of the
editor's terrain backups use local_tm() (localtime_s/localtime_r)
instead of std::localtime. The goto out of the loop over the four
tracks of a cross switch, into the continue of the failed "ac"
assignment, becomes a std::all_of check which continues the outer
node loop, as the goto did.
2026-11-13 17:56:09 +01:00
maj00r
0371581049 Merge pull request #342 from MaSzyna-EU07/linux-curl
fix(ci): build the Linux game with libcurl, so the editor can downloa…
2026-11-13 16:10:47 +01:00
maj00r
59a9df6aa3 fix(ci): build the Linux game with libcurl, so the editor can download maps
The Linux job never installed libcurl's headers, so find_package(CURL QUIET)
missed it and the game was built without EU07_WITH_CURL: the editor showed
"no http client in this build" instead of the orthophoto, the terrain model
and the topo map. bundle_runtime_libs.cmake copies libcurl and its
dependencies next to the game with the other bundled libraries.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
build-linux-curl
2026-11-12 20:59:16 +01:00
jerrrrycho
2cd646dbb6 test(scenarios): the L053 poranek cases look for the uncoupling under the lower-case name the log writes 2026-11-12 06:59:56 +01:00
maj00r
39e8bcc59d fix(editor): the orthophoto shown one of three ways, the terrain made from the NMT under one rule and around the camera (#334)
* fix(editor): the orthophoto shown one of three ways, chosen in one place, and laid on the terrain without flicker

The settings of the orthophoto had two checkboxes ("Fit to terrain", "Covered by
objects and terrain") and three heights greyed out by turns, and the user couldn't
tell what they did. They're one choice now, each way told under it:

- over the view: drawn over everything, see-through, to compare with the map
- on the terrain, in the scene: tracks and models cover it, lit, the mouse
  places objects on it
- a flat sheet in the scene: for a scenery with no terrain yet

The lift is shown only where it matters (on the terrain, in the scene), the
height is named for what it is in each way ("where there's no ground"), and the
ways in the scene are greyed out with the Better Renderer, which doesn't show
them.

On the terrain in the scene the photos are a copy of the ground's triangles 5 cm
up, which the depth buffer lost further away: they flickered with the terrain
textures. Their shapes are decals now, drawn with a polygon offset towards the
camera (the depth is reversed, so a positive one) in every pass but the shadows.

The translations hold the strings of the terrain of the download area as well.

* fix(editor): the terrain made from the NMT under one rule, also around the camera within the download area

The download area didn't bring the terrain: the NMT squares in it were fetched
only once the model had been placed (its panel opened) and the scenery had
terrain open, and nothing told why. They're fetched from the area as it is now,
in PUWG 1992 already.

Where a chunk is made from the model where there's no terrain, the rule is one
for the track laid, the area and the buttons of the panel (nmt_chunk_offset):
beside terrain made from the model it goes on at its height over the model,
otherwise (terrain made by hand, or none) at the offset of the scenery; no chunk
is left out for what lies beside it. Before, the terrain under the track laid
needed terrain in the scenery and a chunk of it beside, gave up chunks for the
session otherwise, and the model was placed only by its panel.

The terrain of the area: "The terrain of the scenery around the camera" (on by
default, kept with the editor) makes the chunks missing in the area in a square
of 9 x 9 around the camera, the nearest first, as the camera goes. Light: a chunk
at most every 0.1 s and three times as long as it took left to the editor, after
the work with the model the user asked for; the step of the terrain history the
editor keeps open is closed around each chunk, as for the terrain grown while
laying. Not the whole area at once: the chunks made wait in memory to be saved.
The log tells what holds it.

The download of the area gives way to the squares asked for: a square of the
area being downloaded is broken off as one is asked for (the terrain under the
track laid) and taken up again later.

The map no longer covers the area with green over the tiles in the cache, only
the failed ones are red.

* fix(editor): the terrain under the tracks follows them again, a brush stroke keeps its undo, the area terrain timed

From the review of the terrain made from the NMT under one rule:

- The terrain drawn to the tracks place by place (under the tracks) took the
  height of the chunk beside it, carrying one offset along a run of chunks,
  metres off the tracks: nmt_chunk_offset gives the offsets of the tracks there
  again. The height the track laid goes on at (state.ahead) comes from the
  terrain grown under it only, not from the chunks of the buttons.
- A chunk of the area made during a stroke of the terrain brush closed the
  stroke's step of the history, and its undo lost the part brushed before: the
  area terrain waits for the stroke to end.
- In a scenery with no name yet the terrain under the track laid was asked for
  and dropped every half a second, the log filled: nothing is asked for there.

The log tells how long the chunks of the square around the camera took, and the
self-test sets the area terrain on or off for its run (nmtsettings area 0|1).
Measured on lukow.scn: 1.3-1.5 ms a chunk, 2.2 ms the longest; the longest frame
17 ms against 10 ms without it, none over 33 ms.

* fix(editor): the selftest turns the area terrain on or off for its run only, the setting kept

---------

Co-authored-by: maj00r <maj00r@host>
2026-11-12 05:04:14 +01:00
jerrrrycho
ca23831bb2 test(scenarios): cases from the reports eu07/maszyna#421, #506, #524, #525
Six slow cases, each a mission of a scenery of the game with every train driven by AI:
- wrzosy_pxe336080_couples (#524): the locomotive, given the orders the player's hands stand
  for, couples to the rake in the Wolica depot and takes it out. Passes.
- baltyk_skm1_roj55324_shunting_signal, baltyk_skm1_roj55321_departure (#525): the unit on the
  siding gets its shunting signal once the shunter beside it has moved, the one in the platform
  leaves on time. Pass, with 4 and 3 seeds.
- l053_poranek_tme222158_debica (#421): xfail, the train is never let into Debica: the AI of
  another locomotive passes the shunting signal Tm4 at stop and the station waits for it for good.
- l053_poranek_tme222158_debica_et21 (#421, with the ET21 of the report): xfail, the ET21 stops
  past the end of the overhead wire at Debica Towarowa and its driver never restarts it.
- l053_poludnie_roj32134_debica (#506): both trains of the mission run and end at Debica. Passes.
2026-11-12 04:47:03 +01:00
jerrrrycho
633b97d21c test(scenarios): cases on a mission of a scenery, slow and xfail marks, --seed
A case can now run one of the base scenery's own missions among its traffic:
- vehicle: the train under test is a vehicle of the base scenery (with strip_trainsets false),
  the fragment becomes optional,
- replace: literal replacements in the base scenery, e.g. another locomotive on a mission,
- physicslog false: no physicslogs and no black box, for a scenery with dozens of AI trains;
  the case then has the result of the test mode and the log checks only,
- on such a case the runner doesn't wait for physicslog rows nor give up on a bad vehicle of the
  scenery, and removes the physicslogs the other trains wrote; with file.binary.terrain no in
  ini it leaves no geometry cache behind,
- slow: skipped by the default sweep, run by name or with --slow,
- xfail: a known, reported failure is XFAIL and keeps the run green, a pass is XPASS and fails it,
- --seed: the seed of the simulator's random numbers for a run, for bugs that show up sometimes.

The couples check takes vehicle names in any case (the simulator reads them in lower case), and
the physicslog is no longer read four times a second once it has rows.
2026-11-12 04:47:02 +01:00
jerrrrycho
bf8c33ff6a Merge remote-tracking branch 'origin/master' into test/scenario-cases-ge-reports 2026-11-12 03:39:15 +01:00
maj00r
bac9954ad5 Merge pull request #333 from MaSzyna-EU07/test/parser-utilities-ladderlogic-coverage
Unit tests for the parser, the utilities and the PLC; coverage of the rest of the core library
2026-11-11 23:27:01 +01:00
maj00r
ba68c9ea07 Merge pull request #276 from MaSzyna-EU07/fix/et42-fans-compressor-lamps-et22-louvre
ET42: line contactors interlocked with the section fans, fan lamp of the own section; ET22: louvre lamp
2026-11-11 23:26:46 +01:00
maj00r
71c5d50ff5 Merge pull request #314 from miloszunio/pr/ground-ray
fix(editor): the points of the terrain tools put on the ground along the ray through the cursor in this frame
2026-11-11 23:13:08 +01:00
maj00r
3a691131bb Merge pull request #309 from miloszunio/pr/streams-cursor
feat(editor): the cursor drawn into the picture, for streams and recordings of the window
2026-11-11 23:12:54 +01:00
jerrrrycho
6d9a2bdd9b Merge remote-tracking branch 'origin/master' into fix/et42-fans-compressor-lamps-et22-louvre
Conflict in McZapkie/Mover.cpp, MotorBlowersCheck(): the blower's power source stays in
MotorBlowerPowerIsAvailable(), which for a blower on the main circuit now asks
MainCircuitPowered() instead of Mains (PantRequiresMain, #272), so the line contactors
interlock sees it too. MotorConnectorsCheck() merged by itself: master's undervoltage
relay in connectorsoff, and LineContactorsInterlockReleased() on the return.
build-fix-et42-fans-compressor-lamps-et22-louvre
2026-11-11 22:53:50 +01:00
maj00r
34eeca61f8 Merge pull request #326 from MaSzyna-EU07/test/automatic-coupler-scenarios-master
test(scenarios): automatic coupler cases (re-lands #288)
2026-11-11 22:41:42 +01:00
maj00r
e59b69462b Merge pull request #272 from MaSzyna-EU07/feat/mains-before-pantographs
Line breaker before the pantographs (`Cntrl.PantRequiresMain`)
2026-11-11 22:41:28 +01:00
jerrrrycho
cce66422a3 docs: coverage of the rest of the core library, and what its tests found
The lines run of the files besides the physics, from the Coverage run of #325, what of the parser, the helpers and the PLC stays untested and what nothing in the game calls, and the behaviour the new tests recorded which may deserve a look.
build-test-parser-utilities-ladderlogic-coverage
2026-11-11 22:40:03 +01:00
jerrrrycho
a53fed0a6f test: characterize the PLC of the vehicles
Programs of ladder logic made up for the tests: loading, the operations, timers and counters of scripting/ladderlogic.cpp. The game doesn't load a program into the controller yet.
2026-11-11 22:40:02 +01:00
jerrrrycho
5764692e89 test: characterize the helpers of utilities
The texts, numbers, random numbers, file names and times of utilities.cpp and utilities.h as they behave now. The table of Bezogonkow() is checked as the build has it: one byte for its plus-minus sign with MSVC, two with GCC and Clang, which give other letters.
2026-11-11 22:40:02 +01:00
jerrrrycho
2f13f052f7 test: characterize the parser of the text files
The tokens, comments, quotes, parameters and include directives of cParser, its numbers and its place in the text, as they behave now, with the files of the tests made in a folder of the build (scratch.h). The helpers of utilities.h which read from a parser are here too.
2026-11-11 22:40:02 +01:00
Claude
4ef4a30ef9 fix(editor): the cursor off the terrain on the ground only where the depth read hit something (Mouse_Hit), not where its offset isn't zero
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DDcMn1Q7wdYkbxDUWscNHZ
2026-11-11 22:29:04 +01:00
Claude
9a4d5a4688 fix(editor): the ray to the terrain doesn't come up under a chunk through a gap, and starts behind the camera in the top view
Coming down where there's no terrain and finding itself under the ground of the next chunk, the ray gives up and the depth
read back says where the ground is. In the top view it starts 10 km behind the plane of the camera, as far as the view sees,
so the ground higher than the camera is met too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DDcMn1Q7wdYkbxDUWscNHZ
2026-11-11 22:28:18 +01:00
Claude
f1f315d629 fix(editor): the points of the terrain tools put on the ground along the ray through the cursor in this frame
The terrain tools (the outlines of Fill, water and chunks, the target height, the brushes) and the area fill took their point
from the depth read back under the cursor. That depth is a frame late, so the point was off while the camera or the cursor
moved, and it stops at whatever is drawn over the ground (models, the 3D grass), at a grazing angle metres away from where
the ground is. Now the ray through the cursor as it is in this frame is followed to the terrain (terrain_streamer::raycast);
the depth read back is used only where the ray meets no terrain. The brush circle is drawn where the stroke will land.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DDcMn1Q7wdYkbxDUWscNHZ
2026-11-11 22:28:18 +01:00
maj00r
c2ea47648b Merge pull request #325 from MaSzyna-EU07/feat/ci-unit-test-coverage
CI: coverage of the core library by the unit tests
2026-11-11 22:25:27 +01:00
Claude
b691ef4d20 fix(editor): the drawn cursor is the editor's: off when it's left, back on when it's entered
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DDcMn1Q7wdYkbxDUWscNHZ
2026-11-11 22:21:41 +01:00
Claude
be7f9e4712 feat(editor): the cursor drawn into the picture, for streams and recordings of the window
View > Cursor drawn into the picture (streams): the system pointer is hidden and ImGui draws its own into the frame, so it shows
in a capture of the window (Discord, OBS, the capture of the system), which leaves the system pointer out. Off by default.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DDcMn1Q7wdYkbxDUWscNHZ
2026-11-11 22:21:27 +01:00
jerrrrycho
b19ee54ded Merge remote-tracking branch 'origin/test/automatic-coupler-scenarios-master' into test/scenario-cases-ge-reports 2026-11-11 22:09:03 +01:00
jerrrrycho
226eaabb7b fix: behind a line breaker closed ahead of the pantographs the main circuit still needs the voltage
Review of #272. The closed line breaker used to mean there's traction
voltage, the undervoltage trip opening it without one. With
PantRequiresMain=Yes it closes on the battery and holds without voltage,
so everything that took Mains for "the main circuit is live" ran with the
pantographs down, lowered for a section, or under a dead catenary.

- MainCircuitPowered(): the line breaker closed, and on a vehicle with
  PantRequiresMain and current collectors also the voltage at least MinV
  (what the undervoltage trip takes). For every other vehicle it is Mains.
  It feeds the converter (and through it the 110 V and a compressor on
  it), a compressor on the main circuit, the heating from the main
  circuit, the motor blowers, the blowers of the starting resistors, the
  current of the series motors and the induction motor drive.
- The undervoltage relay of such a vehicle opens the line contactors, as
  the line breaker opening did elsewhere: the camshaft goes back to zero
  and the motors get no current, also not the generator current a closed
  circuit without voltage gave. The relay picks up again with the voltage
  back and the master controller at zero or the first position, so the
  start begins anew instead of the camshaft running back up to the
  position left on the controller.

Vehicles without the key are unchanged: the golden traces recorded before
the change compare exactly.
build-feat-mains-before-pantographs
2026-11-11 21:54:20 +01:00
jerrrrycho
5d46478fa9 Merge remote-tracking branch 'origin/master' into test/parser-utilities-ladderlogic-coverage 2026-11-11 21:44:30 +01:00