shithub: qk1

Download patch

ref: 27db2993ef83fa6d425700b25d0e2b0570dc974c
parent: 5ffec98ac5535fce363a48640ff3f1c1e7f42f5a
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Tue Oct 31 08:25:02 EDT 2023

force teleport surfaces to be non-transparent

--- a/model.c
+++ b/model.c
@@ -789,8 +789,10 @@
 				out->flags |= SURF_LAVA;
 			if(strstr(out->texinfo->texture->name, "slime") != nil)
 				out->flags |= SURF_SLIME;
-			if(strstr(out->texinfo->texture->name, "tele") != nil)
+			if(strstr(out->texinfo->texture->name, "tele") != nil){
 				out->flags |= SURF_TELE;
+				out->flags &= ~SURF_TRANS;
+			}
 		}else if(out->texinfo->texture->name[0] == '{')
 			out->flags |= SURF_TRANS | SURF_FENCE;
 	}
--- a/r_draw.c
+++ b/r_draw.c
@@ -54,9 +54,8 @@
 surfdrawflags(int flags)
 {
 	if(flags & SURF_TRANS){
-		if((flags & SURF_TELE) != 0 || alphafor(flags) >= 1.0f)
-			if((flags & SURF_FENCE) == 0)
-				return 0;
+		if((flags & SURF_FENCE) == 0 && alphafor(flags) >= 1.0f)
+			return 0;
 		return DRAW_BLEND;
 	}
 	return 0;