Fix monitors (and other objects) on a floating, bobbing FOF being stuck slightly above said FOF after it has finished bobbing

This commit is contained in:
Monster Iestyn 2018-11-12 16:23:59 +00:00
parent fced19d291
commit 63ba59341b

View file

@ -811,6 +811,8 @@ void T_BounceCheese(levelspecthink_t *bouncer)
{
bouncer->sector->ceilingheight = actionsector->ceilingheight;
bouncer->sector->floorheight = bouncer->sector->ceilingheight - (halfheight*2);
T_MovePlane(bouncer->sector, 0, bouncer->sector->ceilingheight, 0, 1, -1); // update things on ceiling
T_MovePlane(bouncer->sector, 0, bouncer->sector->floorheight, 0, 0, -1); // update things on floor
P_RecalcPrecipInSector(actionsector);
bouncer->sector->ceilingdata = NULL;
bouncer->sector->floordata = NULL;
@ -825,6 +827,8 @@ void T_BounceCheese(levelspecthink_t *bouncer)
{
bouncer->sector->ceilingheight = floorheight + (halfheight << 1);
bouncer->sector->floorheight = floorheight;
T_MovePlane(bouncer->sector, 0, bouncer->sector->ceilingheight, 0, 1, -1); // update things on ceiling
T_MovePlane(bouncer->sector, 0, bouncer->sector->floorheight, 0, 0, -1); // update things on floor
P_RecalcPrecipInSector(actionsector);
bouncer->sector->ceilingdata = NULL;
bouncer->sector->floordata = NULL;
@ -841,9 +845,9 @@ void T_BounceCheese(levelspecthink_t *bouncer)
}
T_MovePlane(bouncer->sector, bouncer->speed/2, bouncer->sector->ceilingheight -
70*FRACUNIT, 0, 1, -1); // move floor
70*FRACUNIT, 0, 1, -1); // move ceiling
T_MovePlane(bouncer->sector, bouncer->speed/2, bouncer->sector->floorheight - 70*FRACUNIT,
0, 0, -1); // move ceiling
0, 0, -1); // move floor
bouncer->sector->floorspeed = -bouncer->speed/2;
bouncer->sector->ceilspeed = 42;
@ -893,6 +897,8 @@ void T_BounceCheese(levelspecthink_t *bouncer)
{
bouncer->sector->floorheight = bouncer->floorwasheight;
bouncer->sector->ceilingheight = bouncer->ceilingwasheight;
T_MovePlane(bouncer->sector, 0, bouncer->sector->ceilingheight, 0, 1, -1); // update things on ceiling
T_MovePlane(bouncer->sector, 0, bouncer->sector->floorheight, 0, 0, -1); // update things on floor
bouncer->sector->ceilingdata = NULL;
bouncer->sector->floordata = NULL;
bouncer->sector->floorspeed = 0;