Use floating point trig in R_SetSlopePlane

This commit is contained in:
Jaime Ita Passos 2021-04-27 20:42:59 -03:00
parent 1c6296653a
commit 63761a2d07

View file

@ -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);
}