- fixed: Instant floor movers should disable z-interpolation for all affected actors.
This commit is contained in:
parent
8708c69f83
commit
721b2fb21d
9 changed files with 87 additions and 54 deletions
|
|
@ -93,12 +93,12 @@ bool sector_t::IsLinked(sector_t *other, bool ceiling) const
|
|||
//
|
||||
//============================================================================
|
||||
|
||||
static bool MoveCeiling(sector_t *sector, int crush, double move)
|
||||
static bool MoveCeiling(sector_t *sector, int crush, double move, bool instant)
|
||||
{
|
||||
sector->ceilingplane.ChangeHeight (move);
|
||||
sector->ChangePlaneTexZ(sector_t::ceiling, move);
|
||||
|
||||
if (P_ChangeSector(sector, crush, move, 1, true)) return false;
|
||||
if (P_ChangeSector(sector, crush, move, 1, true, instant)) return false;
|
||||
|
||||
// Don't let the ceiling go below the floor
|
||||
if (!sector->ceilingplane.isSlope() && !sector->floorplane.isSlope() &&
|
||||
|
|
@ -108,12 +108,12 @@ static bool MoveCeiling(sector_t *sector, int crush, double move)
|
|||
return true;
|
||||
}
|
||||
|
||||
static bool MoveFloor(sector_t *sector, int crush, double move)
|
||||
static bool MoveFloor(sector_t *sector, int crush, double move, bool instant)
|
||||
{
|
||||
sector->floorplane.ChangeHeight (move);
|
||||
sector->ChangePlaneTexZ(sector_t::floor, move);
|
||||
|
||||
if (P_ChangeSector(sector, crush, move, 0, true)) return false;
|
||||
if (P_ChangeSector(sector, crush, move, 0, true, instant)) return false;
|
||||
|
||||
// Don't let the floor go above the ceiling
|
||||
if (!sector->ceilingplane.isSlope() && !sector->floorplane.isSlope() &&
|
||||
|
|
@ -133,7 +133,7 @@ static bool MoveFloor(sector_t *sector, int crush, double move)
|
|||
//
|
||||
//============================================================================
|
||||
|
||||
bool P_MoveLinkedSectors(sector_t *sector, int crush, double move, bool ceiling)
|
||||
bool P_MoveLinkedSectors(sector_t *sector, int crush, double move, bool ceiling, bool instant)
|
||||
{
|
||||
extsector_t::linked::plane &scrollplane = ceiling? sector->e->Linked.Ceiling : sector->e->Linked.Floor;
|
||||
bool ok = true;
|
||||
|
|
@ -143,55 +143,55 @@ bool P_MoveLinkedSectors(sector_t *sector, int crush, double move, bool ceiling)
|
|||
switch(scrollplane.Sectors[i].Type)
|
||||
{
|
||||
case LINK_FLOOR:
|
||||
ok &= MoveFloor(scrollplane.Sectors[i].Sector, crush, move);
|
||||
ok &= MoveFloor(scrollplane.Sectors[i].Sector, crush, move, instant);
|
||||
break;
|
||||
|
||||
case LINK_CEILING:
|
||||
ok &= MoveCeiling(scrollplane.Sectors[i].Sector, crush, move);
|
||||
ok &= MoveCeiling(scrollplane.Sectors[i].Sector, crush, move, instant);
|
||||
break;
|
||||
|
||||
case LINK_BOTH:
|
||||
if (move < 0)
|
||||
{
|
||||
ok &= MoveFloor(scrollplane.Sectors[i].Sector, crush, move);
|
||||
ok &= MoveCeiling(scrollplane.Sectors[i].Sector, crush, move);
|
||||
ok &= MoveFloor(scrollplane.Sectors[i].Sector, crush, move, instant);
|
||||
ok &= MoveCeiling(scrollplane.Sectors[i].Sector, crush, move, instant);
|
||||
}
|
||||
else
|
||||
{
|
||||
ok &= MoveCeiling(scrollplane.Sectors[i].Sector, crush, move);
|
||||
ok &= MoveFloor(scrollplane.Sectors[i].Sector, crush, move);
|
||||
ok &= MoveCeiling(scrollplane.Sectors[i].Sector, crush, move, instant);
|
||||
ok &= MoveFloor(scrollplane.Sectors[i].Sector, crush, move, instant);
|
||||
}
|
||||
break;
|
||||
|
||||
case LINK_FLOORMIRROR:
|
||||
ok &= MoveFloor(scrollplane.Sectors[i].Sector, crush, -move);
|
||||
ok &= MoveFloor(scrollplane.Sectors[i].Sector, crush, -move, instant);
|
||||
break;
|
||||
|
||||
case LINK_CEILINGMIRROR:
|
||||
ok &= MoveCeiling(scrollplane.Sectors[i].Sector, crush, -move);
|
||||
ok &= MoveCeiling(scrollplane.Sectors[i].Sector, crush, -move, instant);
|
||||
break;
|
||||
|
||||
case LINK_BOTHMIRROR:
|
||||
if (move > 0)
|
||||
{
|
||||
ok &= MoveFloor(scrollplane.Sectors[i].Sector, crush, -move);
|
||||
ok &= MoveCeiling(scrollplane.Sectors[i].Sector, crush, -move);
|
||||
ok &= MoveFloor(scrollplane.Sectors[i].Sector, crush, -move, instant);
|
||||
ok &= MoveCeiling(scrollplane.Sectors[i].Sector, crush, -move, instant);
|
||||
}
|
||||
else
|
||||
{
|
||||
ok &= MoveCeiling(scrollplane.Sectors[i].Sector, crush, -move);
|
||||
ok &= MoveFloor(scrollplane.Sectors[i].Sector, crush, -move);
|
||||
ok &= MoveCeiling(scrollplane.Sectors[i].Sector, crush, -move, instant);
|
||||
ok &= MoveFloor(scrollplane.Sectors[i].Sector, crush, -move, instant);
|
||||
}
|
||||
break;
|
||||
|
||||
case LINK_FLOOR+LINK_CEILINGMIRROR:
|
||||
ok &= MoveFloor(scrollplane.Sectors[i].Sector, crush, move);
|
||||
ok &= MoveCeiling(scrollplane.Sectors[i].Sector, crush, -move);
|
||||
ok &= MoveFloor(scrollplane.Sectors[i].Sector, crush, move, instant);
|
||||
ok &= MoveCeiling(scrollplane.Sectors[i].Sector, crush, -move, instant);
|
||||
break;
|
||||
|
||||
case LINK_CEILING+LINK_FLOORMIRROR:
|
||||
ok &= MoveFloor(scrollplane.Sectors[i].Sector, crush, -move);
|
||||
ok &= MoveCeiling(scrollplane.Sectors[i].Sector, crush, move);
|
||||
ok &= MoveFloor(scrollplane.Sectors[i].Sector, crush, -move, instant);
|
||||
ok &= MoveCeiling(scrollplane.Sectors[i].Sector, crush, move, instant);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue