From 6de3a631f63c5f530dd6b46235cc9e3cb064240a Mon Sep 17 00:00:00 2001 From: vortex Date: Sat, 18 Feb 2012 12:29:05 +0000 Subject: [PATCH] VectorVectors: renormalize 'up' vector as it seems to be unnormalized in some cases (a test case - spawning of large-scaled oriented particle). git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11697 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=52e4991331e72a3fb72e04e04608b99dc4bb1837 --- mathlib.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mathlib.c b/mathlib.c index 3bb17628..ed0a43c6 100644 --- 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) -- 2.39.2