From 8562c9ad7d97dd9bb5d75f49a0a0c599ba3c4bd7 Mon Sep 17 00:00:00 2001 From: Indev Date: Sat, 6 Jan 2024 01:04:46 +0300 Subject: [PATCH 1/3] Hide ping when showhud is set to Off --- src/sdl/i_video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sdl/i_video.c b/src/sdl/i_video.c index 33ca71e94..dd2953716 100644 --- a/src/sdl/i_video.c +++ b/src/sdl/i_video.c @@ -1451,7 +1451,7 @@ void I_FinishUpdate(void) if (cv_ticrate.value && st_overlay) SCR_DisplayTicRate(); - if (cv_showping.value && netgame && consoleplayer != serverplayer) + if (cv_showping.value && netgame && consoleplayer != serverplayer && st_overlay) SCR_DisplayLocalPing(); #ifdef HAVE_DISCORDRPC From 26938c20dbd8509c8d7f171ea16124d72a84d39e Mon Sep 17 00:00:00 2001 From: Alug Date: Sat, 6 Jan 2024 01:07:48 +0100 Subject: [PATCH 2/3] fix 3d model offsets when flipped --- src/hardware/hw_md2.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/hardware/hw_md2.c b/src/hardware/hw_md2.c index 9a50b8a4f..2a581b489 100644 --- a/src/hardware/hw_md2.c +++ b/src/hardware/hw_md2.c @@ -1460,13 +1460,15 @@ void HWR_DrawMD2(gr_vissprite_t *spr) HWD.pfnSetShader(4); // model shader { + SINT8 flipfactor = flip ? -1 : 1; + float this_scale = FIXED_TO_FLOAT(interp.scale); float xs = this_scale * FIXED_TO_FLOAT(interp.spritexscale); float ys = this_scale * FIXED_TO_FLOAT(interp.spriteyscale); - float ox = xs * FIXED_TO_FLOAT(interp.spritexoffset); - float oy = ys * FIXED_TO_FLOAT(interp.spriteyoffset); + float ox = xs * flipfactor*FIXED_TO_FLOAT(interp.spritexoffset); + float oy = ys * flipfactor*FIXED_TO_FLOAT(interp.spriteyoffset); // offset perpendicular to the camera angle p.x -= ox * gr_viewsin; From 910e20b542a50db8b8eca6f99051e60b903ef9cd Mon Sep 17 00:00:00 2001 From: Indev Date: Sat, 6 Jan 2024 03:13:49 +0300 Subject: [PATCH 3/3] Fix flipped objects having wrong slope roll angle --- src/k_kart.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/k_kart.c b/src/k_kart.c index e567945ac..971bc6c01 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -3241,6 +3241,7 @@ void K_RollMobjBySlopes(mobj_t* mo, boolean usedistance) I_Assert(mo->subsector->sector != NULL); angle_t an; + boolean flip = mo->eflags & MFE_VERTICALFLIP; fixed_t m_dist = R_PointToDist(mo->x, mo->y); fixed_t rolldist = cv_sloperolldist.value * mapobjectscale; @@ -3265,7 +3266,7 @@ void K_RollMobjBySlopes(mobj_t* mo, boolean usedistance) else mo->pitch_sprite = FixedAngle(0); - mo->slopepitch = mo->pitch_sprite; + mo->slopepitch = flip ? InvAngle(mo->pitch_sprite) : mo->pitch_sprite; // roll tempangle = (R_PointToAngle2(0, 0, tempz, tempy)); @@ -3279,7 +3280,7 @@ void K_RollMobjBySlopes(mobj_t* mo, boolean usedistance) else mo->roll_sprite = FixedAngle(0); - mo->sloperoll = mo->roll_sprite; + mo->sloperoll = flip ? InvAngle(mo->roll_sprite) : mo->roll_sprite; } else if (P_IsObjectOnGround(mo)) {