From 15497b4a24b294f841f5052a406778f17d0226cf Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Sun, 27 Jan 2013 02:57:17 +0000 Subject: [PATCH] - Fixed: Floor_RaiseAndCrush is not Floor_RaiseToLowestCeilingAndCrush. SVN r4053 (trunk) --- src/p_floor.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) 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);