X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FAnimation%2FSkeleton.cpp;h=1c882558a5a9504d5a76f7bf428efedd55542234;hb=8b8230c564e1f0063b381e77bf6222af9f2e678d;hp=8e5cb0c9a8e7336350703c1077fb983465f9c949;hpb=cd451341c5ee01374268559885871ca9d454cbd0;p=lugaru.git diff --git a/Source/Animation/Skeleton.cpp b/Source/Animation/Skeleton.cpp index 8e5cb0c..1c88255 100644 --- a/Source/Animation/Skeleton.cpp +++ b/Source/Animation/Skeleton.cpp @@ -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)));