mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-04-07 10:34:48 +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
|
||||
if (slope); else // Don't mess with this right now if a slope is involved
|
||||
#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;
|
||||
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.
|
||||
|
|
Loading…
Reference in a new issue