Just return if nullptr
This commit is contained in:
parent
677aa7a398
commit
f394a15406
|
@ -1188,14 +1188,14 @@ void JoltPhysicsEnvironment::GetPerformanceSettings( physics_performanceparams_t
|
||||||
|
|
||||||
void JoltPhysicsEnvironment::SetPerformanceSettings( const physics_performanceparams_t *pSettings )
|
void JoltPhysicsEnvironment::SetPerformanceSettings( const physics_performanceparams_t *pSettings )
|
||||||
{
|
{
|
||||||
if ( pSettings )
|
if ( !pSettings )
|
||||||
{
|
return;
|
||||||
|
|
||||||
m_PerformanceParams = *pSettings;
|
m_PerformanceParams = *pSettings;
|
||||||
|
|
||||||
// Normalize these values to match VPhysics behaviour.
|
// Normalize these values to match VPhysics behaviour.
|
||||||
m_PerformanceParams.minFrictionMass = Clamp( m_PerformanceParams.minFrictionMass, 1.0f, VPHYSICS_MAX_MASS );
|
m_PerformanceParams.minFrictionMass = Clamp( m_PerformanceParams.minFrictionMass, 1.0f, VPHYSICS_MAX_MASS );
|
||||||
m_PerformanceParams.maxFrictionMass = Clamp( m_PerformanceParams.maxFrictionMass, 1.0f, VPHYSICS_MAX_MASS );
|
m_PerformanceParams.maxFrictionMass = Clamp( m_PerformanceParams.maxFrictionMass, 1.0f, VPHYSICS_MAX_MASS );
|
||||||
}
|
|
||||||
|
|
||||||
m_PhysicsSystem.GetBodies(m_CachedBodies);
|
m_PhysicsSystem.GetBodies(m_CachedBodies);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue