mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-20 15:40:32 +00:00
fix rain ripple bug
This commit is contained in:
parent
64793a55dc
commit
4999c667b6
@ -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…
x
Reference in New Issue
Block a user