Fix airbob sectors fucking up when below 0 z-height.

This commit is contained in:
toasterbabe 2017-09-25 20:35:04 +01:00 committed by Monster Iestyn
parent 57a7a3bed8
commit a1620b709e

View file

@ -5216,13 +5216,11 @@ static void P_AddOldAirbob(sector_t *sec, line_t *sourceline, boolean noadjust)
airbob->vars[2] = FRACUNIT; airbob->vars[2] = FRACUNIT;
if (noadjust) if (noadjust)
{
airbob->vars[7] = airbob->sector->ceilingheight-16*FRACUNIT; airbob->vars[7] = airbob->sector->ceilingheight-16*FRACUNIT;
airbob->vars[6] = airbob->vars[7]
- (sec->ceilingheight - sec->floorheight);
}
else else
airbob->vars[7] = airbob->sector->ceilingheight - P_AproxDistance(sourceline->dx, sourceline->dy); airbob->vars[7] = airbob->sector->ceilingheight - P_AproxDistance(sourceline->dx, sourceline->dy);
airbob->vars[6] = airbob->vars[7]
- (sec->ceilingheight - sec->floorheight);
airbob->vars[3] = airbob->vars[2]; airbob->vars[3] = airbob->vars[2];