From 52e4991331e72a3fb72e04e04608b99dc4bb1837 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 --- mathlib.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mathlib.c b/mathlib.c index dae0de50..129b0b8a 100644 --- a/mathlib.c +++ b/mathlib.c @@ -208,6 +208,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