From bf67ce48eef7f1a0c73d6375611f166af27ee6c8 Mon Sep 17 00:00:00 2001 From: divverent Date: Fri, 19 Apr 2013 09:40:43 +0000 Subject: [PATCH] fix endless loop with gcc 4.8 git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11945 d7cf8633-e32d-0410-b094-e92efae38249 --- cl_particles.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cl_particles.c b/cl_particles.c index d4febd9a..941c638e 100644 --- a/cl_particles.c +++ b/cl_particles.c @@ -1648,7 +1648,7 @@ CL_EntityParticles */ void CL_EntityParticles (const entity_t *ent) { - int i; + int i, j; vec_t pitch, yaw, dist = 64, beamlength = 16; vec3_t org, v; static vec3_t avelocities[NUMVERTEXNORMALS]; @@ -1658,8 +1658,9 @@ void CL_EntityParticles (const entity_t *ent) Matrix4x4_OriginFromMatrix(&ent->render.matrix, org); if (!avelocities[0][0]) - for (i = 0;i < NUMVERTEXNORMALS * 3;i++) - avelocities[0][i] = lhrandom(0, 2.55); + for (i = 0;i < NUMVERTEXNORMALS;i++) + for (j = 0;j < 3;j++) + avelocities[i][j] = lhrandom(0, 2.55); for (i = 0;i < NUMVERTEXNORMALS;i++) { -- 2.39.2