From 756a47d5c960972d37db06cc090a62a9b7c72fdf Mon Sep 17 00:00:00 2001 From: Reki Date: Fri, 9 Apr 2021 21:10:12 -0400 Subject: [PATCH] DrawPolygon : Made 2d not use fog vertex color --- clvm_cmds.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- 2.39.2