From: Reki Date: Sat, 10 Apr 2021 01:10:12 +0000 (-0400) Subject: DrawPolygon : Made 2d not use fog vertex color X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=756a47d5c960972d37db06cc090a62a9b7c72fdf;p=xonotic%2Fdarkplaces.git DrawPolygon : Made 2d not use fog vertex color --- diff --git a/clvm_cmds.c b/clvm_cmds.c index 5681d2d0..4cbb07b5 100644 --- a/clvm_cmds.c +++ b/clvm_cmds.c @@ -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