From 63d1911c18ea2f814da19cec7d89fe4439be6f90 Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Tue, 11 Mar 2014 12:38:53 -0500 Subject: [PATCH] Parse q3map_sunExt in OpenGL1 too Used for drawing sun, which is supported by both OpenGL1 and OpenGL2. OpenGL2 already parses it. --- code/renderergl1/tr_shader.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/renderergl1/tr_shader.c b/code/renderergl1/tr_shader.c index 2776100b..de3a45c4 100644 --- a/code/renderergl1/tr_shader.c +++ b/code/renderergl1/tr_shader.c @@ -1476,7 +1476,7 @@ static qboolean ParseShader( char **text ) continue; } // sun parms - else if ( !Q_stricmp( token, "q3map_sun" ) ) { + else if ( !Q_stricmp( token, "q3map_sun" ) || !Q_stricmp( token, "q3map_sunExt" ) ) { float a, b; token = COM_ParseExt( text, qfalse ); @@ -1503,6 +1503,9 @@ static qboolean ParseShader( char **text ) tr.sunDirection[0] = cos( a ) * cos( b ); tr.sunDirection[1] = sin( a ) * cos( b ); tr.sunDirection[2] = sin( b ); + + SkipRestOfLine( text ); + continue; } else if ( !Q_stricmp( token, "deformVertexes" ) ) { ParseDeform( text );