- Fixed: Floor_RaiseAndCrush is not Floor_RaiseToLowestCeilingAndCrush.

SVN r4053 (trunk)
This commit is contained in:
Randy Heit 2013-01-27 02:57:17 +00:00
parent c4a4b9821d
commit 15497b4a24
1 changed files with 8 additions and 6 deletions

View File

@ -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);