An excellent level to test this is Map04 of Hell To Pay (from Wraith Software.) There is one section in this map with 2 sectors that can both open as door and lift. But it is extremely easy to mess this up by first activating the door part and then the lift part. After that the level becomes unplayable because one major passage is blocked.
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));
}
}
2. Change the last 3 lines in DDoor::DDoor to
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;
3. Add to DPlat:
Code: Select all
bool isLift() const { return m_Type == platDownWaitUpStay || m_Type == platDownWaitUpStayStone; }
An excellent level to test this is Map04 of Hell To Pay (from Wraith Software.) There is one section in this map with 2 sectors that can both open as door and lift. But it is extremely easy to mess this up by first activating the door part and then the lift part. After that the level becomes unplayable because one major passage is blocked.
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]
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]
2. Change the last 3 lines in DDoor::DDoor to
[code]
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]
3. Add to DPlat:
[code]
bool isLift() const { return m_Type == platDownWaitUpStay || m_Type == platDownWaitUpStayStone; }
[/code]