]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
DrawPolygon : Made 2d not use fog vertex color
authorReki <spiper212@gmail.com>
Sat, 10 Apr 2021 01:10:12 +0000 (21:10 -0400)
committerReki <spiper212@gmail.com>
Sat, 10 Apr 2021 01:10:12 +0000 (21:10 -0400)
clvm_cmds.c

index 5681d2d0287622ddf3ce1502fa28cddbaaedbd04..4cbb07b55dd1e4d32134cc9b7ebb4ad936d0e7c4 100644 (file)
@@ -4177,10 +4177,11 @@ static void VM_CL_R_PolygonEnd (prvm_prog_t *prog)
        materialflags = MATERIALFLAG_WALL;
        if (csqc_polygons_defaultmaterial_nocullface.integer)
                materialflags |= MATERIALFLAG_NOCULLFACE;
-       if (hascolor)
+       if (hascolor || prog->polygonbegin_guess2d) // added 2d check because fog is drawing over my shit
                materialflags |= MATERIALFLAG_VERTEXCOLOR;
        if (hasalpha)
                materialflags |= MATERIALFLAG_ALPHAGEN_VERTEX | MATERIALFLAG_ALPHA | MATERIALFLAG_BLENDED | MATERIALFLAG_NOSHADOW;
+       
        tex = Mod_Mesh_GetTexture(mod, prog->polygonbegin_texname, prog->polygonbegin_drawflags, TEXF_ALPHA, materialflags);
        surf = Mod_Mesh_AddSurface(mod, tex, false);
        // create triangle fan