- added new action special Ceiling_LowerAndCrushDist. It's similar to Ceiling_LowerAndCrush but allows to explicitly set the distance from the floor where the ceiling stops moving. This is used to remove the special behavior for Strife from the code that unlike the other games moved the ceiling to the floor, not to 8 units above it.

SVN r2881 (trunk)
This commit is contained in:
Christoph Oelckers 2010-10-02 16:26:10 +00:00
commit d3ca1fddcc
6 changed files with 18 additions and 264 deletions

View file

@ -162,6 +162,7 @@ void DCeiling::Tick ()
{
case ceilCrushAndRaise:
case ceilLowerAndCrush:
case ceilLowerAndCrushDist:
if (m_Speed1 == FRACUNIT && m_Speed2 == FRACUNIT)
m_Speed = FRACUNIT / 8;
break;
@ -255,11 +256,16 @@ manual_ceiling:
case DCeiling::ceilCrushRaiseAndStay:
ceiling->m_TopHeight = sec->ceilingplane.d;
case DCeiling::ceilLowerAndCrush:
case DCeiling::ceilLowerAndCrushDist:
targheight = sec->FindHighestFloorPoint (&spot);
if (type != DCeiling::ceilLowerAndCrush || gameinfo.gametype != GAME_Strife)
if (type == DCeiling::ceilLowerAndCrush)
{
targheight += 8*FRACUNIT;
}
else if (type == DCeiling::ceilLowerAndCrushDist)
{
targheight += height;
}
ceiling->m_BottomHeight = sec->ceilingplane.PointToDist (spot, targheight);
ceiling->m_Direction = -1;
break;