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) {