From d1394c69946032f40109bc12ece5549a93dfde79 Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Sat, 24 Oct 2020 22:28:44 +0300 Subject: Fix WindModifiers --- src/render/WindModifiers.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/render/WindModifiers.cpp b/src/render/WindModifiers.cpp index 2061df6a..b72e362e 100644 --- a/src/render/WindModifiers.cpp +++ b/src/render/WindModifiers.cpp @@ -33,7 +33,7 @@ CWindModifiers::FindWindModifier(CVector pos, float *x, float *y) float dist = (pos - Array[i].m_pos).Magnitude(); if (dist < MAX_FADE_DIST) { float distFade = dist < MIN_FADE_DIST ? 1.0f : 1.0f - (dist - MIN_FADE_DIST) / (MAX_FADE_DIST - MIN_FADE_DIST); - float heightFade = 1.0f - zDist / MAX_HEIGHT_DIST; + float heightFade = distFade * ((1.0f - zDist / MAX_HEIGHT_DIST) / 2.0f); dir = (pos - Array[i].m_pos) * heightFade / dist; bWasWindModifierFound = true; } -- cgit v1.2.3