]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
VectorVectors: renormalize 'up' vector as it seems to be unnormalized in some cases...
authorvortex <vortex@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 18 Feb 2012 12:29:05 +0000 (12:29 +0000)
committerRudolf Polzer <divverent@xonotic.org>
Fri, 9 Mar 2012 19:28:56 +0000 (20:28 +0100)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11697 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=52e4991331e72a3fb72e04e04608b99dc4bb1837

mathlib.c

index 3bb17628dfd99a2e7f1c56bd10adbbc03795830d..ed0a43c60d3869c735dad47f6495f50afa47928d 100644 (file)
--- a/mathlib.c
+++ b/mathlib.c
@@ -212,6 +212,7 @@ void VectorVectors(const vec3_t forward, vec3_t right, vec3_t up)
        VectorMA(right, -d, forward, right);
        VectorNormalize(right);
        CrossProduct(right, forward, up);
+       VectorNormalize(up); // CrossProduct in this case returns 'up thats length is not 1
 }
 
 void VectorVectorsDouble(const double *forward, double *right, double *up)