From 6c54af377481a42f639da2db6cefe33d02918bce Mon Sep 17 00:00:00 2001 From: Eidolon Date: Wed, 25 Jan 2023 19:44:39 -0600 Subject: [PATCH 1/3] Fix precip interpolation Fixes STJr/SRB2#916 --- src/p_mobj.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/p_mobj.c b/src/p_mobj.c index c14ffb251..635d4f42b 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -3989,12 +3989,11 @@ void P_NullPrecipThinker(precipmobj_t *mobj) { //(void)mobj; mobj->precipflags &= ~PCF_THUNK; + R_ResetPrecipitationMobjInterpolationState(mobj); } void P_SnowThinker(precipmobj_t *mobj) { - R_ResetPrecipitationMobjInterpolationState(mobj); - P_CycleStateAnimation((mobj_t *)mobj); // adjust height @@ -4007,8 +4006,6 @@ void P_SnowThinker(precipmobj_t *mobj) void P_RainThinker(precipmobj_t *mobj) { - R_ResetPrecipitationMobjInterpolationState(mobj); - P_CycleStateAnimation((mobj_t *)mobj); if (mobj->state != &states[S_RAIN1]) From add018cb8333e7f7846a93ce41aefac7380e0b2e Mon Sep 17 00:00:00 2001 From: Eidolon Date: Wed, 25 Jan 2023 20:37:04 -0600 Subject: [PATCH 2/3] Interpolate minecart marks Fixes STJr/SRB2#906 Uses the old displacement of the minecart to position the mark relative to its destination. It's not completely correct, but it works. --- src/p_user.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/p_user.c b/src/p_user.c index 4ca4e6c8a..ba43a422f 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -11038,6 +11038,21 @@ static void P_MinecartThink(player_t *player) S_StartSound(minecart, minecart->info->activesound); } } + + // Mark interpolation; the old positions need to be relative to the displacement from the minecart _after_ it's moved. + // This isn't quite correct (it captures the landing wobble) but it works well enough + if (detleft) + { + detleft->old_x = detleft->x - (minecart->old_x - minecart->old_x2); + detleft->old_y = detleft->y - (minecart->old_y - minecart->old_y2); + detleft->old_z = detleft->z - (minecart->old_z - minecart->old_z2); + } + if (detright) + { + detright->old_x = detright->x - (minecart->old_x - minecart->old_x2); + detright->old_y = detright->y - (minecart->old_y - minecart->old_y2); + detright->old_z = detright->z - (minecart->old_z - minecart->old_z2); + } } else { From b02707a4ee4966e7768cc6923fe3ab98c212ee5d Mon Sep 17 00:00:00 2001 From: Eidolon Date: Wed, 25 Jan 2023 20:44:04 -0600 Subject: [PATCH 3/3] Adjust caption pop-in by tics instead of frames Fixes STJr/SRB2#900 pop-in animation being affected by framerate --- src/screen.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/screen.c b/src/screen.c index d4785f941..3842a365d 100644 --- a/src/screen.c +++ b/src/screen.c @@ -621,7 +621,13 @@ void SCR_ClosedCaptions(void) y = basey-((i + 2)*10); if (closedcaptions[i].b) - y -= (closedcaptions[i].b--)*vid.dupy; + { + y -= closedcaptions[i].b * vid.dupy; + if (renderisnewtic) + { + closedcaptions[i].b--; + } + } if (closedcaptions[i].t < CAPTIONFADETICS) flags |= (((CAPTIONFADETICS-closedcaptions[i].t)/2)*V_10TRANS);