From 9b1ec60e3c1e69f26174f82b1b44f6245702a322 Mon Sep 17 00:00:00 2001 From: Roman Fomin Date: Mon, 12 Jun 2023 14:17:04 +0700 Subject: [PATCH] fix door interpolation in Doom2 MAP19 (#1100) * fix Boom elevators --- src/p_floor.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/p_floor.c b/src/p_floor.c index 774777f8..f1a800b1 100644 --- a/src/p_floor.c +++ b/src/p_floor.c @@ -61,8 +61,13 @@ result_e T_MovePlane fixed_t lastpos; fixed_t destheight; //jff 02/04/98 used to keep floors/ceilings // from moving thru each other + static boolean moved_ceil, moved_floor; - sector->oldgametic = gametic; + if (sector->oldgametic != gametic) + { + sector->oldgametic = gametic; + moved_ceil = moved_floor = false; + } switch(floorOrCeiling) { @@ -70,7 +75,11 @@ result_e T_MovePlane // Moving a floor // [AM] Store old sector heights for interpolation. - sector->oldfloorheight = sector->floorheight; + if (!moved_floor) + { + sector->oldfloorheight = sector->floorheight; + moved_floor = true; + } switch(direction) { @@ -150,7 +159,11 @@ result_e T_MovePlane // moving a ceiling // [AM] Store old sector heights for interpolation. - sector->oldceilingheight = sector->ceilingheight; + if (!moved_ceil) + { + sector->oldceilingheight = sector->ceilingheight; + moved_ceil = true; + } switch(direction) {