diff --git a/DynObj.cpp b/DynObj.cpp index e983c8ef..dd6c530d 100644 --- a/DynObj.cpp +++ b/DynObj.cpp @@ -3038,7 +3038,7 @@ bool TDynamicObject::Update(double dt, double dt1) ErrorLog( "Bad traction: " + MoverParameters->Name + " lost power for " + to_string( NoVoltTime, 2 ) + " sec. at " - + to_string( glm::dvec3{ vPosition } ) ); + + to_string( glm::dvec3{ vPosition } ), logtype::traction ); } } } diff --git a/Logs.h b/Logs.h index 9de3fa74..a2582367 100644 --- a/Logs.h +++ b/Logs.h @@ -20,6 +20,7 @@ enum class logtype : unsigned int { shader = ( 1 << 6 ), net = ( 1 << 7 ), sound = ( 1 << 8 ), + traction = ( 1 << 9 ), }; void WriteLog( const char *str, logtype const Type = logtype::generic ); diff --git a/scene.cpp b/scene.cpp index 7c58cdc9..0b0b84da 100644 --- a/scene.cpp +++ b/scene.cpp @@ -88,9 +88,8 @@ basic_cell::update_traction( TDynamicObject *Vehicle, int const Pantographindex // liczba pantografów teraz będzie mniejsza --Vehicle->MoverParameters->EnginePowerSource.CollectorParameters.CollectorsNo; } - if( DebugModeFlag ) { - ErrorLog( "Bad traction: " + Vehicle->name() + " broke pantograph at " + to_string( pantographposition ) ); - } + ErrorLog( "Bad traction: " + Vehicle->name() + " broke pantograph at " + to_string( pantographposition ), logtype::traction ); + } } else if( fVertical < pantograph->PantTraction ) {