From 5c4e00694a0a42412b8c5d48027dce3047fce4f0 Mon Sep 17 00:00:00 2001 From: Alug Date: Tue, 12 Dec 2023 09:26:49 +0100 Subject: [PATCH] uh oops accidentally broke polyobjects --- src/hardware/hw_main.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index 3e3e23375..99b75a181 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -3405,8 +3405,11 @@ void HWR_RenderPolyObjectPlane(polyobj_t *polysector, boolean isceiling, fixed_t } // reference point for flat texture coord for each vertex around the polygon - flatxref = (float)((polysector->origVerts[0].x & (~flatflag)) / fflatsize); - flatyref = (float)((polysector->origVerts[0].y & (~flatflag)) / fflatsize); + flatxref = FIXED_TO_FLOAT(polysector->origVerts[0].x); + flatyref = FIXED_TO_FLOAT(polysector->origVerts[0].y); + + flatxref = (float)(((fixed_t)flatxref & (~flatflag)) / fflatsize); + flatyref = (float)(((fixed_t)flatyref & (~flatflag)) / fflatsize); // transform v3d = planeVerts;