shithub: qk1

Download patch

ref: d1931bf174c8906ac085354fa875ac2dae2be8c6
parent: 222304b063eeafe1abe032b20a7a831d09174397
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Thu Dec 21 20:10:30 EST 2023

fence textures: enable scaling for bsp30; keep lower miplevel

--- a/d_edge.c
+++ b/d_edge.c
@@ -177,6 +177,8 @@
 
 			pface = s->data;
 			miplevel = D_MipLevelForScale(s->nearzi * scale_for_mip * pface->texinfo->mipadjust);
+			if(s->flags & SURF_FENCE)
+				miplevel = max(miplevel-1, 0);
 
 			// FIXME: make this passed in to D_CacheSurface
 			pcurrentcache = D_CacheSurface(pface, miplevel);
--- a/i_wad.c
+++ b/i_wad.c
@@ -218,8 +218,7 @@
 	if((n = W_ReadPixelsAt(wad, name, off, lmp->off+lmp->sz-off, t->pixels, n)) < 0)
 		werrstr("%s: %s", name, lerr());
 
-	// looks shit either way on cs_italy
-	if(0 && name[0] == '{'){
+	if(name[0] == '{'){
 		for(i = 1; i < MIPLEVELS; i++){
 			w /= 2;
 			h /= 2;