mirror of
https://github.com/celisej567/source-engine.git
synced 2026-01-05 22:09:59 +03:00
fix address sanitizer issues #2
This commit is contained in:
@@ -647,8 +647,6 @@ void CPhysicsObject::SetInertia( const Vector &inertia )
|
||||
ri.k[1] = IVP_Inline_Math::fabsd(ri.k[1]);
|
||||
ri.k[2] = IVP_Inline_Math::fabsd(ri.k[2]);
|
||||
|
||||
if( ri.k[0] > 1e14f ) ri.k[0] = 1e14f; if( ri.k[1] > 1e14f ) ri.k[1] = 1e14f; if( ri.k[2] > 1e14f ) ri.k[2] = 1e14f;
|
||||
|
||||
m_pObject->get_core()->set_rotation_inertia( &ri );
|
||||
}
|
||||
|
||||
|
||||
@@ -174,8 +174,7 @@ void CVPhysicsParse::ParseSolid( solid_t *pSolid, IVPhysicsKeyHandler *unknownKe
|
||||
}
|
||||
else if ( !Q_stricmp( key, "inertia" ) )
|
||||
{
|
||||
float inertia = atof(value);
|
||||
pSolid->params.inertia = (inertia > 1e14f) ? 1e14f : inertia;
|
||||
pSolid->params.inertia = atof(value);
|
||||
}
|
||||
else if ( !Q_stricmp( key, "damping" ) )
|
||||
{
|
||||
@@ -469,8 +468,7 @@ void CVPhysicsParse::ParseVehicleWheel( vehicle_wheelparams_t &wheel )
|
||||
}
|
||||
else if ( !Q_stricmp( key, "inertia" ) )
|
||||
{
|
||||
float inertia = atof(value);
|
||||
wheel.inertia = (inertia > 1e14f) ? 1e14f : inertia;
|
||||
wheel.inertia = atof(value);
|
||||
}
|
||||
else if ( !Q_stricmp( key, "damping" ) )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user