fix [#27186] Wave modifier falloff
authorCampbell Barton <ideasman42@gmail.com>
Thu, 28 Apr 2011 05:19:17 +0000 (05:19 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 28 Apr 2011 05:19:17 +0000 (05:19 +0000)
regression from 2.4x (own fault)

source/blender/modifiers/intern/MOD_wave.c

index 6d547867ed83ad6acebae48c5a114037cd90222d..df3a7f80490627491fe761232b61ca020a17024e 100644 (file)
@@ -352,6 +352,7 @@ static void waveModifier_do(WaveModifierData *md,
                        }
 
                        falloff_fac = (1.0f - (dist * falloff_inv));
+                       CLAMP(falloff_fac, 0.0f, 1.0f);
 
                        if(wmd->flag & MOD_WAVE_X) {
                                if(wmd->flag & MOD_WAVE_Y) amplit = (float)sqrt(x*x + y*y);