- Copied railgun sound fix from Skulltag.
- Made infighting a level flag. The old method still exists but the level flags will take precedence if set. SVN r532 (trunk)
This commit is contained in:
parent
ea2ea7dbf0
commit
f4dcfad331
9 changed files with 60 additions and 13 deletions
|
|
@ -230,17 +230,34 @@ void DElevator::Tick ()
|
|||
{
|
||||
EResult res;
|
||||
|
||||
fixed_t oldfloor, oldceiling;
|
||||
|
||||
oldfloor = m_Sector->floorplane.d;
|
||||
oldceiling = m_Sector->ceilingplane.d;
|
||||
|
||||
if (m_Direction < 0) // moving down
|
||||
{
|
||||
res = MoveCeiling (m_Speed, m_CeilingDestDist, m_Direction);
|
||||
if (res == ok || res == pastdest)
|
||||
MoveFloor (m_Speed, m_FloorDestDist, m_Direction);
|
||||
{
|
||||
res = MoveFloor (m_Speed, m_FloorDestDist, m_Direction);
|
||||
if (res == crushed)
|
||||
{
|
||||
MoveCeiling (m_Speed, oldceiling, -m_Direction);
|
||||
}
|
||||
}
|
||||
}
|
||||
else // up
|
||||
{
|
||||
res = MoveFloor (m_Speed, m_FloorDestDist, m_Direction);
|
||||
if (res == ok || res == pastdest)
|
||||
MoveCeiling (m_Speed, m_CeilingDestDist, m_Direction);
|
||||
{
|
||||
res = MoveCeiling (m_Speed, m_CeilingDestDist, m_Direction);
|
||||
if (res == crushed)
|
||||
{
|
||||
MoveFloor (m_Speed, oldfloor, -m_Direction);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (res == pastdest) // if destination height acheived
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue