mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-27 06:12:19 +00:00
- 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.
This commit is contained in:
parent
919f99db61
commit
caae61de4c
2 changed files with 3 additions and 35 deletions
|
@ -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
|
// Don't start a second thinker on the same floor
|
||||||
if (sec->ceilingdata) continue;
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -257,7 +257,7 @@ DCeiling *DCeiling::Create(sector_t *sec, DCeiling::ECeiling type, line_t *line,
|
||||||
}
|
}
|
||||||
|
|
||||||
// new door thinker
|
// 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;
|
vertex_t *spot = sec->lines[0]->v1;
|
||||||
|
|
||||||
switch (type)
|
switch (type)
|
||||||
|
@ -413,6 +413,7 @@ DCeiling *DCeiling::Create(sector_t *sec, DCeiling::ECeiling type, line_t *line,
|
||||||
if (ceiling->m_Speed >= movedist)
|
if (ceiling->m_Speed >= movedist)
|
||||||
{
|
{
|
||||||
ceiling->StopInterpolation(true);
|
ceiling->StopInterpolation(true);
|
||||||
|
if (silent & 4) ceiling->m_Silent = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
// set texture/type change properties
|
// set texture/type change properties
|
||||||
|
|
Loading…
Reference in a new issue