- Use tests less prone to overflow on very steep slopes when detecting which side of a plane
the camera is on. Mostly, this means testing the distance of the camera to the plane rather than computing the plane's Z at the camera and comparing that with the camera's Z. SVN r4220 (trunk)
This commit is contained in:
parent
c069295f19
commit
a50e670c0c
6 changed files with 30 additions and 24 deletions
|
|
@ -1697,7 +1697,7 @@ void R_DrawTiltedPlane (visplane_t *pl, fixed_t alpha, bool additive, bool maske
|
|||
plane_sz[0] = -plane_sz[0];
|
||||
}
|
||||
|
||||
planelightfloat = (r_TiltVisibility * lxscale * lyscale) / (float)(abs(pl->height.ZatPoint (viewx, viewy) - viewz));
|
||||
planelightfloat = (r_TiltVisibility * lxscale * lyscale) / (fabs(pl->height.ZatPoint(FIXED2DBL(viewx), FIXED2DBL(viewy)) - FIXED2DBL(viewz))) / 65536.0;
|
||||
|
||||
if (pl->height.c > 0)
|
||||
planelightfloat = -planelightfloat;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue