SetupGrid() after _ambient key read

This commit is contained in:
Garux 2021-01-01 17:41:11 +03:00
parent 97f0e61ccc
commit d074634463

View File

@ -1861,10 +1861,6 @@ void LightWorld( bool fastAllocate ){
SmoothNormals(); SmoothNormals();
} }
/* determine the number of grid points */
Sys_Printf( "--- SetupGrid ---\n" );
SetupGrid();
/* find the optional minimum lighting values */ /* find the optional minimum lighting values */
GetVectorForKey( &entities[ 0 ], "_color", color ); GetVectorForKey( &entities[ 0 ], "_color", color );
if ( colorsRGB ) { if ( colorsRGB ) {
@ -1904,6 +1900,10 @@ void LightWorld( bool fastAllocate ){
maxLight = f > 255? 255 : f < 0? 0 : f; maxLight = f > 255? 255 : f < 0? 0 : f;
} }
/* determine the number of grid points */
Sys_Printf( "--- SetupGrid ---\n" );
SetupGrid(); // uses ambientColor read above
/* create world lights */ /* create world lights */
Sys_FPrintf( SYS_VRB, "--- CreateLights ---\n" ); Sys_FPrintf( SYS_VRB, "--- CreateLights ---\n" );
CreateEntityLights(); CreateEntityLights();