mirror of
https://git.rip/DMCA_FUCKER/re3.git
synced 2024-12-23 16:40:01 +00:00
Fix WindModifiers
This commit is contained in:
parent
04845a72bc
commit
d1394c6994
|
@ -33,7 +33,7 @@ CWindModifiers::FindWindModifier(CVector pos, float *x, float *y)
|
||||||
float dist = (pos - Array[i].m_pos).Magnitude();
|
float dist = (pos - Array[i].m_pos).Magnitude();
|
||||||
if (dist < MAX_FADE_DIST) {
|
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 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;
|
dir = (pos - Array[i].m_pos) * heightFade / dist;
|
||||||
bWasWindModifierFound = true;
|
bWasWindModifierFound = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue