mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-03-22 15:05:03 +01:00
don't update rain during pause
This commit is contained in:
11
renderer.cpp
11
renderer.cpp
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user