From 915bf831726a4b826ca19b0e86a037f7fbf11f9f Mon Sep 17 00:00:00 2001 From: MascaraSnake Date: Sun, 31 Jul 2022 15:12:59 +0200 Subject: [PATCH 1/8] Fix equation slopes overflow --- src/p_slopes.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/p_slopes.c b/src/p_slopes.c index 5b4ead3e3..4a4e84332 100644 --- a/src/p_slopes.c +++ b/src/p_slopes.c @@ -201,10 +201,14 @@ void P_ReconfigureViaVertexes (pslope_t *slope, const vector3_t v1, const vector static void ReconfigureViaConstants (pslope_t *slope, const fixed_t a, const fixed_t b, const fixed_t c, const fixed_t d) { fixed_t m; + fixed_t o = 0; vector3_t *normal = &slope->normal; + if (c) + o = abs(c) <= FRACUNIT ? -FixedMul(d, FixedDiv(FRACUNIT, c)) : -FixedDiv(d, c); + // Set origin. - FV3_Load(&slope->o, 0, 0, c ? -FixedDiv(d, c) : 0); + FV3_Load(&slope->o, 0, 0, o); // Get slope's normal. FV3_Load(normal, a, b, c); From 23f9d8e924e4bfc8998ea23637dd5d15ea429ce1 Mon Sep 17 00:00:00 2001 From: Eidolon Date: Wed, 25 Jan 2023 20:44:04 -0600 Subject: [PATCH 2/8] 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 f1b53a7f2..9b1036d7c 100644 --- a/src/screen.c +++ b/src/screen.c @@ -675,7 +675,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); From 10660411b8d1774bb864a2be9d5c3e62b2602a52 Mon Sep 17 00:00:00 2001 From: MascaraSnake Date: Sun, 4 Dec 2022 09:14:55 +0100 Subject: [PATCH 3/8] Fix callcount typo --- src/p_spec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/p_spec.c b/src/p_spec.c index 4438401a6..40501ff62 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -1608,7 +1608,7 @@ boolean P_RunTriggerLinedef(line_t *triggerline, mobj_t *actor, sector_t *caller // "Trigger on X calls" linedefs reset if args[2] is set if (specialtype == 321 && triggerline->args[2]) - triggerline->callcount = triggerline->args[3]; + triggerline->callcount = triggerline->args[1]; else { // These special types work only once From ce15c47a4d3c05f3efff76ddaa9f7fbd5d6f9d11 Mon Sep 17 00:00:00 2001 From: Eidolon Date: Sat, 12 Nov 2022 15:14:04 -0600 Subject: [PATCH 4/8] Only interpolate shadowcasters if they exist # Conflicts: # src/hardware/hw_main.c --- src/hardware/hw_main.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index 32f46bda3..d729439cc 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -5362,21 +5362,24 @@ static void HWR_ProjectSprite(mobj_t *thing) if (thing->renderflags & RF_SHADOWEFFECTS) { mobj_t *caster = thing->target; - interpmobjstate_t casterinterp = {0}; - - if (R_UsingFrameInterpolation() && !paused) - { - R_InterpolateMobjState(caster, rendertimefrac, &casterinterp); - } - else - { - R_InterpolateMobjState(caster, FRACUNIT, &casterinterp); - } if (caster && !P_MobjWasRemoved(caster)) { - fixed_t groundz = R_GetShadowZ(thing, NULL); - fixed_t floordiff = abs(((thing->eflags & MFE_VERTICALFLIP) ? caster->height : 0) + casterinterp.z - groundz); + interpmobjstate_t casterinterp = {0}; + fixed_t groundz; + fixed_t floordiff; + + if (R_UsingFrameInterpolation() && !paused) + { + R_InterpolateMobjState(caster, rendertimefrac, &casterinterp); + } + else + { + R_InterpolateMobjState(caster, FRACUNIT, &casterinterp); + } + + groundz = R_GetShadowZ(thing, NULL); + floordiff = abs(((thing->eflags & MFE_VERTICALFLIP) ? caster->height : 0) + casterinterp.z - groundz); shadowheight = FIXED_TO_FLOAT(floordiff); shadowscale = FIXED_TO_FLOAT(FixedMul(FRACUNIT - floordiff/640, casterinterp.scale)); From 6d415c3d9c2eb96675549259ef98578e097efd82 Mon Sep 17 00:00:00 2001 From: spherallic Date: Mon, 26 Sep 2022 23:51:51 +0200 Subject: [PATCH 5/8] Start bustable FOF sounds at the correct height --- src/p_floor.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/p_floor.c b/src/p_floor.c index a81287102..01d893bcd 100644 --- a/src/p_floor.c +++ b/src/p_floor.c @@ -2149,12 +2149,11 @@ void EV_CrumbleChain(sector_t *sec, ffloor_t *rover) } } -#undef controlsec - - // soundorg z height never gets set normally, so MEH. - sec->soundorg.z = sec->floorheight; + sec->soundorg.z = (controlsec->floorheight + controlsec->ceilingheight)/2; S_StartSound(&sec->soundorg, mobjinfo[type].activesound); +#undef controlsec + // Find the outermost vertexes in the subsector for (i = 0; i < sec->linecount; i++) { From d666ebc2cf1f5b6b493ade7fb650d2871c52dd5b Mon Sep 17 00:00:00 2001 From: spherallic Date: Mon, 26 Sep 2022 20:32:57 +0200 Subject: [PATCH 6/8] Prevent floating crumbling platforms from being triggered twice --- src/p_floor.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/p_floor.c b/src/p_floor.c index 01d893bcd..2d25e8208 100644 --- a/src/p_floor.c +++ b/src/p_floor.c @@ -591,7 +591,6 @@ void T_BounceCheese(bouncecheese_t *bouncer) if (bouncer->sector->crumblestate == CRUMBLE_RESTORE || bouncer->sector->crumblestate == CRUMBLE_WAIT || bouncer->sector->crumblestate == CRUMBLE_ACTIVATED) // Oops! Crumbler says to remove yourself! { - bouncer->sector->crumblestate = CRUMBLE_WAIT; bouncer->sector->ceilingdata = NULL; bouncer->sector->ceilspeed = 0; bouncer->sector->floordata = NULL; From 39097e7433a29aea33785735e22025a0a7766800 Mon Sep 17 00:00:00 2001 From: MascaraSnake Date: Sun, 6 Nov 2022 07:52:54 +0100 Subject: [PATCH 7/8] Fix typo in rising FOF binary-to-UDMF conversion # Conflicts: # src/p_setup.c --- src/p_setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/p_setup.c b/src/p_setup.c index fa139eff5..e4950261d 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -4588,7 +4588,7 @@ static void P_ConvertBinaryLinedefTypes(void) //Flags if (lines[i].flags & ML_BLOCKPLAYERS) lines[i].args[6] |= TMFR_REVERSE; - if (lines[i].flags & ML_BLOCKPLAYERS) + if (lines[i].flags & ML_NOCLIMB) lines[i].args[6] |= TMFR_SPINDASH; lines[i].special = 190; From 236394f6391220878033898d0cb7560af092a149 Mon Sep 17 00:00:00 2001 From: SteelT Date: Tue, 22 Mar 2022 13:09:29 -0400 Subject: [PATCH 8/8] Fix "unknown command" not being printed on dedicated --- src/command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/command.c b/src/command.c index 88d11105a..b3b657705 100644 --- a/src/command.c +++ b/src/command.c @@ -730,7 +730,7 @@ static void COM_ExecuteString(char *ptext) // check cvars // Hurdler: added at Ebola's request ;) // (don't flood the console in software mode with bad gl_xxx command) - if (!CV_Command() && con_destlines) + if (!CV_Command() && (con_destlines || dedicated)) CONS_Printf(M_GetText("Unknown command '%s'\n"), COM_Argv(0)); }