mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-11 07:11:54 +00:00
- Fixed: Reference to freed stack object in R_FindPlane. This caused a massive slowdown (90% drop in total performance) in R_FindPlane when built with optimizations on in GCC6. Although I don't really understand why since the comparison should have been O(1) regardless of memory contents and even if the check failed every plane it would still be pretty fast, this is what they mean when they say that anything can happen when undefined behavior is triggered.
This commit is contained in:
parent
ede350ba36
commit
43b2584f79
1 changed files with 2 additions and 1 deletions
|
@ -595,9 +595,10 @@ visplane_t *R_FindPlane (const secplane_t &height, FTextureID picnum, int lightl
|
|||
fixed_t alpha = FLOAT2FIXED(Alpha);
|
||||
//angle_t angle = (xform.Angle + xform.baseAngle).BAMs();
|
||||
|
||||
FTransform nulltransform;
|
||||
|
||||
if (picnum == skyflatnum) // killough 10/98
|
||||
{ // most skies map together
|
||||
FTransform nulltransform;
|
||||
lightlevel = 0;
|
||||
xform = &nulltransform;
|
||||
nulltransform.xOffs = nulltransform.yOffs = nulltransform.baseyOffs = 0;
|
||||
|
|
Loading…
Reference in a new issue