Fix model lighting toggle

This commit is contained in:
NepDisk 2026-04-29 13:12:24 -04:00
parent 3c2a60c8c5
commit abd4566fc0
3 changed files with 6 additions and 2 deletions

View file

@ -103,7 +103,7 @@
#define ASSET_HASH_TEXTURES_KART 0xb4211b2f32b6a291
#define ASSET_HASH_CHARS_KART 0x1e68a3e01aa5c68b
#define ASSET_HASH_MAPS_KART 0x38558ed00da41ce9
#define ASSET_HASH_MAIN_PK3 0xcd8d53ee3d0a1524
#define ASSET_HASH_MAIN_PK3 0x879cc03b9af3a095
#define ASSET_HASH_MAPPATCH_PK3 0x1745690024efbaf8
#define ASSET_HASH_BONUSCHARS_KART 0x60e6f13d822a7461
#ifdef USE_PATCH_FILE

View file

@ -917,7 +917,7 @@ void CV_glpalettedepth_OnChange(void);
void CV_gllightdithering_OnChange(void);
consvar_t cv_glpaletterendering = CVAR_INIT ("gr_paletteshader", "Off", CV_CALL|CV_SAVE, CV_OnOff, CV_glpaletterendering_OnChange);
consvar_t cv_glpalettedepth = CVAR_INIT ("gr_palettedepth", "16 bits", CV_SAVE|CV_CALL, glpalettedepth_cons_t, CV_glpalettedepth_OnChange);
consvar_t cv_glpalettedepth = CVAR_INIT ("gr_palettedepth", "24 bits", CV_SAVE|CV_CALL, glpalettedepth_cons_t, CV_glpalettedepth_OnChange);
consvar_t cv_gllightdither = CVAR_INIT ("gr_lightdithering", "Off", CV_CALL|CV_SAVE, CV_OnOff, CV_gllightdithering_OnChange);

View file

@ -866,6 +866,10 @@ void GL_SetShader(int slot)
return;
}
// If using model lighting, set the appropriate shader.
if (slot == SHADER_MODEL && model_lighting)
slot = SHADER_MODEL_LIGHTING;
if (gl_allowshaders)
{
gl_shader_t *next_shader = &gl_shaders[slot]; // the gl_shader_t we are going to switch to