fix weather interpolation & add 'fall.max_intensity' property

This commit is contained in:
MihailRis
2025-03-02 10:38:30 +03:00
parent 7fc226f70f
commit 8640730520
6 changed files with 40 additions and 10 deletions
+3 -2
View File
@@ -115,7 +115,8 @@ void Decorator::updateRandom(
return;
}
}
if (dst2 < 128 && random.randFloat() < glm::pow(weather.intensity, 2.0f) && rainSplash.has_value()) {
float intensity = weather.intensity * weather.fall.maxIntensity;
if (dst2 < 128 && random.randFloat() < glm::pow(intensity, 2.0f) && rainSplash.has_value()) {
auto treg = util::get_texture_region(
assets, "particles:rain_splash_0", ""
);
@@ -137,7 +138,7 @@ void Decorator::updateRandom(
sound,
pos,
false,
weather.intensity * weather.intensity,
intensity * intensity,
1.0f,
false,
audio::PRIORITY_LOW,