From 05a95e9a380606072127ed068e947afee6ff1ca5 Mon Sep 17 00:00:00 2001 From: ceski <56656010+ceski-1@users.noreply.github.com> Date: Thu, 31 Oct 2024 14:14:48 -0700 Subject: [PATCH] Rumble adjustments * Adjust item pickup rumble for Dualsense controllers * Use default scale for origin type rumble --- src/i_rumble.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/i_rumble.c b/src/i_rumble.c index a93bcd5d..94150efd 100644 --- a/src/i_rumble.c +++ b/src/i_rumble.c @@ -83,7 +83,7 @@ static fft_t fft; // Rumble pattern presets. -static const float rumble_itemup[] = {0.12f, 0.0f}; +static const float rumble_itemup[] = {0.12f, 0.02f, 0.0f}; static const float rumble_wpnup[] = {0.12f, 0.07f, 0.04f, 0.16f, 0.0f}; static const float rumble_getpow[] = {0.07f, 0.14f, 0.16f, 0.14f, 0.0f}; static const float rumble_oof[] = {0.14f, 0.12f, 0.0f}; @@ -632,7 +632,7 @@ static boolean CalcChannelScale(const mobj_t *listener, const mobj_t *origin, if (dist <= R_CLOSE) { - node->scale = 1.0f; + node->scale = default_scale[node->type]; } else if (dist >= R_CLIP) { @@ -640,7 +640,8 @@ static boolean CalcChannelScale(const mobj_t *listener, const mobj_t *origin, } else { - node->scale = (R_CLIP - dist) * R_CLOSE / ((R_CLIP - R_CLOSE) * dist); + node->scale = default_scale[node->type] * (R_CLIP - dist) * R_CLOSE + / ((R_CLIP - R_CLOSE) * dist); } return (node->scale > 0.0f);