Support for ZHLT ambient light_environment color

Signed-off-by: Joshua Ashton <joshua@froggi.es>
This commit is contained in:
Joshua Ashton 2021-08-22 19:12:54 +01:00
parent 011de3563f
commit ab6c146ddb
No known key found for this signature in database
GPG Key ID: C85A08669126BE8D
1 changed files with 4 additions and 0 deletions

View File

@ -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;