From bed83b87e20e06b6a6d88518eab4c92c0a4ef45d Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Thu, 4 May 2000 11:50:23 +0000 Subject: [PATCH] fixed a really nasty, ancient (it's chitin was turning grey), subtle bug that caused rogue to crash when firing the multi rocket near the lightning pentagram in the Cave of Death. "Though shalt not re-use a loop variable inside a loop". Also, bump up MAX_BEAMS and MAX_EXPLOSIONS --- common/cl_tent.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/common/cl_tent.c b/common/cl_tent.c index 8296c66..4ad1a96 100644 --- a/common/cl_tent.c +++ b/common/cl_tent.c @@ -36,7 +36,7 @@ #include #include -#define MAX_BEAMS 8 // UQ originally 24 +#define MAX_BEAMS 32 typedef struct { int entity; @@ -45,7 +45,7 @@ typedef struct vec3_t start, end; } beam_t; -#define MAX_EXPLOSIONS 8 +#define MAX_EXPLOSIONS 32 typedef struct { vec3_t origin; @@ -437,7 +437,7 @@ CL_NewTempEntity (void) void CL_UpdateBeams (void) { - int i; + int i,j; beam_t *b; vec3_t dist, org; float d; @@ -494,8 +494,8 @@ CL_UpdateBeams (void) 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; } }