So there should be either a compatibility option or a workaround. I prefer this:
- If a door is opened in a sector with an active floor mover it will only close to its previous lower height.
- If the floor height changes while the door is open the new floor height is only used if there is no active floor mover present in this sector. Otherwise it will only close to its previous lower height.
I think that should prevent all bad possibilities and keep old maps playable with such a setup while allowing both floor and ceiling to be active at the same time.
Here's the necessary changes:
1. Change the first 'if' in DDoor::Tick to
Code: Select all
if (m_Sector->floorplane.d != m_OldFloorDist)
{
if (!m_Sector->floordata || !m_Sector->floordata->IsKindOf(RUNTIME_CLASS(DPlat)) ||
!((DPlat*)m_Sector->floordata)->isLift())
{
m_OldFloorDist = m_Sector->floorplane.d;
m_BotDist = m_Sector->ceilingplane.PointToDist (m_BotSpot,
m_Sector->floorplane.ZatPoint (m_BotSpot));
}
}
Code: Select all
if (!m_Sector->floordata || !m_Sector->floordata->IsKindOf(RUNTIME_CLASS(DPlat)) ||
!((DPlat*)m_Sector->floordata)->isLift())
{
height = sec->FindHighestFloorPoint (&m_BotSpot);
m_BotDist = sec->ceilingplane.PointToDist (m_BotSpot, height);
}
else
{
height = sec->FindLowestCeilingPoint(&m_BotSpot);
m_BotDist = sec->ceilingplane.PointToDist (m_BotSpot, height);
}
m_OldFloorDist = sec->floorplane.d;
Code: Select all
bool isLift() const { return m_Type == platDownWaitUpStay || m_Type == platDownWaitUpStayStone; }