From e090562a0651554dbae7be1e2b95c8a4e6691adb Mon Sep 17 00:00:00 2001 From: dashodanger Date: Wed, 23 Oct 2024 12:42:50 -0600 Subject: [PATCH] More plane mover interpolation adjustments --- source_files/edge/p_plane.cc | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/source_files/edge/p_plane.cc b/source_files/edge/p_plane.cc index 1180d72be..fe9508443 100644 --- a/source_files/edge/p_plane.cc +++ b/source_files/edge/p_plane.cc @@ -324,8 +324,10 @@ static bool MovePlane(PlaneMover *plane) Sector *sec = plane->sector; - sec->old_ceiling_height = sec->ceiling_height; - sec->old_floor_height = sec->floor_height; + if (plane->is_ceiling || plane->is_elevator) + sec->old_ceiling_height = sec->ceiling_height; + if (!plane->is_ceiling) + sec->old_floor_height = sec->floor_height; switch (plane->direction) { @@ -1580,13 +1582,16 @@ void RunActivePlanes(void) } if (pmov->is_ceiling || pmov->is_elevator) + { pmov->sector->ceiling_move = nullptr; + pmov->sector->old_ceiling_height = pmov->sector->ceiling_height; + } if (!pmov->is_ceiling) + { pmov->sector->floor_move = nullptr; - - pmov->sector->old_ceiling_height = pmov->sector->ceiling_height; - pmov->sector->old_floor_height = pmov->sector->floor_height; + pmov->sector->old_floor_height = pmov->sector->floor_height; + } *PMI = nullptr; delete pmov;