mirror of
https://github.com/ioquake/ioq3.git
synced 2024-11-10 07:11:46 +00:00
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.
This commit is contained in:
parent
ae57eebf52
commit
d526eacd10
2 changed files with 32 additions and 10 deletions
|
@ -86,6 +86,19 @@ flare_t *r_activeFlares, *r_inactiveFlares;
|
|||
|
||||
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
|
||||
|
@ -102,6 +115,8 @@ void R_ClearFlares( void ) {
|
|||
r_flareStructs[i].next = r_inactiveFlares;
|
||||
r_inactiveFlares = &r_flareStructs[i];
|
||||
}
|
||||
|
||||
R_SetFlareCoeff();
|
||||
}
|
||||
|
||||
|
||||
|
@ -450,11 +465,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;
|
||||
}
|
||||
|
||||
|
|
|
@ -86,6 +86,19 @@ flare_t *r_activeFlares, *r_inactiveFlares;
|
|||
|
||||
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
|
||||
|
@ -102,6 +115,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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue