From 8a8466bae8db7216f33a3b82c90afb3ef35063a6 Mon Sep 17 00:00:00 2001 From: minenice55 Date: Tue, 21 Apr 2026 15:51:09 -0400 Subject: [PATCH] fix grow on dashrings for real --- src/d_player.h | 4 +++- src/objects/dash-rings.c | 2 ++ src/p_mobj.c | 5 +++++ src/p_user.c | 5 +++++ 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/d_player.h b/src/d_player.h index 933cfdd42..14eb3467f 100644 --- a/src/d_player.h +++ b/src/d_player.h @@ -72,7 +72,9 @@ typedef enum PF_GAINAX = 1<<3, PF_KICKSTARTACCEL = 1<<4, // Accessibility feature: Is accelerate in kickstart mode? - // free: 1<<5 and 1<<6 + // free: 1<<5 + + PF_NOSCALEGRAVITY = 1<<6, // Don't scale gravity by player object scale (cleared when grounded) PF_WANTSTOJOIN = 1<<7, // Spectator that wants to join diff --git a/src/objects/dash-rings.c b/src/objects/dash-rings.c index 8a272a2a9..7f019c736 100644 --- a/src/objects/dash-rings.c +++ b/src/objects/dash-rings.c @@ -163,6 +163,8 @@ void Obj_DashRingTouch(mobj_t *ring, player_t *player) player->carry = CR_DASHRING; player->dashRingPullTics = DASHRING_PULL_TICS; player->dashRingPushTics = 0; + + player->pflags |= PF_NOSCALEGRAVITY; } static fixed_t GetPlayerDashRingZ(player_t *player, mobj_t *ring) diff --git a/src/p_mobj.c b/src/p_mobj.c index 62eff567e..8a569e487 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -1195,6 +1195,11 @@ fixed_t P_GetMobjGravity(mobj_t *mo) { gravitymul = mapobjectscale; } + + if (mo->player->pflags & PF_NOSCALEGRAVITY) + { + gravitymul = mapobjectscale; + } } else { diff --git a/src/p_user.c b/src/p_user.c index 37a9fa9ff..5d303e464 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -4324,6 +4324,11 @@ void P_PlayerThink(player_t *player) player->typing_duration = 0; } + if (P_IsObjectOnGround(player->mo) && (player->pflags & PF_NOSCALEGRAVITY)) + { + player->pflags &= ~PF_NOSCALEGRAVITY; + } + player->pflags &= ~PF_HITFINISHLINE; // experiment: process the drift input *before* player movement instead of after