From 85be297a2deecab2200fb4e6010978611d95c1d1 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 3 Sep 2022 22:37:18 +0200 Subject: [PATCH] - part of RefreshPoints --- source/games/sw/src/track.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/source/games/sw/src/track.cpp b/source/games/sw/src/track.cpp index a5dcd245c..08f61e206 100644 --- a/source/games/sw/src/track.cpp +++ b/source/games/sw/src/track.cpp @@ -1792,12 +1792,11 @@ void RefreshPoints(SECTOR_OBJECT* sop, int nx, int ny, bool dynamic) } else { - int xmul = int(sop->scale_dist * sop->scale_x_mult)>>4; - int ymul = int(sop->scale_dist * sop->scale_y_mult)>>4; - DVector2 mul(xmul / 16., ymul / 16.); + double xmul = (sop->scale_dist * sop->scale_x_mult) / 256.; + double ymul = (sop->scale_dist * sop->scale_y_mult) / 256.; - dpos.X = pos.X + mul.X * ang.Cos(); - dpos.Y = pos.Y + mul.Y * ang.Sin(); + dpos.X = pos.X + xmul * ang.Cos(); + dpos.Y = pos.Y + ymul * ang.Sin(); } } }