]> de.git.xonotic.org Git - xonotic/netradiant.git/commitdiff
fix -debugorigin crash in IlluminateVertexes
authorGarux <garux@mail.ru>
Tue, 21 Dec 2021 10:20:41 +0000 (13:20 +0300)
committerThomas Debesse <dev@illwieckz.net>
Tue, 21 Dec 2021 10:20:41 +0000 (13:20 +0300)
tools/quake3/q3map2/light_ydnar.c

index ce9cf861fed4afd8f1e57fd967748855d169bda5..79dd74082cd83e3313225ee153e3e49c0232efaf 100644 (file)
@@ -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 ] );