Make rain and snow ripple settings global rather than per-weather (#7748)

macos_ci_fix
Alexei Kotov 1 year ago
parent 01eb333fad
commit 640fa53bb8

@ -257,7 +257,8 @@ namespace MWRender
, mRainMaxHeight(0.f)
, mRainEntranceSpeed(1.f)
, mRainMaxRaindrops(0)
, mRipples(false)
, mRainRipplesEnabled(Fallback::Map::getBool("Weather_Rain_Ripples"))
, mSnowRipplesEnabled(Fallback::Map::getBool("Weather_Snow_Ripples"))
, mWindSpeed(0.f)
, mBaseWindSpeed(0.f)
, mEnabled(true)
@ -519,7 +520,16 @@ namespace MWRender
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
@ -636,7 +646,6 @@ namespace MWRender
mRainMinHeight = weather.mRainMinHeight;
mRainMaxHeight = weather.mRainMaxHeight;
mRainSpeed = weather.mRainSpeed;
mRipples = weather.mRipples;
mWindSpeed = weather.mWindSpeed;
mBaseWindSpeed = weather.mBaseWindSpeed;

@ -196,7 +196,8 @@ namespace MWRender
float mRainMaxHeight;
float mRainEntranceSpeed;
int mRainMaxRaindrops;
bool mRipples;
bool mRainRipplesEnabled;
bool mSnowRipplesEnabled;
float mWindSpeed;
float mBaseWindSpeed;

@ -77,7 +77,6 @@ namespace MWRender
float mRainSpeed;
float mRainEntranceSpeed;
int mRainMaxRaindrops;
bool mRipples;
osg::Vec3f mStormDirection;
osg::Vec3f mNextStormDirection;

@ -175,7 +175,6 @@ namespace MWWorld
, mRainMaxHeight(Fallback::Map::getFloat("Weather_" + name + "_Rain_Height_Max"))
, mParticleEffect(particleEffect)
, mRainEffect(Fallback::Map::getBool("Weather_" + name + "_Using_Precip") ? "meshes\\raindrop.nif" : "")
, mRipples(Fallback::Map::getBool("Weather_" + name + "_Ripples"))
, mStormDirection(Weather::defaultDirection())
, mCloudsMaximumPercent(Fallback::Map::getFloat("Weather_" + name + "_Clouds_Maximum_Percent"))
, mTransitionDelta(Fallback::Map::getFloat("Weather_" + name + "_Transition_Delta"))
@ -1130,7 +1129,6 @@ namespace MWWorld
mResult.mRainMinHeight = current.mRainMinHeight;
mResult.mRainMaxHeight = current.mRainMaxHeight;
mResult.mRainMaxRaindrops = current.mRainMaxRaindrops;
mResult.mRipples = current.mRipples;
mResult.mParticleEffect = current.mParticleEffect;
mResult.mRainEffect = current.mRainEffect;
@ -1243,7 +1241,6 @@ namespace MWWorld
mResult.mRainMinHeight = current.mRainMinHeight;
mResult.mRainMaxHeight = current.mRainMaxHeight;
mResult.mRainMaxRaindrops = current.mRainMaxRaindrops;
mResult.mRipples = current.mRipples;
}
else
{
@ -1260,7 +1257,6 @@ namespace MWWorld
mResult.mRainMinHeight = other.mRainMinHeight;
mResult.mRainMaxHeight = other.mRainMaxHeight;
mResult.mRainMaxRaindrops = other.mRainMaxRaindrops;
mResult.mRipples = other.mRipples;
}
}
}

@ -191,8 +191,6 @@ namespace MWWorld
std::string mRainEffect;
bool mRipples;
osg::Vec3f mStormDirection;
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",
"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_Blight_Using_Precip", "Weather_Snow_Using_Precip", "Weather_Blizzard_Using_Precip",
"Weather_Clear_Ripples", "Weather_Cloudy_Ripples", "Weather_Foggy_Ripples", "Weather_Overcast_Ripples",
"Weather_Rain_Ripples", "Weather_Thunderstorm_Ripples", "Weather_Ashstorm_Ripples", "Weather_Blight_Ripples",
"Weather_Snow_Ripples", "Weather_Blizzard_Ripples" };
"Weather_Blight_Using_Precip", "Weather_Snow_Using_Precip", "Weather_Blizzard_Using_Precip", "Weather_Rain_Ripples",
"Weather_Snow_Ripples" };
static const std::set<std::string_view> allowedKeysFloat = { "General_Werewolf_FOV", "Inventory_DirectionalAmbientB",
"Inventory_DirectionalAmbientG", "Inventory_DirectionalAmbientR", "Inventory_DirectionalDiffuseB",

Loading…
Cancel
Save