Support for ZHLT ambient light_environment color
Signed-off-by: Joshua Ashton <joshua@froggi.es>
This commit is contained in:
parent
011de3563f
commit
ab6c146ddb
1 changed files with 4 additions and 0 deletions
|
@ -304,6 +304,10 @@ void CreateEntityLights( void ){
|
||||||
} else {
|
} else {
|
||||||
/* alternative: read color in RGB8 values -eukara */
|
/* alternative: read color in RGB8 values -eukara */
|
||||||
_color = ValueForKey( e, "ambientcolor255" );
|
_color = ValueForKey( e, "ambientcolor255" );
|
||||||
|
if ( !_color || !_color[ 0 ] ) {
|
||||||
|
/* ZHLT's ambient light_environment color. */
|
||||||
|
_color = ValueForKey( e, "_diffuse_light" );
|
||||||
|
}
|
||||||
if ( _color && _color[ 0 ] ) {
|
if ( _color && _color[ 0 ] ) {
|
||||||
sscanf( _color, "%f %f %f", &ambientColor[ 0 ], &ambientColor[ 1 ], &ambientColor[ 2 ] );
|
sscanf( _color, "%f %f %f", &ambientColor[ 0 ], &ambientColor[ 1 ], &ambientColor[ 2 ] );
|
||||||
ambientColor[0] /= 255;
|
ambientColor[0] /= 255;
|
||||||
|
|
Loading…
Reference in a new issue