diff --git a/docs/rh-log.txt b/docs/rh-log.txt index c939d9437..344a2a1b9 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,4 +1,7 @@ August 4, 2009 +- Swapped the order of floor and ceiling moves in DElevator::Tick() so that + if an elevator contains an actor exactly the same height as it, it will not + be blocked. - Fixed: FWeaponSlot::PickWeapon() wrapped around improperly when the starting value for i was 0. diff --git a/src/p_floor.cpp b/src/p_floor.cpp index 3692a34c4..bd489d525 100644 --- a/src/p_floor.cpp +++ b/src/p_floor.cpp @@ -260,18 +260,6 @@ void DElevator::Tick () oldceiling = m_Sector->ceilingplane.d; if (m_Direction < 0) // moving down - { - res = MoveCeiling (m_Speed, m_CeilingDestDist, m_Direction); - if (res == ok || res == pastdest) - { - 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) @@ -283,6 +271,18 @@ void DElevator::Tick () } } } + else // up + { + res = MoveCeiling (m_Speed, m_CeilingDestDist, m_Direction); + if (res == ok || res == pastdest) + { + res = MoveFloor (m_Speed, m_FloorDestDist, m_Direction); + if (res == crushed) + { + MoveCeiling (m_Speed, oldceiling, -m_Direction); + } + } + } if (res == pastdest) // if destination height acheived {