]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - clvm_cmds.c
fix a display issue with warpzone decals I caused in my last change
[xonotic/darkplaces.git] / clvm_cmds.c
index cae5257c728634327455d48ca80d2aa532ab0c22..2cb6c074e69925927132a03543fcf3327c47f6bc 100644 (file)
@@ -1258,7 +1258,7 @@ static void VM_CL_pointparticles (void)
 static void VM_CL_boxparticles (void)
 {
        int effectnum;
-       prvm_edict_t *own;
+       // prvm_edict_t *own;
        float *origin_from, *origin_to, *dir_from, *dir_to;
        float count;
        int flags;
@@ -1267,7 +1267,7 @@ static void VM_CL_boxparticles (void)
        VM_SAFEPARMCOUNTRANGE(7, 8, VM_CL_boxparticles);
 
        effectnum = (int)PRVM_G_FLOAT(OFS_PARM0);
-       own = PRVM_G_EDICT(OFS_PARM1); // TODO find use for this
+       // own = PRVM_G_EDICT(OFS_PARM1); // TODO find use for this
        origin_from = PRVM_G_VECTOR(OFS_PARM2);
        origin_to = PRVM_G_VECTOR(OFS_PARM3);
        dir_from = PRVM_G_VECTOR(OFS_PARM4);
@@ -3075,7 +3075,9 @@ static void VM_DrawPolygonCallback (const entity_render_t *ent, const rtlight_t
        R_Mesh_ResetTextureState();
        R_EntityMatrix(&identitymatrix);
        GL_CullFace(GL_NONE);
-       R_Mesh_PrepareVertices_Generic_Arrays(polys->num_vertices, polys->data_vertex3f, polys->data_color4f, polys->data_texcoord2f);
+       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);
 
        for (surfacelistindex = 0;surfacelistindex < numsurfaces;)
        {
@@ -3092,7 +3094,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, NULL, 0, polys->data_sortedelement3s, NULL, 0);
+               R_Mesh_Draw(0, polys->num_vertices, 0, numtriangles, NULL, polys->data_sortedelement3s, 0, 0);
        }
 }