From 22bd451872f7b26b7586d1e25ba5664399e4d509 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 5 Sep 2022 00:42:59 +0200 Subject: [PATCH] - minor math cleanup --- source/games/sw/src/mclip.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/source/games/sw/src/mclip.cpp b/source/games/sw/src/mclip.cpp index a75e16276..957533a0c 100644 --- a/source/games/sw/src/mclip.cpp +++ b/source/games/sw/src/mclip.cpp @@ -140,9 +140,7 @@ int MultiClipTurn(PLAYER* pp, DAngle new_ang, double zz, double floordist) DVector2 vect = ang.ToVector() * 1024 * sop->clipbox_vdist[i]; Collision coll; - int xvect = vect.X * 16 * worldtoint; // note: this means clipmove input is Q18.14! - int yvect = vect.Y * 16 * worldtoint; - clipmove(spos, &cursect, xvect, yvect, (int)sop->clipbox_dist[i], Z(4), int(floordist * zworldtoint), CLIPMASK_PLAYER, coll); + clipmove(spos, &cursect, FloatToFixed<18>(vect.X), FixedToFloat<18>(vect.Y), (int)sop->clipbox_dist[i], Z(4), int(floordist * zworldtoint), CLIPMASK_PLAYER, coll); ASSERT(cursect);