From 27e1ee710ca31c6c9873507a3535ea8bb41a88c1 Mon Sep 17 00:00:00 2001
From: Lactozilla <jp6781615@gmail.com>
Date: Sun, 19 May 2024 15:28:55 -0300
Subject: [PATCH] Fix #1248

---
 src/p_maputl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/p_maputl.c b/src/p_maputl.c
index 242bc559e8..f00534d639 100644
--- a/src/p_maputl.c
+++ b/src/p_maputl.c
@@ -501,7 +501,7 @@ void P_LineOpening(line_t *linedef, mobj_t *mobj)
 
 			if (texnum) {
 				// Get the midtexture's height
-				texheight = textures[texnum]->height << FRACBITS;
+				texheight = FixedDiv(textureheight[texnum], abs(side->scaley_mid));
 
 				// Set texbottom and textop to the Z coordinates of the texture's boundaries
 #if 0
-- 
GitLab