summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/renderergl1/tr_flares.c21
-rw-r--r--src/renderergl2/tr_flares.c21
2 files changed, 32 insertions, 10 deletions
diff --git a/src/renderergl1/tr_flares.c b/src/renderergl1/tr_flares.c
index 579bdf9c..56221185 100644
--- a/src/renderergl1/tr_flares.c
+++ b/src/renderergl1/tr_flares.c
@@ -89,6 +89,19 @@ int flareCoeff;
/*
==================
+R_SetFlareCoeff
+==================
+*/
+static void R_SetFlareCoeff( void ) {
+
+ if(r_flareCoeff->value == 0.0f)
+ flareCoeff = atof(FLARE_STDCOEFF);
+ else
+ flareCoeff = r_flareCoeff->value;
+}
+
+/*
+==================
R_ClearFlares
==================
*/
@@ -103,6 +116,8 @@ void R_ClearFlares( void ) {
r_flareStructs[i].next = r_inactiveFlares;
r_inactiveFlares = &r_flareStructs[i];
}
+
+ R_SetFlareCoeff();
}
@@ -451,11 +466,7 @@ void RB_RenderFlares (void) {
if(r_flareCoeff->modified)
{
- if(r_flareCoeff->value == 0.0f)
- flareCoeff = atof(FLARE_STDCOEFF);
- else
- flareCoeff = r_flareCoeff->value;
-
+ R_SetFlareCoeff();
r_flareCoeff->modified = qfalse;
}
diff --git a/src/renderergl2/tr_flares.c b/src/renderergl2/tr_flares.c
index 4c047afc..4ac81329 100644
--- a/src/renderergl2/tr_flares.c
+++ b/src/renderergl2/tr_flares.c
@@ -89,6 +89,19 @@ int flareCoeff;
/*
==================
+R_SetFlareCoeff
+==================
+*/
+static void R_SetFlareCoeff( void ) {
+
+ if(r_flareCoeff->value == 0.0f)
+ flareCoeff = atof(FLARE_STDCOEFF);
+ else
+ flareCoeff = r_flareCoeff->value;
+}
+
+/*
+==================
R_ClearFlares
==================
*/
@@ -103,6 +116,8 @@ void R_ClearFlares( void ) {
r_flareStructs[i].next = r_inactiveFlares;
r_inactiveFlares = &r_flareStructs[i];
}
+
+ R_SetFlareCoeff();
}
@@ -452,11 +467,7 @@ void RB_RenderFlares (void) {
if(r_flareCoeff->modified)
{
- if(r_flareCoeff->value == 0.0f)
- flareCoeff = atof(FLARE_STDCOEFF);
- else
- flareCoeff = r_flareCoeff->value;
-
+ R_SetFlareCoeff();
r_flareCoeff->modified = qfalse;
}