svn merge -r 12937:13095 https://svn.blender.org/svnroot/bf-blender/trunk/blender
[blender-staging.git] / source / blender / blenkernel / intern / softbody.c
index 4a3d8f70b1df1c343fe8cf3f141898213e5d4456..f2258f0e1c42f5610ad64c4dbe361072f5f5170f 100644 (file)
@@ -2307,9 +2307,8 @@ static void softbody_calc_forces(Object *ob, float forcetime, float timenow)
                                                }
 
                                                if (( (sb->totpoint-a) == bs->v1) ){ 
-                                                       actspringlen= VecLenf( (bproot+bs->v2)->pos, bp->pos);
                                                        VecSubf(sd,(bproot+bs->v2)->pos, bp->pos);
-                                                       Normalize(sd);
+                                                       actspringlen=Normalize(sd);
                                                        
                                                        /* friction stuff V1 */
                                                        VecSubf(velgoal,bp->vec,(bproot+bs->v2)->vec);
@@ -2330,9 +2329,8 @@ static void softbody_calc_forces(Object *ob, float forcetime, float timenow)
                                                }
                                                
                                                if (( (sb->totpoint-a) == bs->v2) ){ 
-                                                       actspringlen= VecLenf( (bproot+bs->v1)->pos, bp->pos);
                                                        VecSubf(sd,bp->pos,(bproot+bs->v1)->pos);
-                                                       Normalize(sd);
+                                                       actspringlen=Normalize(sd);
                                                        
                                                        /* friction stuff V2 */
                                                        VecSubf(velgoal,bp->vec,(bproot+bs->v1)->vec);