mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Use floating-point math for polyobject planes as well.
This commit is contained in:
parent
167d30efc2
commit
6d58afe071
1 changed files with 5 additions and 3 deletions
|
|
@ -390,9 +390,11 @@ visplane_t *R_FindPlane(fixed_t height, INT32 picnum, INT32 lightlevel,
|
||||||
{
|
{
|
||||||
if (polyobj->angle != 0)
|
if (polyobj->angle != 0)
|
||||||
{
|
{
|
||||||
angle_t fineshift = polyobj->angle >> ANGLETOFINESHIFT;
|
float ang = ANG2RAD(polyobj->angle);
|
||||||
xoff -= FixedMul(FINECOSINE(fineshift), polyobj->centerPt.x)+FixedMul(FINESINE(fineshift), polyobj->centerPt.y);
|
float x = FixedToFloat(polyobj->centerPt.x);
|
||||||
yoff -= FixedMul(FINESINE(fineshift), polyobj->centerPt.x)-FixedMul(FINECOSINE(fineshift), polyobj->centerPt.y);
|
float y = FixedToFloat(polyobj->centerPt.y);
|
||||||
|
xoff -= FloatToFixed(x * cos(ang) + y * sin(ang));
|
||||||
|
yoff -= FloatToFixed(x * sin(ang) - y * cos(ang));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue