A driver without movePrimary no longer just idles. UpdateSecondary() cuts
BrakeValveActive so a secondary AI stops fighting the primary over the brake
pipe, and - as long as no driver in the consist has iEngineActive - keeps
scanning ahead of CabOccupied, so it can take movePrimary and start the engine
once a signal permits.
scan_route() orients by CabOccupied when DirActive is 0, and
ClaimConsistPrimary() clears movePrimary on every other driver in the consist,
then calls TableClear() and CheckVehicles(), so sSpeedTable is rebuilt for the
new front and ctOwner follows it.
- walk the consist with FirstFind()/Neighbour() instead of Next()/Prev(), which
stopped at the starting vehicle and mishandled reversed members;
- ReassignConsistPrimary() picks a single driver after any coupling change,
both from TDynamicObject::couple() and from the AI path;
- IsOccupiedByAnotherConsist() decides membership with BelongsToConsist() and
takes a signed distance, so a consist left behind no longer cuts the scan
short. DistanceToAnotherConsist() hands back the gap it already computes, so
OtherConsistAtSignal() counts a foreign vehicle only while it stands closer
than the signal itself, instead of comparing track starts;
- TSpeedPos::Set() marks an entry with spNotOurShuntSignal when a
spShuntSemaphor was already permitting as the entry was added. A shunting
signal does not address its permission to a particular consist, so a dormant
driver does not wake up on a permission it did not see light up; the flag
drops once the signal shows stop, so its own turn is never blocked. spSemaphor
is excluded: a semaphore sets a route for us and permits us even when found
already lit. The check reads SemPermitIndex - the entry that produced the
permitting command - because SemNextIndex can point at an earlier signal.
The flag is also stamped whenever the permission turns out to belong to a
consist standing in front of us - both where TableUpdateEvent() already knows
the signal is for the vehicle ahead, and in check_route_ahead() - so the
addressee pulling away does not hand the still-lit signal over to whoever
waited behind it;
- the scantable debug panel lists the flags by name (spNotOurShuntSignal shows
as not-ours) and folds the nearest vehicle ahead into the table by its own
distance.
Consolidates platform-specific config-directory logic (APPDATA on Windows,
~/Library/Application Support on macOS, ~/.config on Linux) into a single
user_config_path(filename) function in utilities/utilities.{cpp,h}, removing
copy-pasted #ifdef blocks from application.cpp, editor/editorSettings.cpp,
input/{keyboard,gamepad,drivermouse,uart}input.cpp.
Pressing Alt toggles picking mode. This is fine for keyboard and mouse usage,
but some use cases, such as disabling picking mode when a finger is placed
on a thumbstick and enabling it back when it's lifted, require finer control.
Allow to always enable picking mode when pressing Alt with Shift, and to always
disable picking mode when pressing Alt with Ctrl.
- 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.