mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2024-11-10 06:31:47 +00:00
OpenGL2: Fix MD3 surface with zero shaders dividing by zero
Reported by @DescX.
This commit is contained in:
parent
ac4802af8d
commit
d824cfa5a2
1 changed files with 2 additions and 5 deletions
|
@ -376,12 +376,9 @@ void R_AddMD3Surfaces( trRefEntity_t *ent ) {
|
|||
else if (shader->defaultShader) {
|
||||
ri.Printf( PRINT_DEVELOPER, "WARNING: shader %s in skin %s not found\n", shader->name, skin->name);
|
||||
}
|
||||
//} else if ( surface->numShaders <= 0 ) {
|
||||
//shader = tr.defaultShader;
|
||||
} else if ( surface->numShaderIndexes <= 0 ) {
|
||||
shader = tr.defaultShader;
|
||||
} else {
|
||||
//md3Shader = (md3Shader_t *) ( (byte *)surface + surface->ofsShaders );
|
||||
//md3Shader += ent->e.skinNum % surface->numShaders;
|
||||
//shader = tr.shaders[ md3Shader->shaderIndex ];
|
||||
shader = tr.shaders[ surface->shaderIndexes[ ent->e.skinNum % surface->numShaderIndexes ] ];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue