Merge pull request #1484 from drummyfish/master

fix rain ripple bug
pull/303/head
scrawl 7 years ago committed by GitHub
commit 77ddaa869b

@ -504,6 +504,9 @@ namespace MWRender
mWater->update(dt);
}
if (!mSky->isEnabled() || !mSky->hasRain())
clearRainRipples();
mCamera->update(dt, paused);
osg::Vec3f focal, cameraPos;
@ -803,7 +806,11 @@ namespace MWRender
{
mEffectManager->clear();
mWater->clearRipples();
mUniformRainIntensity->set((float) 0.0); // for interiors
}
void RenderingManager::clearRainRipples()
{
mUniformRainIntensity->set((float) 0.0);
}
void RenderingManager::clear()

@ -160,6 +160,8 @@ namespace MWRender
/// Clear all worldspace-specific data
void notifyWorldSpaceChanged();
void clearRainRipples();
void update(float dt, bool paused);
Animation* getAnimation(const MWWorld::Ptr& ptr);

@ -1431,6 +1431,16 @@ int SkyManager::getSecundaPhase() const
return mSecunda->getPhaseInt();
}
bool SkyManager::isEnabled()
{
return mEnabled;
}
bool SkyManager::hasRain()
{
return mRainNode != NULL;
}
void SkyManager::update(float duration)
{
if (!mEnabled) return;

@ -138,6 +138,10 @@ namespace MWRender
void sunDisable();
bool isEnabled();
bool hasRain();
void setRainSpeed(float speed);
void setStormDirection(const osg::Vec3f& direction);

Loading…
Cancel
Save