From 0aa1e2d4b6e83381a462cfefb7a43cb6c81829e5 Mon Sep 17 00:00:00 2001 From: Hirek193 Date: Fri, 23 Oct 2026 17:54:05 +0200 Subject: [PATCH] perf(debug): forces and update of the vehicles by kind in the debug panel: rail and road, within 1 km of the camera and farther, with the counts of vehicles and of the ones standing still --- vehicle/DynObj.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vehicle/DynObj.cpp b/vehicle/DynObj.cpp index b17f5fcf..10eb79dc 100644 --- a/vehicle/DynObj.cpp +++ b/vehicle/DynObj.cpp @@ -8623,8 +8623,8 @@ vehicle_table::update( double Deltatime, int Iterationcount ) { for( std::size_t index = 0; index < m_items.size(); ++index ) { auto const *vehicle { m_items[ index ] }; auto const road { ( vehicle->MoverParameters->CategoryFlag & 2 ) != 0 }; - auto const far { glm::length2( vehicle->GetPosition() - camera ) > Timer::subsystem.VEHICLE_NEAR * Timer::subsystem.VEHICLE_NEAR }; - kinds[ index ] = static_cast( ( road ? 2 : 0 ) + ( far ? 1 : 0 ) ); + auto const distant { glm::length2( vehicle->GetPosition() - camera ) > Timer::subsystem.VEHICLE_NEAR * Timer::subsystem.VEHICLE_NEAR }; + kinds[ index ] = static_cast( ( road ? 2 : 0 ) + ( distant ? 1 : 0 ) ); if( false == vehicle->bEnabled ) { continue; } ++counts.kind[ kinds[ index ] ]; if( vehicle->MoverParameters->Vel < 0.01 ) { ++counts.standing[ kinds[ index ] ]; }