1
0
Fork 0
mirror of https://git.rip/DMCA_FUCKER/re3.git synced 2024-12-23 16:40:01 +00:00

tiny cleanup

This commit is contained in:
aap 2020-11-01 10:29:28 +01:00
parent 32c1135cd4
commit 7f5806b727

View file

@ -33,8 +33,9 @@ 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 = distFade * ((1.0f - zDist / MAX_HEIGHT_DIST) / 2.0f); float heightFade = 1.0f - zDist / MAX_HEIGHT_DIST;
dir = (pos - Array[i].m_pos) * heightFade / dist; float fade = distFade * heightFade * 0.5f;
dir = (pos - Array[i].m_pos) * fade / dist;
bWasWindModifierFound = true; bWasWindModifierFound = true;
} }
} }