Fixed some incorrectness with some Hexen crushing specials

- The following Hexen specials all stop 8 units above the floor:
  * Ceiling_CrushRaiseAndStay
  * Ceiling_CrushAndRaise
  * Ceiling_LowerAndCrush
  We only and Ceiling_LowerAndCrush correct. Clearly, I should have paid
  more attention when the Hexen source was released for the parts that I
  had already reverse engineered.
This commit is contained in:
Randy Heit 2016-03-07 10:24:30 -06:00
parent 8b9a0da5ef
commit e277fbe81d
3 changed files with 6 additions and 15 deletions

View file

@ -196,7 +196,6 @@ void DCeiling::Tick ()
{ {
case ceilCrushAndRaise: case ceilCrushAndRaise:
case ceilLowerAndCrush: case ceilLowerAndCrush:
case ceilLowerAndCrushDist:
if (m_Speed1 == FRACUNIT && m_Speed2 == FRACUNIT) if (m_Speed1 == FRACUNIT && m_Speed2 == FRACUNIT)
m_Speed = FRACUNIT / 8; m_Speed = FRACUNIT / 8;
break; break;
@ -259,16 +258,8 @@ DCeiling *DCeiling::Create(sector_t *sec, DCeiling::ECeiling type, line_t *line,
case ceilCrushRaiseAndStay: case ceilCrushRaiseAndStay:
ceiling->m_TopHeight = sec->ceilingplane.d; ceiling->m_TopHeight = sec->ceilingplane.d;
case ceilLowerAndCrush: case ceilLowerAndCrush:
case ceilLowerAndCrushDist:
targheight = sec->FindHighestFloorPoint (&spot); targheight = sec->FindHighestFloorPoint (&spot);
if (type == ceilLowerAndCrush) targheight += height;
{
targheight += 8*FRACUNIT;
}
else if (type == ceilCrushAndRaise)
{
targheight += height;
}
ceiling->m_BottomHeight = sec->ceilingplane.PointToDist (spot, targheight); ceiling->m_BottomHeight = sec->ceilingplane.PointToDist (spot, targheight);
ceiling->m_Direction = -1; ceiling->m_Direction = -1;
break; break;

View file

@ -652,19 +652,19 @@ FUNC(LS_Ceiling_RaiseByValueTimes8)
FUNC(LS_Ceiling_CrushAndRaise) FUNC(LS_Ceiling_CrushAndRaise)
// Ceiling_CrushAndRaise (tag, speed, crush, crushtype) // Ceiling_CrushAndRaise (tag, speed, crush, crushtype)
{ {
return EV_DoCeiling (DCeiling::ceilCrushAndRaise, ln, arg0, SPEED(arg1), SPEED(arg1)/2, 0, arg2, 0, 0, CRUSHTYPE(arg3)); return EV_DoCeiling (DCeiling::ceilCrushAndRaise, ln, arg0, SPEED(arg1), SPEED(arg1)/2, 8*FRACUNIT, arg2, 0, 0, CRUSHTYPE(arg3));
} }
FUNC(LS_Ceiling_LowerAndCrush) FUNC(LS_Ceiling_LowerAndCrush)
// Ceiling_LowerAndCrush (tag, speed, crush, crushtype) // Ceiling_LowerAndCrush (tag, speed, crush, crushtype)
{ {
return EV_DoCeiling (DCeiling::ceilLowerAndCrush, ln, arg0, SPEED(arg1), SPEED(arg1), 0, arg2, 0, 0, CRUSHTYPE(arg3)); return EV_DoCeiling (DCeiling::ceilLowerAndCrush, ln, arg0, SPEED(arg1), SPEED(arg1), 8*FRACUNIT, arg2, 0, 0, CRUSHTYPE(arg3));
} }
FUNC(LS_Ceiling_LowerAndCrushDist) FUNC(LS_Ceiling_LowerAndCrushDist)
// Ceiling_LowerAndCrush (tag, speed, crush, dist, crushtype) // Ceiling_LowerAndCrush (tag, speed, crush, dist, crushtype)
{ {
return EV_DoCeiling (DCeiling::ceilLowerAndCrushDist, ln, arg0, SPEED(arg1), SPEED(arg1), arg3*FRACUNIT, arg2, 0, 0, CRUSHTYPE(arg4)); return EV_DoCeiling (DCeiling::ceilLowerAndCrush, ln, arg0, SPEED(arg1), SPEED(arg1), arg3*FRACUNIT, arg2, 0, 0, CRUSHTYPE(arg4));
} }
FUNC(LS_Ceiling_CrushStop) FUNC(LS_Ceiling_CrushStop)
@ -676,7 +676,7 @@ FUNC(LS_Ceiling_CrushStop)
FUNC(LS_Ceiling_CrushRaiseAndStay) FUNC(LS_Ceiling_CrushRaiseAndStay)
// Ceiling_CrushRaiseAndStay (tag, speed, crush, crushtype) // Ceiling_CrushRaiseAndStay (tag, speed, crush, crushtype)
{ {
return EV_DoCeiling (DCeiling::ceilCrushRaiseAndStay, ln, arg0, SPEED(arg1), SPEED(arg1)/2, 0, arg2, 0, 0, CRUSHTYPE(arg3)); return EV_DoCeiling (DCeiling::ceilCrushRaiseAndStay, ln, arg0, SPEED(arg1), SPEED(arg1)/2, 8*FRACUNIT, arg2, 0, 0, CRUSHTYPE(arg3));
} }
FUNC(LS_Ceiling_MoveToValueTimes8) FUNC(LS_Ceiling_MoveToValueTimes8)

View file

@ -626,7 +626,7 @@ public:
ceilRaiseInstant, ceilRaiseInstant,
ceilCrushAndRaise, ceilCrushAndRaise,
ceilLowerAndCrush, ceilLowerAndCrush,
ceilLowerAndCrushDist, ceil_placeholder,
ceilCrushRaiseAndStay, ceilCrushRaiseAndStay,
ceilRaiseToNearest, ceilRaiseToNearest,
ceilLowerToLowest, ceilLowerToLowest,