]> git.jsancho.org Git - lugaru.git/blobdiff - Source/Animation/Skeleton.cpp
Using a vector for Model triangles, moved facenormal inside triangles
[lugaru.git] / Source / Animation / Skeleton.cpp
index 8e5cb0c9a8e7336350703c1077fb983465f9c949..1c882558a5a9504d5a76f7bf428efedd55542234 100644 (file)
@@ -348,7 +348,7 @@ float Skeleton::DoConstraints(XYZ *coords, float *scale)
                                         }
                                     }
 
-                                    terrainnormal = DoRotation(Object::objects[k]->model.facenormals[whichhit], 0, Object::objects[k]->yaw, 0) * -1;
+                                    terrainnormal = DoRotation(Object::objects[k]->model.Triangles[whichhit].facenormal, 0, Object::objects[k]->yaw, 0) * -1;
                                     if (terrainnormal.y > .8)
                                         freefall = 0;
                                     bounceness = terrainnormal * findLength(&joints[i].velocity) * (abs(normaldotproduct(joints[i].velocity, terrainnormal)));