[ioquake3] 20/33: OpenGL2: Fix MD3 surface with zero shaders dividing by zero
Simon McVittie
smcv at debian.org
Mon Oct 30 14:00:27 UTC 2017
This is an automated email from the git hooks/post-receive script.
smcv pushed a commit to branch debian/master
in repository ioquake3.
commit d824cfa5a2ced2cfbfbc89509b8415aefd30949b
Author: Zack Middleton <zack at cloemail.com>
Date: Wed Oct 4 21:00:00 2017 -0500
OpenGL2: Fix MD3 surface with zero shaders dividing by zero
Reported by @DescX.
---
code/renderergl2/tr_mesh.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/code/renderergl2/tr_mesh.c b/code/renderergl2/tr_mesh.c
index 53bccb4..4f2c672 100644
--- a/code/renderergl2/tr_mesh.c
+++ b/code/renderergl2/tr_mesh.c
@@ -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 ] ];
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/ioquake3.git
More information about the Pkg-games-commits
mailing list