Skip to content

Commit

Permalink
More plane mover interpolation adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
dashodanger committed Oct 23, 2024
1 parent 159cedf commit e090562
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions source_files/edge/p_plane.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit e090562

Please sign in to comment.