Don't override custom shaders with model lighting shader

This commit is contained in:
Hannu Hanhi 2020-07-18 15:48:37 +03:00
parent c1cf41fb0c
commit 92ebbdfc10

View file

@ -1107,8 +1107,9 @@ EXPORT void HWRAPI(SetShader) (int shader)
if (gl_allowshaders)
{
// If using model lighting, set the appropriate shader.
// However don't override a custom shader.
// Should use an enum or something...
if (shader == 4 && model_lighting)
if (shader == 4 && model_lighting && !gl_shaderprograms[4].custom)
shader = 8;
if ((GLuint)shader != gl_currentshaderprogram)
{