From: Garux Date: Tue, 21 Dec 2021 10:20:41 +0000 (+0300) Subject: fix -debugorigin crash in IlluminateVertexes X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=49f5342462ee75b3e152364aafc9710e1d221713;p=xonotic%2Fnetradiant.git fix -debugorigin crash in IlluminateVertexes --- diff --git a/tools/quake3/q3map2/light_ydnar.c b/tools/quake3/q3map2/light_ydnar.c index ce9cf861..79dd7408 100644 --- a/tools/quake3/q3map2/light_ydnar.c +++ b/tools/quake3/q3map2/light_ydnar.c @@ -2795,7 +2795,7 @@ void IlluminateVertexes( int num ){ else if ( debugOrigin ) { VectorSubtract( info->maxs, info->mins, temp ); VectorScale( temp, ( 1.0f / 255.0f ), temp ); - VectorSubtract( origin, lm->mins, temp2 ); + VectorSubtract( verts[ i ].xyz, info->mins, temp2 ); radVertLuxel[ 0 ] = info->mins[ 0 ] + ( temp[ 0 ] * temp2[ 0 ] ); radVertLuxel[ 1 ] = info->mins[ 1 ] + ( temp[ 1 ] * temp2[ 1 ] ); radVertLuxel[ 2 ] = info->mins[ 2 ] + ( temp[ 2 ] * temp2[ 2 ] );