mirror of
https://github.com/OpenMW/openmw.git
synced 2025-04-01 10:36:39 +00:00
Make rain and snow ripple settings global rather than per-weather (#7748)
This commit is contained in:
parent
01eb333fad
commit
640fa53bb8
6 changed files with 16 additions and 15 deletions
|
@ -257,7 +257,8 @@ namespace MWRender
|
||||||
, mRainMaxHeight(0.f)
|
, mRainMaxHeight(0.f)
|
||||||
, mRainEntranceSpeed(1.f)
|
, mRainEntranceSpeed(1.f)
|
||||||
, mRainMaxRaindrops(0)
|
, mRainMaxRaindrops(0)
|
||||||
, mRipples(false)
|
, mRainRipplesEnabled(Fallback::Map::getBool("Weather_Rain_Ripples"))
|
||||||
|
, mSnowRipplesEnabled(Fallback::Map::getBool("Weather_Snow_Ripples"))
|
||||||
, mWindSpeed(0.f)
|
, mWindSpeed(0.f)
|
||||||
, mBaseWindSpeed(0.f)
|
, mBaseWindSpeed(0.f)
|
||||||
, mEnabled(true)
|
, mEnabled(true)
|
||||||
|
@ -519,7 +520,16 @@ namespace MWRender
|
||||||
|
|
||||||
bool SkyManager::getRainRipplesEnabled() const
|
bool SkyManager::getRainRipplesEnabled() const
|
||||||
{
|
{
|
||||||
return mRipples;
|
if (!mEnabled || mIsStorm)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (hasRain())
|
||||||
|
return mRainRipplesEnabled;
|
||||||
|
|
||||||
|
if (mParticleNode && mCurrentParticleEffect == "meshes\\snow.nif")
|
||||||
|
return mSnowRipplesEnabled;
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
float SkyManager::getPrecipitationAlpha() const
|
float SkyManager::getPrecipitationAlpha() const
|
||||||
|
@ -636,7 +646,6 @@ namespace MWRender
|
||||||
mRainMinHeight = weather.mRainMinHeight;
|
mRainMinHeight = weather.mRainMinHeight;
|
||||||
mRainMaxHeight = weather.mRainMaxHeight;
|
mRainMaxHeight = weather.mRainMaxHeight;
|
||||||
mRainSpeed = weather.mRainSpeed;
|
mRainSpeed = weather.mRainSpeed;
|
||||||
mRipples = weather.mRipples;
|
|
||||||
mWindSpeed = weather.mWindSpeed;
|
mWindSpeed = weather.mWindSpeed;
|
||||||
mBaseWindSpeed = weather.mBaseWindSpeed;
|
mBaseWindSpeed = weather.mBaseWindSpeed;
|
||||||
|
|
||||||
|
|
|
@ -196,7 +196,8 @@ namespace MWRender
|
||||||
float mRainMaxHeight;
|
float mRainMaxHeight;
|
||||||
float mRainEntranceSpeed;
|
float mRainEntranceSpeed;
|
||||||
int mRainMaxRaindrops;
|
int mRainMaxRaindrops;
|
||||||
bool mRipples;
|
bool mRainRipplesEnabled;
|
||||||
|
bool mSnowRipplesEnabled;
|
||||||
float mWindSpeed;
|
float mWindSpeed;
|
||||||
float mBaseWindSpeed;
|
float mBaseWindSpeed;
|
||||||
|
|
||||||
|
|
|
@ -77,7 +77,6 @@ namespace MWRender
|
||||||
float mRainSpeed;
|
float mRainSpeed;
|
||||||
float mRainEntranceSpeed;
|
float mRainEntranceSpeed;
|
||||||
int mRainMaxRaindrops;
|
int mRainMaxRaindrops;
|
||||||
bool mRipples;
|
|
||||||
|
|
||||||
osg::Vec3f mStormDirection;
|
osg::Vec3f mStormDirection;
|
||||||
osg::Vec3f mNextStormDirection;
|
osg::Vec3f mNextStormDirection;
|
||||||
|
|
|
@ -175,7 +175,6 @@ namespace MWWorld
|
||||||
, mRainMaxHeight(Fallback::Map::getFloat("Weather_" + name + "_Rain_Height_Max"))
|
, mRainMaxHeight(Fallback::Map::getFloat("Weather_" + name + "_Rain_Height_Max"))
|
||||||
, mParticleEffect(particleEffect)
|
, mParticleEffect(particleEffect)
|
||||||
, mRainEffect(Fallback::Map::getBool("Weather_" + name + "_Using_Precip") ? "meshes\\raindrop.nif" : "")
|
, mRainEffect(Fallback::Map::getBool("Weather_" + name + "_Using_Precip") ? "meshes\\raindrop.nif" : "")
|
||||||
, mRipples(Fallback::Map::getBool("Weather_" + name + "_Ripples"))
|
|
||||||
, mStormDirection(Weather::defaultDirection())
|
, mStormDirection(Weather::defaultDirection())
|
||||||
, mCloudsMaximumPercent(Fallback::Map::getFloat("Weather_" + name + "_Clouds_Maximum_Percent"))
|
, mCloudsMaximumPercent(Fallback::Map::getFloat("Weather_" + name + "_Clouds_Maximum_Percent"))
|
||||||
, mTransitionDelta(Fallback::Map::getFloat("Weather_" + name + "_Transition_Delta"))
|
, mTransitionDelta(Fallback::Map::getFloat("Weather_" + name + "_Transition_Delta"))
|
||||||
|
@ -1130,7 +1129,6 @@ namespace MWWorld
|
||||||
mResult.mRainMinHeight = current.mRainMinHeight;
|
mResult.mRainMinHeight = current.mRainMinHeight;
|
||||||
mResult.mRainMaxHeight = current.mRainMaxHeight;
|
mResult.mRainMaxHeight = current.mRainMaxHeight;
|
||||||
mResult.mRainMaxRaindrops = current.mRainMaxRaindrops;
|
mResult.mRainMaxRaindrops = current.mRainMaxRaindrops;
|
||||||
mResult.mRipples = current.mRipples;
|
|
||||||
|
|
||||||
mResult.mParticleEffect = current.mParticleEffect;
|
mResult.mParticleEffect = current.mParticleEffect;
|
||||||
mResult.mRainEffect = current.mRainEffect;
|
mResult.mRainEffect = current.mRainEffect;
|
||||||
|
@ -1243,7 +1241,6 @@ namespace MWWorld
|
||||||
mResult.mRainMinHeight = current.mRainMinHeight;
|
mResult.mRainMinHeight = current.mRainMinHeight;
|
||||||
mResult.mRainMaxHeight = current.mRainMaxHeight;
|
mResult.mRainMaxHeight = current.mRainMaxHeight;
|
||||||
mResult.mRainMaxRaindrops = current.mRainMaxRaindrops;
|
mResult.mRainMaxRaindrops = current.mRainMaxRaindrops;
|
||||||
mResult.mRipples = current.mRipples;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1260,7 +1257,6 @@ namespace MWWorld
|
||||||
mResult.mRainMinHeight = other.mRainMinHeight;
|
mResult.mRainMinHeight = other.mRainMinHeight;
|
||||||
mResult.mRainMaxHeight = other.mRainMaxHeight;
|
mResult.mRainMaxHeight = other.mRainMaxHeight;
|
||||||
mResult.mRainMaxRaindrops = other.mRainMaxRaindrops;
|
mResult.mRainMaxRaindrops = other.mRainMaxRaindrops;
|
||||||
mResult.mRipples = other.mRipples;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -191,8 +191,6 @@ namespace MWWorld
|
||||||
|
|
||||||
std::string mRainEffect;
|
std::string mRainEffect;
|
||||||
|
|
||||||
bool mRipples;
|
|
||||||
|
|
||||||
osg::Vec3f mStormDirection;
|
osg::Vec3f mStormDirection;
|
||||||
|
|
||||||
float mCloudsMaximumPercent;
|
float mCloudsMaximumPercent;
|
||||||
|
|
|
@ -11,10 +11,8 @@ static const std::set<std::string_view> allowedKeysInt = { "LightAttenuation_Lin
|
||||||
"Water_RippleFrameCount", "Water_SurfaceTileCount", "Water_SurfaceFrameCount", "Weather_Clear_Using_Precip",
|
"Water_RippleFrameCount", "Water_SurfaceTileCount", "Water_SurfaceFrameCount", "Weather_Clear_Using_Precip",
|
||||||
"Weather_Cloudy_Using_Precip", "Weather_Foggy_Using_Precip", "Weather_Overcast_Using_Precip",
|
"Weather_Cloudy_Using_Precip", "Weather_Foggy_Using_Precip", "Weather_Overcast_Using_Precip",
|
||||||
"Weather_Rain_Using_Precip", "Weather_Thunderstorm_Using_Precip", "Weather_Ashstorm_Using_Precip",
|
"Weather_Rain_Using_Precip", "Weather_Thunderstorm_Using_Precip", "Weather_Ashstorm_Using_Precip",
|
||||||
"Weather_Blight_Using_Precip", "Weather_Snow_Using_Precip", "Weather_Blizzard_Using_Precip",
|
"Weather_Blight_Using_Precip", "Weather_Snow_Using_Precip", "Weather_Blizzard_Using_Precip", "Weather_Rain_Ripples",
|
||||||
"Weather_Clear_Ripples", "Weather_Cloudy_Ripples", "Weather_Foggy_Ripples", "Weather_Overcast_Ripples",
|
"Weather_Snow_Ripples" };
|
||||||
"Weather_Rain_Ripples", "Weather_Thunderstorm_Ripples", "Weather_Ashstorm_Ripples", "Weather_Blight_Ripples",
|
|
||||||
"Weather_Snow_Ripples", "Weather_Blizzard_Ripples" };
|
|
||||||
|
|
||||||
static const std::set<std::string_view> allowedKeysFloat = { "General_Werewolf_FOV", "Inventory_DirectionalAmbientB",
|
static const std::set<std::string_view> allowedKeysFloat = { "General_Werewolf_FOV", "Inventory_DirectionalAmbientB",
|
||||||
"Inventory_DirectionalAmbientG", "Inventory_DirectionalAmbientR", "Inventory_DirectionalDiffuseB",
|
"Inventory_DirectionalAmbientG", "Inventory_DirectionalAmbientR", "Inventory_DirectionalDiffuseB",
|
||||||
|
|
Loading…
Reference in a new issue