mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 14:51:40 +00:00
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:
parent
8b9a0da5ef
commit
e277fbe81d
3 changed files with 6 additions and 15 deletions
|
@ -196,7 +196,6 @@ void DCeiling::Tick ()
|
|||
{
|
||||
case ceilCrushAndRaise:
|
||||
case ceilLowerAndCrush:
|
||||
case ceilLowerAndCrushDist:
|
||||
if (m_Speed1 == FRACUNIT && m_Speed2 == FRACUNIT)
|
||||
m_Speed = FRACUNIT / 8;
|
||||
break;
|
||||
|
@ -259,16 +258,8 @@ DCeiling *DCeiling::Create(sector_t *sec, DCeiling::ECeiling type, line_t *line,
|
|||
case ceilCrushRaiseAndStay:
|
||||
ceiling->m_TopHeight = sec->ceilingplane.d;
|
||||
case ceilLowerAndCrush:
|
||||
case ceilLowerAndCrushDist:
|
||||
targheight = sec->FindHighestFloorPoint (&spot);
|
||||
if (type == ceilLowerAndCrush)
|
||||
{
|
||||
targheight += 8*FRACUNIT;
|
||||
}
|
||||
else if (type == ceilCrushAndRaise)
|
||||
{
|
||||
targheight += height;
|
||||
}
|
||||
targheight += height;
|
||||
ceiling->m_BottomHeight = sec->ceilingplane.PointToDist (spot, targheight);
|
||||
ceiling->m_Direction = -1;
|
||||
break;
|
||||
|
|
|
@ -652,19 +652,19 @@ FUNC(LS_Ceiling_RaiseByValueTimes8)
|
|||
FUNC(LS_Ceiling_CrushAndRaise)
|
||||
// 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)
|
||||
// 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)
|
||||
// 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)
|
||||
|
@ -676,7 +676,7 @@ FUNC(LS_Ceiling_CrushStop)
|
|||
FUNC(LS_Ceiling_CrushRaiseAndStay)
|
||||
// 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)
|
||||
|
|
|
@ -626,7 +626,7 @@ public:
|
|||
ceilRaiseInstant,
|
||||
ceilCrushAndRaise,
|
||||
ceilLowerAndCrush,
|
||||
ceilLowerAndCrushDist,
|
||||
ceil_placeholder,
|
||||
ceilCrushRaiseAndStay,
|
||||
ceilRaiseToNearest,
|
||||
ceilLowerToLowest,
|
||||
|
|
Loading…
Reference in a new issue