don't update rain during pause

This commit is contained in:
milek7
2018-10-18 22:46:51 +02:00
parent 1761f0b367
commit e3cfa2acbe
3 changed files with 11 additions and 4 deletions

View File

@@ -2797,12 +2797,17 @@ void opengl_renderer::Render_precipitation()
::glRotated(roll, forward.x, 0.0, forward.z);
}
}
if (Global.Weather == "rain:")
if (!Global.iPause)
{
// oddly enough random streaks produce more natural looking rain than ones the eye can follow
::glRotated(Random() * 360, 0.0, 1.0, 0.0);
if (Global.Weather == "rain:")
// oddly enough random streaks produce more natural looking rain than ones the eye can follow
m_precipitationrotation = Random() * 360;
else
m_precipitationrotation = 0.0;
}
::glRotated(m_precipitationrotation, 0.0, 1.0, 0.0);
model_ubs.set_modelview(OpenGLMatrices.data(GL_MODELVIEW));
model_ubs.param[0] = interpolate(0.5f * (Global.DayLight.diffuse + Global.DayLight.ambient), colors::white, 0.5f * clamp<float>(Global.fLuminance, 0.f, 1.f));
model_ubs.param[1].x = simulation::Environment.m_precipitation.get_textureoffset();