fix precip overflow
This commit is contained in:
1 parent
75ed11a8b6
commit
22166ceccb
1 file changed
+4
-3
+4
-3
@@ -10283,7 +10283,8 @@ void P_PrecipitationEffects(void)
|
||||
volume = 255; // Sky above? We get it full blast.
|
||||
else
|
||||
{
|
||||
fixed_t x, y, yl, yh, xl, xh;
|
||||
/* GCC is optimizing away y >= yl, FUCK YOU */
|
||||
volatile fixed_t x, y, yl, yh, xl, xh;
|
||||
fixed_t closedist, newdist;
|
||||
|
||||
// Essentially check in a 1024 unit radius of the player for an outdoor area.
|
||||
@@ -10292,8 +10293,8 @@ void P_PrecipitationEffects(void)
|
||||
xl = players[displayplayers[0]].mo->x - 1024*FRACUNIT;
|
||||
xh = players[displayplayers[0]].mo->x + 1024*FRACUNIT;
|
||||
closedist = 2048*FRACUNIT;
|
||||
for (y = yl; y <= yh; y += FRACUNIT*64)
|
||||
for (x = xl; x <= xh; x += FRACUNIT*64)
|
||||
for (y = yl; y >= yl && y <= yh; y += FRACUNIT*64)
|
||||
for (x = xl; x >= xl && x <= xh; x += FRACUNIT*64)
|
||||
{
|
||||
if (R_PointInSubsector(x, y)->sector->ceilingpic == skyflatnum) // Found the outdoors!
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user