The click takes the point by the ground clicked, then the piece or the junction under the cursor; the point nearest on the
screen only when there's none, no farther than what is under the cursor and a bit beyond it, by whole pixels first and
the range then, so the order of the roads doesn't decide. The ends of the pieces are gone through without looking for the
repeated ones (editor_road::each_joint), joints() isn't needed. Esc, the road window closed, another tool or the track work
area drop the drag; Ctrl+Z and Ctrl+Y wait for its end.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DDcMn1Q7wdYkbxDUWscNHZ
* feat(blackbox): a recorder of the run, the cab, the signals and the stations to a file
With the physics logs on (and the new eu07.ini setting blackbox, on by
default), the simulator writes a black box of the session to
physicslog/*.blackbox: the scenery map (tracks, signals, W4 stop points
with their heading, W6 horn points), the timetables of the user's train,
and at 10 Hz the cab of the vehicle the user sits in (speed, controllers,
brakes, pressures, lights with the pattern the run asks for, the movement
kind), the AI's reference for the same place (target speed, next limit,
braking distance), the consist, the cameras and the vehicles around.
Changes go in as they happen: switches, signal aspects, commands,
signals passed with their aspect, stations stopped at, passed or missed,
horn requests, the autopilot switched on or off, couplings and vehicles
removed.
The driving aid's next speed limit moved from the UI panel to
TController::next_speed_limit(), so the panel and the recorder read the
same. The format is described in blackbox_doc.md; the writer and the
reader of the records have unit tests.
* fix(blackbox): the aspect a signal had when passed, the lamps the ends have, vehicles taken off
- A passed signal is written with the aspect the train had of it, kept in
the speed table, not the one its memory cell shows when the pass is
noticed: by then the train itself on the track behind has often set
it to stop, and most passes were written as at stop.
- The cab record gains the lamps the vehicles at the head and the tail
have at their outer ends (136 bytes), so a reader can check the light
pattern against them as the driver does (no upper headlight, the
auxiliary lamps, the rear-end signals only).
- A vehicle taken off the scenery and still pointed at by a coupler or
the camera gets no new number; the camera lets go of it.
- The timetable written before a station goes under the vehicle the
user is in now, not the one of the last look.
- The file buffer is given once the file is open: MSVC passed over one
given before.
- The doc tells the AI fields before the consist is started and when
entering a vehicle is a driver change.
* fix(blackbox): the stop of an automatic block signal passed is written as a stop
The speed table keeps the stop of an automatic block signal (SetVelocity 0 x) as the speed allowed after it, with spStopOnSBL; a pass of it was written as that speed with no flag. It is written as 0 with the flag of an automatic block stop again.
* feat(blackbox): the doors, the brakes of the whole train, a diesel's engine and the rest of the cab
The cab record grows from 136 to 190 bytes, so that a reader can check
everything the driver did:
- the doors: the permits on each side, the departure signal, the steps,
the door lock and whether the doors are locked;
- the brakes: the equalizing reservoir of the driver's valve, the main
reservoir pipe, the highest brake cylinder pressure of the train, the
hand brake, the releaser, the setting (G/P/R/Mg) and the mode
(PS/PN/EP/MED);
- what drives the vehicle (electric, induction, diesel, diesel-electric,
steam, none), its power, a diesel's oil pressure, water, oil and engine
temperatures, overheating, fuel and oil pumps, clutch and torque
converter, the motor fans;
- the cruise control and its speed, the integrated driving handle of a
unit, the radio channel, the horn's tones.
New device bits use the upper half of the 32-bit field; the new fields
come at the end of the record, so older readers still read it.
* fix(blackbox): the driver's valve field is what its gauge shows, the radio channel has no none
Handle->GetCP() is the equalizing reservoir of most valves but the time reservoir of the FV4a, empty but after an overcharge: the field is named and documented as what the valve shows. With no driver the radio channel reads as the first one, not 0.
---------
Co-authored-by: maj00r <maj00r@host>
The points where the pieces of a road meet were picked only by the ground clicked: one more than 3 m above or below the
ground under the cursor (a road taken down into a cutting, under an embankment) couldn't be picked again. Now the point
nearest to the cursor on the screen (within 12 px, the one nearer to the camera of those about as near) is picked first,
the ground as before after it.
Alt+LMB on a point and dragging up or down changes the height of the selected points (Ctrl: ten times finer); the change
shows as yellow lines and a label by the cursor while dragging, and is applied, as one step of the history, when the button
is let go.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DDcMn1Q7wdYkbxDUWscNHZ
The angles of the whole gizmo matrix were decomposed every frame and the model was turned by their difference from its own.
The decomposition gives the angle about the vertical axis only within -90..90 degrees: past 90 it comes out as 180 - angle
with the other two axes turned by 180, so a drag one way turned the model back and flipped it. The turn is now taken from
the delta matrix of this frame (small, so its angles decompose with no ambiguity) and wrapped to -180..180.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DDcMn1Q7wdYkbxDUWscNHZ
- Terrain work mode shows a browser of the textures folder in place of the
node bank; textures/materials can be dragged onto the palette entries
(replacing the material), the material field and the water material field
- Ctrl+Z/Ctrl+Y for heightmap terrain changes: a brush stroke or an
operation is one step of the editor history
- Ground conversion reads only the files of the terrain directives
(.txtf with origin/rotate, or .btf without text), paints the chunks with
the materials of the triangles, drops only the shapes of those files
- Fix: ground grids converted out-of-range floats to int, so whole-scene
queries returned the triangles of a single cell (shifted chunks)
- Fix: terrain layers copied from textures already uploaded without their
data stayed grey
- Fix: ImGui ID conflict between terrain tool radios and section headers
- Fix: layers of terrain .txtf files named with the scenery/ prefix and
could not be saved
- Editor selftest commands for the terrain