]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - clvm_cmds.c
bound by 0.1 again (this bounding had its reason) AND by sv_clmovement_waitforinput...
[xonotic/darkplaces.git] / clvm_cmds.c
index 5ed6a046fdd3ed9e621feafa9e41d16476d6b6cd..16c9ce81f4ad356534c7fd52bc372e907ec75917 100644 (file)
@@ -2463,12 +2463,14 @@ static void VM_DrawPolygonCallback (const entity_render_t *ent, const rtlight_t
 {
        int surfacelistindex;
        vmpolygons_t* polys = vmpolygons + PRVM_GetProgNr();
+       R_Mesh_ResetTextureState();
        R_Mesh_Matrix(&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_SetupGenericShader(true);
+
        for (surfacelistindex = 0;surfacelistindex < numsurfaces;)
        {
                int numtriangles = 0;
@@ -2584,7 +2586,7 @@ void VM_CL_R_PolygonBegin (void)
                return;
        }
        picname = PRVM_G_STRING(OFS_PARM0);
-       polys->begin_texture = picname[0] ? Draw_CachePic (picname)->tex : r_texture_white;
+       polys->begin_texture = picname[0] ? Draw_CachePic_Flags (picname, CACHEPICFLAG_NOCLAMP)->tex : r_texture_white;
        polys->begin_drawflag = (int)PRVM_G_FLOAT(OFS_PARM1);
        polys->begin_vertices = 0;
        polys->begin_active = true;