-/*
+/* -------------------------------------------------------------------------------
+
Copyright (C) 1999-2007 id Software, Inc. and contributors.
For a list of contributors, see the accompanying CONTRIBUTORS file.
break;
case MST_TRIANGLE_SOUP:
- numTriangleDiffuseLights;
+ numTriangleDiffuseLights++;
break;
case MST_PATCH:
light->add = value * formFactorValueScale * areaScale;
VectorCopy( si->color, light->color );
VectorScale( light->color, light->add, light->emitColor );
- light->style = si->lightStyle;
- if( light->style < 0 || light->style >= LS_NONE )
- light->style = 0;
+ light->style = noStyles ? LS_NORMAL : si->lightStyle;
+ if( light->style < LS_NORMAL || light->style >= LS_NONE )
+ light->style = LS_NORMAL;
/* set origin */
VectorAdd( mins, maxs, light->origin );
VectorMA( light->origin, si->backsplashDistance, normal, splash->origin );
VectorCopy( si->color, splash->color );
splash->falloffTolerance = falloffTolerance;
- splash->style = light->style;
+ splash->style = noStyles ? LS_NORMAL : light->style;
/* add to counts */
numPointLights++;
light->add = value * formFactorValueScale * bounceScale;
VectorCopy( color, light->color );
VectorScale( light->color, light->add, light->emitColor );
- light->style = style;
- if( light->style < 0 || light->style >= LS_NONE )
- light->style = 0;
+ light->style = noStyles ? LS_NORMAL : style;
+ if( light->style < LS_NORMAL || light->style >= LS_NONE )
+ light->style = LS_NORMAL;
/* set origin */
WindingCenter( w, light->origin );
+