From 163bf9e491e7fb1523020fccc262adfc930c96b6 Mon Sep 17 00:00:00 2001 From: toaster Date: Mon, 31 Oct 2022 10:51:20 +0000 Subject: [PATCH] Resolve mixed declarations It's the collective opinion of Kart Krew's coders that sticking to C90 spec isn't healthy... but while the compiler still warns for it in the v1 buildflags, avoid undesired reports. --- src/hardware/hw_main.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index 15a30764b..f01bc5cd8 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -3021,6 +3021,7 @@ static void HWR_RotateSpritePolyToAim(gr_vissprite_t *spr, FOutVector *wallVerts { // uncapped/interpolation interpmobjstate_t interp = {0}; + float basey, lowy; // do interpolation if (R_UsingFrameInterpolation() && !paused) @@ -3032,12 +3033,16 @@ static void HWR_RotateSpritePolyToAim(gr_vissprite_t *spr, FOutVector *wallVerts R_InterpolateMobjState(spr->mobj, FRACUNIT, &interp); } - float basey = FIXED_TO_FLOAT(interp.z); - float lowy = wallVerts[0].y; if (P_MobjFlip(spr->mobj) == -1) { basey = FIXED_TO_FLOAT(interp.z + spr->mobj->height); } + else + { + basey = FIXED_TO_FLOAT(interp.z); + } + lowy = wallVerts[0].y; + // Rotate sprites to fully billboard with the camera // X, Y, AND Z need to be manipulated for the polys to rotate around the // origin, because of how the origin setting works I believe that should