Add interpolation to more moving plane types

Adds interpolation to the following:
- Crumbling platforms
- Mario blocks
- Floatbob platforms (this one works really strangely due to two thinkers, maybe double-check this one?)
This commit is contained in:
Sally Coolatta 2022-04-25 16:49:07 -04:00 committed by Eidolon
parent 873af23f22
commit dbd5ddf95d
2 changed files with 16 additions and 0 deletions

View file

@ -2303,6 +2303,10 @@ void EV_BounceSector(sector_t *sec, fixed_t momz, line_t *sourceline)
bouncer->speed = momz/2; bouncer->speed = momz/2;
bouncer->distance = FRACUNIT; bouncer->distance = FRACUNIT;
bouncer->low = true; bouncer->low = true;
// interpolation
R_CreateInterpolator_SectorPlane(&bouncer->thinker, sec, false);
R_CreateInterpolator_SectorPlane(&bouncer->thinker, sec, true);
} }
// For T_ContinuousFalling special // For T_ContinuousFalling special
@ -2384,6 +2388,10 @@ INT32 EV_StartCrumble(sector_t *sec, ffloor_t *rover, boolean floating,
crumble->sector->crumblestate = CRUMBLE_ACTIVATED; crumble->sector->crumblestate = CRUMBLE_ACTIVATED;
// interpolation
R_CreateInterpolator_SectorPlane(&crumble->thinker, sec, false);
R_CreateInterpolator_SectorPlane(&crumble->thinker, sec, true);
TAG_ITER_SECTORS(tag, i) TAG_ITER_SECTORS(tag, i)
{ {
foundsec = &sectors[i]; foundsec = &sectors[i];
@ -2435,6 +2443,10 @@ void EV_MarioBlock(ffloor_t *rover, sector_t *sector, mobj_t *puncher)
block->ceilingstartheight = block->sector->ceilingheight; block->ceilingstartheight = block->sector->ceilingheight;
block->tag = (INT16)Tag_FGet(&sector->tags); block->tag = (INT16)Tag_FGet(&sector->tags);
// interpolation
R_CreateInterpolator_SectorPlane(&block->thinker, roversec, false);
R_CreateInterpolator_SectorPlane(&block->thinker, roversec, true);
if (itsamonitor) if (itsamonitor)
{ {
oldx = thing->x; oldx = thing->x;

View file

@ -5667,6 +5667,10 @@ static void P_AddFloatThinker(sector_t *sec, UINT16 tag, line_t *sourceline)
floater->sector = sec; floater->sector = sec;
floater->tag = (INT16)tag; floater->tag = (INT16)tag;
floater->sourceline = sourceline; floater->sourceline = sourceline;
// interpolation
R_CreateInterpolator_SectorPlane(&floater->thinker, sec, false);
R_CreateInterpolator_SectorPlane(&floater->thinker, sec, true);
} }
/** /**