From 644257eab2585e07e8f5976f3c6d72ea99bc8593 Mon Sep 17 00:00:00 2001 From: Ian Date: Mon, 16 Oct 2023 13:43:59 -0400 Subject: [PATCH] Fix movement speeds with circle pad --- source/in_null.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/source/in_null.c b/source/in_null.c index f265a32..b1569f0 100644 --- a/source/in_null.c +++ b/source/in_null.c @@ -137,12 +137,18 @@ void IN_Move (usercmd_t *cmd) if (new3ds_flag) { float move_x, move_y; - speed = sv_player->v.maxspeed/210; - move_x = IN_CalcInput(left.dx, speed, deadZone, acceleration); - move_y = IN_CalcInput(left.dy, speed, deadZone, acceleration); + cl_backspeed = cl_forwardspeed = cl_sidespeed = sv_player->v.maxspeed*1.2; + cl_sidespeed *= 0.8; + cl_backspeed *= 0.7; - cmd->sidemove += cl_sidespeed * move_x; - cmd->forwardmove += cl_forwardspeed * move_y; + if (left.dx > 0) + move_x = IN_CalcInput(left.dx, cl_forwardspeed, deadZone, acceleration); + else + move_x = IN_CalcInput(left.dx, cl_backspeed, deadZone, acceleration); + move_y = IN_CalcInput(left.dy, cl_sidespeed, deadZone, acceleration); + + cmd->sidemove += move_x; + cmd->forwardmove += move_y; } }