Fixed compiler warnings.

This commit is contained in:
hiker 2017-03-17 15:56:47 +11:00
parent 9a5eec3761
commit 6ac6d9ebfe

View File

@ -2348,13 +2348,13 @@ void Kart::updateEngineSFX(float dt)
if (fc>1.0f) fc = 1.0f;
float gears = 3.0f * fmod(fc, 0.333334f);
assert(!std::isnan(f));
m_last_factor_engine_sound = (0.9*f + gears) * 0.35f;
m_last_factor_engine_sound = (0.9f*f + gears) * 0.35f;
m_engine_sound->setSpeedPosition(0.6f + m_last_factor_engine_sound, getXYZ());
}
else
{
// When flying, reduce progressively the sound engine (since we can't accelerate)
m_last_factor_engine_sound *= (1.0f-0.1*dt);
m_last_factor_engine_sound *= (1.0f-0.1f*dt);
m_engine_sound->setSpeedPosition(0.6f + m_last_factor_engine_sound, getXYZ());
if (m_speed < 0.1f) m_last_factor_engine_sound = 0.0f;
}