mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 09:11:48 +00:00
Use floating-point math for polyobject planes as well.
This commit is contained in:
parent
2df75610e6
commit
6ff212b79f
1 changed files with 5 additions and 3 deletions
|
@ -380,9 +380,11 @@ visplane_t *R_FindPlane(fixed_t height, INT32 picnum, INT32 lightlevel,
|
|||
{
|
||||
if (polyobj->angle != 0)
|
||||
{
|
||||
angle_t fineshift = polyobj->angle >> ANGLETOFINESHIFT;
|
||||
xoff -= FixedMul(FINECOSINE(fineshift), polyobj->centerPt.x)+FixedMul(FINESINE(fineshift), polyobj->centerPt.y);
|
||||
yoff -= FixedMul(FINESINE(fineshift), polyobj->centerPt.x)-FixedMul(FINECOSINE(fineshift), polyobj->centerPt.y);
|
||||
float ang = ANG2RAD(polyobj->angle);
|
||||
float x = FixedToFloat(polyobj->centerPt.x);
|
||||
float y = FixedToFloat(polyobj->centerPt.y);
|
||||
xoff -= FloatToFixed(x * cos(ang) + y * sin(ang));
|
||||
yoff -= FloatToFixed(x * sin(ang) - y * cos(ang));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue