fix for gl_contrast and presets breaking hexen2's particles.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4155 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2012-11-27 23:50:58 +00:00
parent ca9bad4f1a
commit e82dd608a6
2 changed files with 13 additions and 4 deletions

View file

@ -425,6 +425,7 @@ const char *presetexec[] =
"m_preset_chosen 1;"
"gl_texturemode nn;"
"r_particlesystem null;"
"r_particledesc \"\";"
"r_stains 0;"
"r_drawflat 1;"
"r_nolerp 1;"
@ -450,6 +451,7 @@ const char *presetexec[] =
, // fast options
"gl_texturemode ln;"
"r_particlesystem classic;"
"r_particledesc classic;"
"r_drawflat 0;"
"r_nolerp 0;"
"gl_flashblend 1;"
@ -459,7 +461,7 @@ const char *presetexec[] =
"r_lavastyle 1;"
"r_nolightdir 0;"
, // normal options
, // normal (faithful) options
#ifdef MINIMAL
"r_particlesystem classic;"
#else
@ -510,10 +512,17 @@ static void ApplyPreset (int presetnum)
// TODO: work backwards and only set cvars once
for (i = 0; i <= presetnum; i++)
{
Cbuf_AddText(presetexec[i], Cmd_ExecLevel);
Cbuf_AddText("\n", Cmd_ExecLevel);
Cbuf_AddText(presetexec[i], RESTRICT_LOCAL);
Cbuf_AddText("\n", RESTRICT_LOCAL);
Cbuf_Execute(); // hack
}
//make sure the presets always set up particles correctly for certain other game modes.
if (M_GameType() == MGT_HEXEN2)
{
Cbuf_AddText("r_particledesc $r_particledesc h2part\n", RESTRICT_LOCAL);
Cbuf_Execute();
}
}
void M_Menu_Preset_f (void)

View file

@ -795,7 +795,7 @@ void R2D_BrightenScreen (void)
RSpeedMark();
if (gl_contrast.value != 1.0 && gl_brightness.value != 0)
if (gl_contrast.value == 1.0 && gl_brightness.value == 0)
return;
if (r_refdef.flags & Q2RDF_NOWORLDMODEL)