mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-12-03 06:35:21 +01:00
perf(vehicle): no AI stopwatch in test mode
updateDriver() timed each driver's update for the debug panel (Timer::subsystem.vehicles_ai), which reads the clock twice per vehicle with a driver, every physics step. The test mode has no panel to show it on; there the update runs untimed. The clock reads were 0.8% of the main thread on Tomaszewo. Outside the test mode nothing changes.
This commit is contained in:
@@ -323,6 +323,12 @@ void TDynamicObject::updateDriver( double const dt1 )
|
||||
distributeInductionBraking( dt1 );
|
||||
}
|
||||
|
||||
// the time the AI takes is for the debug panel of the renderer. the test mode shows none, and the clock read twice for each
|
||||
// vehicle with a driver, every step, is a part of its frame worth saving
|
||||
if( Global.test.enabled ) {
|
||||
Mechanik->Update(dt1); // przebłyski świadomości AI
|
||||
return;
|
||||
}
|
||||
Timer::subsystem.vehicles_ai.start();
|
||||
Mechanik->Update(dt1); // przebłyski świadomości AI
|
||||
Timer::subsystem.vehicles_ai.stop();
|
||||
|
||||
Reference in New Issue
Block a user