fix global _ambient not being used on entities w/o _ambient specified

This commit is contained in:
Garux
2025-11-01 00:27:11 +05:00
parent 4e9c91e86d
commit 9bee25ef81
+1 -1
View File
@@ -180,7 +180,7 @@ void WriteSurfaceExtraFile( const char *path ){
fprintf( sf, "\tsampleSize %d\n", se->sampleSize );
}
if ( se->ambientColor != seDefault.ambientColor || se == &seDefault ) {
if ( ( se->ambientColor != g_vector3_identity && se->ambientColor != seDefault.ambientColor ) || se == &seDefault ) { // 0 == use global
fprintf( sf, "\tambientColor ( %f %f %f )\n", se->ambientColor[0], se->ambientColor[1], se->ambientColor[2] );
}