Support for ZHLT's sun spread angle
Signed-off-by: Joshua Ashton <joshua@froggi.es>
This commit is contained in:
parent
ab6c146ddb
commit
c5215a0737
1 changed files with 9 additions and 2 deletions
|
@ -246,7 +246,7 @@ void CreateEntityLights( void ){
|
||||||
const char *name;
|
const char *name;
|
||||||
const char *target;
|
const char *target;
|
||||||
vec3_t dest;
|
vec3_t dest;
|
||||||
const char *_color, *_light_brightness;
|
const char *_color, *_light_brightness, *_spread;
|
||||||
float intensity, scale, deviance, filterRadius;
|
float intensity, scale, deviance, filterRadius;
|
||||||
int spawnflags, flags, numSamples;
|
int spawnflags, flags, numSamples;
|
||||||
qboolean junior;
|
qboolean junior;
|
||||||
|
@ -340,7 +340,14 @@ void CreateEntityLights( void ){
|
||||||
|
|
||||||
/* get filter radius from shader */
|
/* get filter radius from shader */
|
||||||
sun->filterRadius = FloatForKey( e, "filterradius" );
|
sun->filterRadius = FloatForKey( e, "filterradius" );
|
||||||
|
_spread = ValueForKey( e, "_spread" );
|
||||||
|
if ( _spread && _spread[ 0 ] ) {
|
||||||
|
/* ZHLT's sun spread angle. */
|
||||||
|
sun->deviance = atof( _spread );
|
||||||
|
}
|
||||||
|
else {
|
||||||
sun->deviance = FloatForKey( e, "sunspreadangle" );
|
sun->deviance = FloatForKey( e, "sunspreadangle" );
|
||||||
|
}
|
||||||
sun->deviance = sun->deviance / 180.0f * Q_PI;
|
sun->deviance = sun->deviance / 180.0f * Q_PI;
|
||||||
sun->numSamples = IntForKey( e, "samples" );
|
sun->numSamples = IntForKey( e, "samples" );
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue