mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-28 04:51:42 +00:00
Minor refactor.
This commit is contained in:
parent
b924a7d902
commit
79ec8fbf29
1 changed files with 9 additions and 11 deletions
|
|
@ -445,20 +445,18 @@ visplane_t *R_FindPlane(fixed_t height, INT32 picnum, INT32 lightlevel,
|
||||||
#ifdef ESLOPE
|
#ifdef ESLOPE
|
||||||
if (slope); else // Don't mess with this right now if a slope is involved
|
if (slope); else // Don't mess with this right now if a slope is involved
|
||||||
#endif
|
#endif
|
||||||
if (plangle != 0)
|
|
||||||
{
|
|
||||||
// Add the view offset, rotated by the plane angle.
|
|
||||||
fixed_t cosinecomponent = FINECOSINE(plangle>>ANGLETOFINESHIFT);
|
|
||||||
fixed_t sinecomponent = FINESINE(plangle>>ANGLETOFINESHIFT);
|
|
||||||
fixed_t interxoff = xoff + viewx;
|
|
||||||
fixed_t interyoff = yoff + viewy;
|
|
||||||
xoff = FixedMul(interxoff,cosinecomponent)-FixedMul(interyoff,sinecomponent);
|
|
||||||
yoff = -FixedMul(interxoff,sinecomponent)-FixedMul(interyoff,cosinecomponent);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
xoff += viewx;
|
xoff += viewx;
|
||||||
yoff -= viewy;
|
yoff -= viewy;
|
||||||
|
if (plangle != 0)
|
||||||
|
{
|
||||||
|
// Add the view offset, rotated by the plane angle.
|
||||||
|
fixed_t cosinecomponent = FINECOSINE(plangle>>ANGLETOFINESHIFT);
|
||||||
|
fixed_t sinecomponent = FINESINE(plangle>>ANGLETOFINESHIFT);
|
||||||
|
fixed_t oldxoff = xoff;
|
||||||
|
xoff = FixedMul(xoff,cosinecomponent)+FixedMul(yoff,sinecomponent);
|
||||||
|
yoff = -FixedMul(oldxoff,sinecomponent)+FixedMul(yoff,cosinecomponent);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// This appears to fix the Nimbus Ruins sky bug.
|
// This appears to fix the Nimbus Ruins sky bug.
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue