From fdbc4d0e67a1698838c74dccf9fca0ff6fdc4d18 Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Tue, 22 Sep 2020 23:06:36 +1000 Subject: [PATCH] - Build: Fix precision loss when calculating an angle in `renderPrepareMirror()`. --- source/build/src/engine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/build/src/engine.cpp b/source/build/src/engine.cpp index 560bcd6b4..3af581f29 100644 --- a/source/build/src/engine.cpp +++ b/source/build/src/engine.cpp @@ -3605,7 +3605,7 @@ void renderPrepareMirror(int32_t dax, int32_t day, int32_t daz, fixed_t daang, f *tposx = (x<<1) + scale(dx,i,j) - dax; *tposy = (y<<1) + scale(dy,i,j) - day; - *tang = (IntToFixed(getangle(dx, dy) << 1) - daang) & 0x7FFFFFF; + *tang = ((gethiq16angle(dx, dy) << 1) - daang) & 0x7FFFFFF; inpreparemirror = 1;