From b421550cbedf4939fe8935787e6d7494c2034ef7 Mon Sep 17 00:00:00 2001 From: maj00r Date: Sun, 15 Nov 2026 23:56:30 +0100 Subject: [PATCH] fix(physicslog): a train's log begun at its first line, so passive crews get no file Every crew is primary in the constructor and the drivers but one of a train with crews in more vehicles are made passive only before it starts, so a log begun there left files with only the header. With physicslog on all logs begin at once as before; one of a train waits for update_logs. --- vehicle/Driver.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/vehicle/Driver.cpp b/vehicle/Driver.cpp index 03c3f9d8f..23d778bdb 100644 --- a/vehicle/Driver.cpp +++ b/vehicle/Driver.cpp @@ -2337,7 +2337,10 @@ TController::TController(bool AI, TDynamicObject *NewControll, bool InitPsyche, SetDriverPsyche(); // na końcu, bo wymaga ustawienia zmiennych TableClear(); - if( writes_physicslog() ) { + // the logs of all, begun at once as they always were. one of a train only at its first line (update_logs): every + // crew is made primary here, and the drivers but one of a train with crews in more vehicles are made passive + // before it starts, so they get no file with only the header + if( WriteLogFlag ) { begin_physicslog(); } @@ -6471,8 +6474,8 @@ void TController::update_logs( double const dt ) { // log vehicle data if( false == writes_physicslog() ) { - // not counted while it isn't logged: a driver which begins to, made primary, writes a line every 0.05 s - // from then on, not one each update to make up for the time before + // not counted while it isn't logged (the driver of a road vehicle, or no logs on): were the logs turned on, + // it would write a line every 0.05 s from then on, not one each update to make up for the time before LastUpdatedTime = 0.0; return; }