]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
fix gl_combine 0 crashes (it was indexing the color vector as if it was a vertex...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 4 Apr 2005 18:46:20 +0000 (18:46 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 4 Apr 2005 18:46:20 +0000 (18:46 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5154 d7cf8633-e32d-0410-b094-e92efae38249

r_shadow.c

index f5cbf9fa2b90655b3b7f25eacb23a50c7afbabdc..534243acdce009329cb09e21cca342cb30d7183e 100644 (file)
@@ -2391,9 +2391,9 @@ void R_Shadow_RenderLighting(int firstvertex, int numvertices, int numtriangles,
                                if (r_textureunits.integer >= 3)
                                        GL_Color(color[0], color[1], color[2], 1);
                                else if (r_textureunits.integer >= 2)
-                                       R_Shadow_VertexNoShadingWithZAttenuation(numvertices, vertex3f + 3 * firstvertex, color + 3 * firstvertex, matrix_modeltolight);
+                                       R_Shadow_VertexNoShadingWithZAttenuation(numvertices, vertex3f + 3 * firstvertex, color, matrix_modeltolight);
                                else
-                                       R_Shadow_VertexNoShadingWithXYZAttenuation(numvertices, vertex3f + 3 * firstvertex, color + 3 * firstvertex, matrix_modeltolight);
+                                       R_Shadow_VertexNoShadingWithXYZAttenuation(numvertices, vertex3f + 3 * firstvertex, color, matrix_modeltolight);
                                GL_LockArrays(firstvertex, numvertices);
                                R_Mesh_Draw(firstvertex, numvertices, numtriangles, elements);
                                GL_LockArrays(0, 0);
@@ -2441,11 +2441,11 @@ void R_Shadow_RenderLighting(int firstvertex, int numvertices, int numtriangles,
                                color[1] = bound(0, color2[1], 1);
                                color[2] = bound(0, color2[2], 1);
                                if (r_textureunits.integer >= 3)
-                                       R_Shadow_VertexShading(numvertices, vertex3f + 3 * firstvertex, normal3f + 3 * firstvertex, color + 3 * firstvertex, matrix_modeltolight);
+                                       R_Shadow_VertexShading(numvertices, vertex3f + 3 * firstvertex, normal3f + 3 * firstvertex, color, matrix_modeltolight);
                                else if (r_textureunits.integer >= 2)
-                                       R_Shadow_VertexShadingWithZAttenuation(numvertices, vertex3f + 3 * firstvertex, normal3f + 3 * firstvertex, color + 3 * firstvertex, matrix_modeltolight);
+                                       R_Shadow_VertexShadingWithZAttenuation(numvertices, vertex3f + 3 * firstvertex, normal3f + 3 * firstvertex, color, matrix_modeltolight);
                                else
-                                       R_Shadow_VertexShadingWithXYZAttenuation(numvertices, vertex3f + 3 * firstvertex, normal3f + 3 * firstvertex, color + 3 * firstvertex, matrix_modeltolight);
+                                       R_Shadow_VertexShadingWithXYZAttenuation(numvertices, vertex3f + 3 * firstvertex, normal3f + 3 * firstvertex, color, matrix_modeltolight);
                                GL_LockArrays(firstvertex, numvertices);
                                R_Mesh_Draw(firstvertex, numvertices, numtriangles, elements);
                                GL_LockArrays(0, 0);