From d2d017400362dfb5d484175f456f80fab170acbe Mon Sep 17 00:00:00 2001 From: toaster Date: Fri, 12 Sep 2025 15:45:24 +0100 Subject: [PATCH] K_FlipFromObject: ACTUALLY properly calculate flip - Now matches P_SpawnMobjFromMobjUnscaled - To my great annoyance, requires increment of DEMOVERSION --- src/g_demo.cpp | 9 +++++---- src/k_kart.c | 14 +++++++++++++- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/src/g_demo.cpp b/src/g_demo.cpp index 16d6eabdc..27d50b37b 100644 --- a/src/g_demo.cpp +++ b/src/g_demo.cpp @@ -177,12 +177,13 @@ demoghost *ghosts = NULL; // - 0x000D (Ring Racers v2.3) // Currently supported: -// - 0x000E (Ring Racers 2.4 staff ghosts part 1 - initial recordings) -// - 0x000F (Ring Racers 2.4 staff ghosts part 2 - dynslopes thinker fix) -// - 0x0010 (Ring Racers 2.4 staff ghosts part 3 - skinlimit raise. don't say we never did anythin for 'ya) +// - 0x000E -- RR 2.4 indev (staff ghosts part 1 - initial recordings) +// - 0x000F -- RR 2.4 indev (staff ghosts part 2 - dynslopes thinker fix) +// - 0x0010 -- RR 2.4 rc1 (staff ghosts part 3 - skinlimit raise. don't say we never did anythin for 'ya) +// - 0x0011 -- RR 2.4 rc2 (K_FlipFromObject oversight) #define MINDEMOVERSION 0x000E -#define DEMOVERSION 0x0010 +#define DEMOVERSION 0x0011 boolean G_CompatLevel(UINT16 level) { diff --git a/src/k_kart.c b/src/k_kart.c index a3eb8716b..7e825aa43 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -1869,7 +1869,19 @@ void K_FlipFromObject(mobj_t *mo, mobj_t *master) mo->flags2 = (mo->flags2 & ~MF2_OBJECTFLIP)|(master->flags2 & MF2_OBJECTFLIP); if (mo->eflags & MFE_VERTICALFLIP) - mo->z += master->height - FixedMul(master->scale, mo->height); + { + if (!G_CompatLevel(0x0010)) + { + mo->z = master->z + master->height // offset based off new foot position + - (mo->z - master->z) // the offset between us and master + - mo->height; // and then move our feet + } + else + { + // GOD DAMN IT, this has been wrong for years and we only notice now + mo->z += master->height - FixedMul(master->scale, mo->height); + } + } } void K_MatchGenericExtraFlags(mobj_t *mo, mobj_t *master)