From caae61de4c8f104a50ef2d2c4fb85f60e72f5fb6 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 8 Apr 2016 20:44:55 +0200 Subject: [PATCH] - removed DMoveCeiling and let FS call DCeiling::Create instead. Made a minor change to DCeiling::Create to keep it compatible, because handling for instantly moving ceilings is a bit different. --- src/fragglescript/t_func.cpp | 35 +---------------------------------- src/p_ceiling.cpp | 3 ++- 2 files changed, 3 insertions(+), 35 deletions(-) diff --git a/src/fragglescript/t_func.cpp b/src/fragglescript/t_func.cpp index 9bf043af73..965f83fd05 100644 --- a/src/fragglescript/t_func.cpp +++ b/src/fragglescript/t_func.cpp @@ -1720,39 +1720,6 @@ void FParser::SF_CeilingHeight(void) } -//========================================================================== -// -// -// -//========================================================================== - -class DMoveCeiling : public DCeiling -{ -public: - - DMoveCeiling(sector_t * sec,int tag,double destheight,double speed,int silent,int crush) - : DCeiling(sec) - { - m_Crush = crush; - m_Speed2 = m_Speed = m_Speed1 = speed; - m_Silent = silent; - m_Type = DCeiling::ceilLowerByValue; // doesn't really matter as long as it's no special value - m_Tag=tag; - m_TopHeight=m_BottomHeight=sec->ceilingplane.PointToDist(sec->centerspot,destheight); - m_Direction=destheight>sec->GetPlaneTexZF(sector_t::ceiling)? 1:-1; - - // Do not interpolate instant movement ceilings. - double movedist = fabs(sec->ceilingplane.fD() - m_BottomHeight); - if (m_Speed >= movedist) - { - StopInterpolation (true); - m_Silent=2; - } - PlayCeilingSound(); - } -}; - - //========================================================================== // // @@ -1784,7 +1751,7 @@ void FParser::SF_MoveCeiling(void) // Don't start a second thinker on the same floor if (sec->ceilingdata) continue; - new DMoveCeiling(sec, tagnum, destheight, platspeed, silent, crush); + DCeiling::Create(sec, DCeiling::ceilMoveToValue, NULL, tagnum, platspeed, platspeed, destheight, crush, silent | 4, 0, DCeiling::ECrushMode::crushDoom); } } } diff --git a/src/p_ceiling.cpp b/src/p_ceiling.cpp index 9a506be29b..76884f6c5d 100644 --- a/src/p_ceiling.cpp +++ b/src/p_ceiling.cpp @@ -257,7 +257,7 @@ DCeiling *DCeiling::Create(sector_t *sec, DCeiling::ECeiling type, line_t *line, } // new door thinker - DCeiling *ceiling = new DCeiling (sec, speed, speed2, silent); + DCeiling *ceiling = new DCeiling (sec, speed, speed2, silent & ~4); vertex_t *spot = sec->lines[0]->v1; switch (type) @@ -413,6 +413,7 @@ DCeiling *DCeiling::Create(sector_t *sec, DCeiling::ECeiling type, line_t *line, if (ceiling->m_Speed >= movedist) { ceiling->StopInterpolation(true); + if (silent & 4) ceiling->m_Silent = 2; } // set texture/type change properties