shithub: qk1

Download patch

ref: e92454e8739ee80d9ae080d4abd76f0b6f6d4034
parent: 96d6d5eb7809edca1f1ec91bd558e383827511ce
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Thu Dec 28 12:33:39 EST 2023

CL_UpdateTEnts: wat. fix the wrong variables reuse by the inner loop

--- a/cl_tent.c
+++ b/cl_tent.c
@@ -240,7 +240,7 @@
 */
 void CL_UpdateTEnts (void)
 {
-	int			i;
+	int			i, j;
 	beam_t		*b;
 	vec3_t		dist, org;
 	float		d;
@@ -299,12 +299,11 @@
 			ent->angles[1] = yaw;
 			ent->angles[2] = rand()%360;
 
-			for (i=0 ; i<3 ; i++)
-				org[i] += dist[i]*30;
+			for(j = 0 ; j < 3; j++)
+				org[j] += dist[j] * 30;
 			d -= 30;
 		}
 	}
-
 }