fix door interpolation in Doom2 MAP19 (#1100)

* fix Boom elevators
This commit is contained in:
Roman Fomin 2023-06-12 14:17:04 +07:00 committed by GitHub
parent 51274c1c83
commit 9b1ec60e3c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -61,8 +61,13 @@ result_e T_MovePlane
fixed_t lastpos; fixed_t lastpos;
fixed_t destheight; //jff 02/04/98 used to keep floors/ceilings fixed_t destheight; //jff 02/04/98 used to keep floors/ceilings
// from moving thru each other // 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) switch(floorOrCeiling)
{ {
@ -70,7 +75,11 @@ result_e T_MovePlane
// Moving a floor // Moving a floor
// [AM] Store old sector heights for interpolation. // [AM] Store old sector heights for interpolation.
sector->oldfloorheight = sector->floorheight; if (!moved_floor)
{
sector->oldfloorheight = sector->floorheight;
moved_floor = true;
}
switch(direction) switch(direction)
{ {
@ -150,7 +159,11 @@ result_e T_MovePlane
// moving a ceiling // moving a ceiling
// [AM] Store old sector heights for interpolation. // [AM] Store old sector heights for interpolation.
sector->oldceilingheight = sector->ceilingheight; if (!moved_ceil)
{
sector->oldceilingheight = sector->ceilingheight;
moved_ceil = true;
}
switch(direction) switch(direction)
{ {