From ab6c146ddb9dd908b6567b0048d51328e9d79bbd Mon Sep 17 00:00:00 2001 From: Joshua Ashton Date: Sun, 22 Aug 2021 19:12:54 +0100 Subject: [PATCH] Support for ZHLT ambient light_environment color Signed-off-by: Joshua Ashton --- tools/vmap/light.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/vmap/light.c b/tools/vmap/light.c index 8cf86a8..afd264b 100644 --- a/tools/vmap/light.c +++ b/tools/vmap/light.c @@ -304,6 +304,10 @@ void CreateEntityLights( void ){ } else { /* alternative: read color in RGB8 values -eukara */ _color = ValueForKey( e, "ambientcolor255" ); + if ( !_color || !_color[ 0 ] ) { + /* ZHLT's ambient light_environment color. */ + _color = ValueForKey( e, "_diffuse_light" ); + } if ( _color && _color[ 0 ] ) { sscanf( _color, "%f %f %f", &ambientColor[ 0 ], &ambientColor[ 1 ], &ambientColor[ 2 ] ); ambientColor[0] /= 255;