From 63761a2d07f7b336eb4f7a26778fffd04a38f810 Mon Sep 17 00:00:00 2001
From: Jaime Ita Passos <jp6781615@gmail.com>
Date: Tue, 27 Apr 2021 20:42:59 -0300
Subject: [PATCH] Use floating point trig in R_SetSlopePlane

---
 src/r_plane.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/r_plane.c b/src/r_plane.c
index 355260a11e..3ea0465958 100644
--- a/src/r_plane.c
+++ b/src/r_plane.c
@@ -742,10 +742,10 @@ void R_SetSlopePlane(pslope_t *slope, fixed_t xpos, fixed_t ypos, fixed_t zpos,
 	n->x = sin(ang);
 	n->z = -cos(ang);
 
-	plangle >>= ANGLETOFINESHIFT;
-	temp = P_GetSlopeZAt(slope, xpos + FINESINE(plangle), ypos + FINECOSINE(plangle));
+	ang = ANG2RAD(plangle);
+	temp = P_GetSlopeZAt(slope, xpos + FloatToFixed(sin(ang)), ypos + FloatToFixed(cos(ang)));
 	m->y = FixedToFloat(temp - height);
-	temp = P_GetSlopeZAt(slope, xpos + FINECOSINE(plangle), ypos - FINESINE(plangle));
+	temp = P_GetSlopeZAt(slope, xpos + FloatToFixed(cos(ang)), ypos - FloatToFixed(sin(ang)));
 	n->y = FixedToFloat(temp - height);
 }
 
-- 
GitLab