diff --git a/src/p_floor.cpp b/src/p_floor.cpp index d88886b14..ea2551dfd 100644 --- a/src/p_floor.cpp +++ b/src/p_floor.cpp @@ -375,18 +375,13 @@ manual_floor: floor->m_Direction = (floor->m_FloorDestDist > sec->floorplane.d) ? -1 : 1; break; - case DFloor::floorRaiseAndCrush: - floor->m_Crush = crush; case DFloor::floorRaiseToLowestCeiling: floor->m_Direction = 1; newheight = sec->FindLowestCeilingSurrounding (&spot); - if (floortype == DFloor::floorRaiseAndCrush) - newheight -= 8 * FRACUNIT; ceilingheight = sec->FindLowestCeilingPoint (&spot2); floor->m_FloorDestDist = sec->floorplane.PointToDist (spot, newheight); if (sec->floorplane.ZatPointDist (spot2, floor->m_FloorDestDist) > ceilingheight) - floor->m_FloorDestDist = sec->floorplane.PointToDist (spot2, - floortype == DFloor::floorRaiseAndCrush ? ceilingheight - 8*FRACUNIT : ceilingheight); + floor->m_FloorDestDist = sec->floorplane.PointToDist (spot2, ceilingheight); break; case DFloor::floorRaiseToHighest: @@ -407,6 +402,13 @@ manual_floor: floor->m_FloorDestDist = sec->floorplane.PointToDist (spot, newheight); break; + case DFloor::floorRaiseAndCrush: + floor->m_Crush = crush; + floor->m_Direction = 1; + newheight = sec->FindLowestCeilingPoint (&spot) - 8*FRACUNIT; + floor->m_FloorDestDist = sec->floorplane.PointToDist (spot, newheight); + break; + case DFloor::floorRaiseToCeiling: floor->m_Direction = 1; newheight = sec->FindLowestCeilingPoint (&spot);