mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-02-26 22:01:43 +00:00
- Use doubles in side_t::GetLightLevel() because floats add store/loads to reduce the x87
registers to float precision, whereas doubles don't. SVN r2473 (polyobjects)
This commit is contained in:
parent
d4fbebcd3d
commit
828bb723e5
1 changed files with 4 additions and 4 deletions
|
@ -1480,11 +1480,11 @@ int side_t::GetLightLevel (bool foggy, int baselight, int *pfakecontrast) const
|
||||||
if (((level.flags2 & LEVEL2_SMOOTHLIGHTING) || (Flags & WALLF_SMOOTHLIGHTING) || r_fakecontrast == 2) &&
|
if (((level.flags2 & LEVEL2_SMOOTHLIGHTING) || (Flags & WALLF_SMOOTHLIGHTING) || r_fakecontrast == 2) &&
|
||||||
linedef->dx != 0)
|
linedef->dx != 0)
|
||||||
{
|
{
|
||||||
rel = int // OMG LEE KILLOUGH LIVES! :/
|
rel = xs_RoundToInt // OMG LEE KILLOUGH LIVES! :/
|
||||||
(
|
(
|
||||||
(float(level.WallHorizLight)
|
level.WallHorizLight
|
||||||
+abs(atan(float(linedef->dy)/float(linedef->dx))/float(1.57079))
|
+ fabs(atan(double(linedef->dy) / linedef->dx) / 1.57079)
|
||||||
*float(level.WallVertLight - level.WallHorizLight))
|
* (level.WallVertLight - level.WallHorizLight)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue