diff options
author | Zack Middleton <zturtleman@gmail.com> | 2013-11-09 16:57:43 -0600 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2014-06-17 17:43:36 +0100 |
commit | a9f515331547b95d2c4813a57e89e8fbf66f161b (patch) | |
tree | 3802bd764194a6f559c5c82dff95de0d14b8e827 /src/renderergl1/tr_flares.c | |
parent | 8239b6a5810ebaa4dd100a051d37a0ba5376ea70 (diff) |
Fix flares being invisible after vid_restart
flareCoeff was only set if r_flareCoeff cvar was set as modified.
Cvars are set as modified when created or changed.
Diffstat (limited to 'src/renderergl1/tr_flares.c')
-rw-r--r-- | src/renderergl1/tr_flares.c | 21 |
1 files changed, 16 insertions, 5 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; } |