From 2b3c097067856396e62f5aa78565f210a15f3399 Mon Sep 17 00:00:00 2001 From: Garux Date: Tue, 21 Dec 2021 13:48:33 +0300 Subject: [PATCH] fix uninitialized value use in IlluminateRawLightmap --- tools/quake3/q3map2/light_ydnar.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/quake3/q3map2/light_ydnar.c b/tools/quake3/q3map2/light_ydnar.c index 79dd7408..38f5bf8a 100644 --- a/tools/quake3/q3map2/light_ydnar.c +++ b/tools/quake3/q3map2/light_ydnar.c @@ -2740,7 +2740,7 @@ void IlluminateVertexes( int num ){ int i, x, y, z, x1, y1, z1, sx, sy, radius, maxRadius, *cluster; int lightmapNum, numAvg; float samples, *vertLuxel, *radVertLuxel, *luxel, dirt; - vec3_t origin, temp, temp2, colors[ MAX_LIGHTMAPS ], avgColors[ MAX_LIGHTMAPS ]; + vec3_t temp, temp2, colors[ MAX_LIGHTMAPS ], avgColors[ MAX_LIGHTMAPS ]; bspDrawSurface_t *ds; surfaceInfo_t *info; rawLightmap_t *lm; @@ -2881,7 +2881,7 @@ void IlluminateVertexes( int num ){ trace.origin[ 2 ] = verts[ i ].xyz[ 2 ] + ( VERTEX_NUDGE * z1 ); /* try at nudged origin */ - trace.cluster = ClusterForPointExtFilter( origin, VERTEX_EPSILON, info->numSurfaceClusters, &surfaceClusters[ info->firstSurfaceCluster ] ); + trace.cluster = ClusterForPointExtFilter( trace.origin, VERTEX_EPSILON, info->numSurfaceClusters, &surfaceClusters[ info->firstSurfaceCluster ] ); if ( trace.cluster < 0 ) { continue; } -- 2.39.2