mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-26 04:30:55 +00:00
Fix incorrect turnaround behavior for bounceFloor and bounceCeiling
This commit is contained in:
parent
c4775ed37b
commit
a8e32cfe12
2 changed files with 9 additions and 4 deletions
|
@ -86,14 +86,17 @@ void T_MoveCeiling(ceiling_t *ceiling)
|
|||
if (dest == lines[ceiling->sourceline].frontsector->ceilingheight)
|
||||
{
|
||||
dest = lines[ceiling->sourceline].backsector->ceilingheight;
|
||||
ceiling->speed = ceiling->origspeed = lines[ceiling->sourceline].args[3] << (FRACBITS - 2); // return trip, use args[3]
|
||||
ceiling->origspeed = lines[ceiling->sourceline].args[3] << (FRACBITS - 2); // return trip, use args[3]
|
||||
}
|
||||
else
|
||||
{
|
||||
dest = lines[ceiling->sourceline].frontsector->ceilingheight;
|
||||
ceiling->speed = ceiling->origspeed = lines[ceiling->sourceline].args[2] << (FRACBITS - 2); // going frontways, use args[2]
|
||||
ceiling->origspeed = lines[ceiling->sourceline].args[2] << (FRACBITS - 2); // going frontways, use args[2]
|
||||
}
|
||||
|
||||
if (ceiling->type == bounceCeilingCrush)
|
||||
ceiling->speed = ceiling->origspeed;
|
||||
|
||||
if (dest < ceiling->sector->ceilingheight) // must move down
|
||||
{
|
||||
ceiling->direction = -1;
|
||||
|
|
|
@ -206,13 +206,15 @@ void T_MoveFloor(floormove_t *movefloor)
|
|||
if (movefloor->floordestheight == lines[movefloor->sourceline].frontsector->floorheight)
|
||||
{
|
||||
movefloor->floordestheight = lines[movefloor->sourceline].backsector->floorheight;
|
||||
movefloor->speed = movefloor->origspeed = lines[movefloor->sourceline].args[3] << (FRACBITS - 2); // return trip, use args[3]
|
||||
movefloor->origspeed = lines[movefloor->sourceline].args[3] << (FRACBITS - 2); // return trip, use args[3]
|
||||
}
|
||||
else
|
||||
{
|
||||
movefloor->floordestheight = lines[movefloor->sourceline].frontsector->floorheight;
|
||||
movefloor->speed = movefloor->origspeed = lines[movefloor->sourceline].args[2] << (FRACBITS - 2); // forward again, use args[2]
|
||||
movefloor->origspeed = lines[movefloor->sourceline].args[2] << (FRACBITS - 2); // forward again, use args[2]
|
||||
}
|
||||
if (movefloor->type == bounceFloorCrush)
|
||||
movefloor->speed = movefloor->origspeed;
|
||||
movefloor->direction = (movefloor->floordestheight < movefloor->sector->floorheight) ? -1 : 1;
|
||||
movefloor->delaytimer = movefloor->delay;
|
||||
remove = false;
|
||||
|
|
Loading…
Reference in a new issue