]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Fixed a VC runtime assertion caused by wishdir not being initialized when wishspeed...
authorblack <black@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 12 Jun 2005 16:34:03 +0000 (16:34 +0000)
committerblack <black@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 12 Jun 2005 16:34:03 +0000 (16:34 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5428 d7cf8633-e32d-0410-b094-e92efae38249

cl_input.c

index 03421328373b09d3ceac061248649b2553a4cd9f..b24d8ea186d46da73167eff56d8f14da4fa98281 100644 (file)
@@ -632,6 +632,8 @@ void CL_ClientMovement_Replay(void)
                                wishspeed = VectorLength(wishvel);
                                if (wishspeed)
                                        VectorScale(wishvel, 1 / wishspeed, wishdir);
+                               else
+                                       VectorSet( wishdir, 0.0, 0.0, 0.0 );
                                wishspeed = min(wishspeed, cl_movement_maxspeed.value);
                                if (crouch)
                                        wishspeed *= 0.5;
@@ -672,6 +674,8 @@ void CL_ClientMovement_Replay(void)
                                wishspeed = VectorLength(wishvel);
                                if (wishspeed)
                                        VectorScale(wishvel, 1 / wishspeed, wishdir);
+                               else
+                                       VectorSet( wishdir, 0.0, 0.0, 0.0 );
                                wishspeed = min(wishspeed, cl_movement_maxspeed.value);
                                if (crouch)
                                        wishspeed *= 0.5;