]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - clvm_cmds.c
fix the EndIncreaseEdicts handlers as edicts beyond num_edicts are not initialized yet
[xonotic/darkplaces.git] / clvm_cmds.c
index 2c6fb4fefd49600c327784e8197b4b3821870621..06d1d648df927f6ba0c8dbeef63c3ef87db1e208 100644 (file)
@@ -2929,9 +2929,7 @@ static void VM_DrawPolygonCallback (const entity_render_t *ent, const rtlight_t
        R_Mesh_ResetTextureState();
        R_EntityMatrix(&identitymatrix);
        GL_CullFace(GL_NONE);
-       R_Mesh_VertexPointer(polys->data_vertex3f, 0, 0);
-       R_Mesh_ColorPointer(polys->data_color4f, 0, 0);
-       R_Mesh_TexCoordPointer(0, 2, polys->data_texcoord2f, 0, 0);
+       R_Mesh_PrepareVertices_Generic_Arrays(polys->num_vertices, polys->data_vertex3f, polys->data_color4f, polys->data_texcoord2f);
 
        for (surfacelistindex = 0;surfacelistindex < numsurfaces;)
        {
@@ -2959,7 +2957,7 @@ static void VM_DrawPolygonCallback (const entity_render_t *ent, const rtlight_t
                        VectorCopy(polys->data_triangles[surfacelist[surfacelistindex]].elements, polys->data_sortedelement3s + 3*numtriangles);
                        numtriangles++;
                }
-               R_Mesh_Draw(0, polys->num_vertices, 0, numtriangles, NULL, polys->data_sortedelement3s, 0, 0);
+               R_Mesh_Draw(0, polys->num_vertices, 0, numtriangles, NULL, NULL, 0, polys->data_sortedelement3s, NULL, 0);
        }
 }