shithub: qk1

Download patch

ref: 0570725cbd9dfbf3268d12b5ba32b984931efd6f
parent: 11daf02d521a0e7d13085167e81246d9b1e88283
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Fri Jan 5 13:06:24 EST 2024

alpha: draw entities with no alpha set (fences) first

--- a/r_main.c
+++ b/r_main.c
@@ -718,8 +718,12 @@
 	R_RenderBlendedBrushes();
 	// FIXME(sigrid): these need to be sorted with blended brushes and *all* drawn back to front
 	if(cl_numvisedicts > 0){
-		for(i = cl_numvisedicts, e = ent_reject; e != nil && i > 0; e = e->last_reject)
-			cl_visedicts[--i] = e;
+		for(i = cl_numvisedicts, e = ent_reject; e != nil && i > 0; e = e->last_reject){
+			if(!enthasalpha(e))
+				R_DrawEntity(e);
+			else
+				cl_visedicts[--i] = e;
+		}
 		for(; i < cl_numvisedicts; i++)
 			R_DrawEntity(cl_visedicts[i]);
 	}