rolling at different views would change speed because the roll detection only realy detects if we're rolling, but not by how much.

Just clamped a max roll angle so you dont notice this.
This commit is contained in:
2006-06-27 06:57:29 +00:00
parent 2501386f2b
commit b0193d3798

View File

@@ -2259,6 +2259,11 @@ void fly(void)
upvec[1]=0;
upvec[2]=1;
/*clamp teh max roll speed - hides the fact that the roll calculation
only realy detects if we're rolling, but not by how much */
if (angle>4) angle= 4;
else if (angle<-4) angle= -4;
Mat3MulVecfl(mat, upvec);
VecRotToQuat( upvec, angle*0.001, tmp_quat); /* Rotate about the relative up vec */
QuatMul(G.vd->viewquat, G.vd->viewquat, tmp_quat);