From 97f0e61cccc71cb05885e532b4b1187e9c9de8fd Mon Sep 17 00:00:00 2001 From: Garux Date: Fri, 1 Jan 2021 17:40:06 +0300 Subject: [PATCH] initialize rawGridPoints.ambient correctly --- tools/quake3/q3map2/light.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/quake3/q3map2/light.c b/tools/quake3/q3map2/light.c index b56ec63c..3d9adb27 100644 --- a/tools/quake3/q3map2/light.c +++ b/tools/quake3/q3map2/light.c @@ -1825,7 +1825,9 @@ void SetupGrid( void ){ /* clear lightgrid */ for ( i = 0; i < numRawGridPoints; i++ ) { - VectorCopy( ambientColor, rawGridPoints[ i ].ambient[ j ] ); + for ( j = 0; j < MAX_LIGHTMAPS; j++ ) + VectorCopy( ambientColor, rawGridPoints[ i ].ambient[ j ] ); + rawGridPoints[ i ].styles[ 0 ] = LS_NORMAL; bspGridPoints[ i ].styles[ 0 ] = LS_NORMAL; for ( j = 1; j < MAX_LIGHTMAPS; j++ )