]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
fix uninitialized value use in IlluminateRawLightmap
authorGarux <garux@mail.ru>
Tue, 21 Dec 2021 10:48:33 +0000 (13:48 +0300)
committerThomas Debesse <dev@illwieckz.net>
Tue, 21 Dec 2021 10:48:33 +0000 (13:48 +0300)
tools/quake3/q3map2/light_ydnar.c

index 79dd74082cd83e3313225ee153e3e49c0232efaf..38f5bf8a0e08dbc793b638348407c1ad77da1383 100644 (file)
@@ -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;
                                                                }