From c9cabf0b95d6953219733573899acc9173577bad Mon Sep 17 00:00:00 2001 From: AJ Martinez Date: Mon, 20 May 2024 20:00:17 -0700 Subject: [PATCH 1/4] Never allow turn solver wrongsteer --- src/p_user.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/p_user.c b/src/p_user.c index a0579ba76..2423c2df6 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -2364,7 +2364,12 @@ static void P_UpdatePlayerAngle(player_t *player) { // We're off. Try to legally steer the player towards their camera. - if (K_Sliptiding(player) && P_IsObjectOnGround(player->mo) && (player->cmd.turning != 0) && ((player->cmd.turning > 0) == (player->aizdriftstrat > 0))) + // 2.3 - Never allow turn solver to steer against your input (fixes heavyweight sliptides) + boolean restrictDirectionChange = (player->cmd.turning != 0); + if (G_CompatLevel(0x000C)) + restrictDirectionChange = (K_Sliptiding(player) && P_IsObjectOnGround(player->mo) && (player->cmd.turning != 0) && ((player->cmd.turning > 0) == (player->aizdriftstrat > 0))); + + if (restrictDirectionChange) { // Don't change handling direction if someone's inputs are sliptiding, you'll break the sliptide! if (player->cmd.turning > 0) From 96fab61da124ac61fdf99b52ae0f773ca99b67fb Mon Sep 17 00:00:00 2001 From: AJ Martinez Date: Mon, 20 May 2024 20:55:12 -0700 Subject: [PATCH 2/4] Reduce angle-snap leniency to kludge heavyweight sliptide starts --- src/p_user.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/p_user.c b/src/p_user.c index 2423c2df6..fa0634b7a 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -2350,7 +2350,7 @@ static void P_UpdatePlayerAngle(player_t *player) } else { - leniency_base = 8 * ANG1 / 3; + leniency_base = 6 * ANG1 / 3; } angle_t leniency = leniency_base * min(player->cmd.latency, 6); // Don't force another turning tic, just give them the desired angle! @@ -2364,12 +2364,7 @@ static void P_UpdatePlayerAngle(player_t *player) { // We're off. Try to legally steer the player towards their camera. - // 2.3 - Never allow turn solver to steer against your input (fixes heavyweight sliptides) - boolean restrictDirectionChange = (player->cmd.turning != 0); - if (G_CompatLevel(0x000C)) - restrictDirectionChange = (K_Sliptiding(player) && P_IsObjectOnGround(player->mo) && (player->cmd.turning != 0) && ((player->cmd.turning > 0) == (player->aizdriftstrat > 0))); - - if (restrictDirectionChange) + if (K_Sliptiding(player) && P_IsObjectOnGround(player->mo) && (player->cmd.turning != 0) && ((player->cmd.turning > 0) == (player->aizdriftstrat > 0))) { // Don't change handling direction if someone's inputs are sliptiding, you'll break the sliptide! if (player->cmd.turning > 0) From 447f95196cd87573d55df79cd4923cc20487edd2 Mon Sep 17 00:00:00 2001 From: AJ Martinez Date: Mon, 20 May 2024 20:56:46 -0700 Subject: [PATCH 3/4] Properly compatlevel leniency_base --- src/p_user.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/p_user.c b/src/p_user.c index fa0634b7a..74a6b41cf 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -2349,9 +2349,17 @@ static void P_UpdatePlayerAngle(player_t *player) leniency_base = 4 * ANG1 / 3; } else + { + leniency_base = 8 * ANG1 / 3; + } + + // Gross. Take a look at sliptide starts properly for 2.4. + // Yell at Tyron! + if (G_CompatLevel(0x000C)) { leniency_base = 6 * ANG1 / 3; } + angle_t leniency = leniency_base * min(player->cmd.latency, 6); // Don't force another turning tic, just give them the desired angle! From 7bc1927a6cde741ce0f56c79d41efad52cd1a92c Mon Sep 17 00:00:00 2001 From: AJ Martinez Date: Mon, 20 May 2024 20:57:27 -0700 Subject: [PATCH 4/4] leniency_base compatlevel tyop --- src/p_user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/p_user.c b/src/p_user.c index 74a6b41cf..c144c04bd 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -2355,7 +2355,7 @@ static void P_UpdatePlayerAngle(player_t *player) // Gross. Take a look at sliptide starts properly for 2.4. // Yell at Tyron! - if (G_CompatLevel(0x000C)) + if (!G_CompatLevel(0x000C)) { leniency_base = 6 * ANG1 / 3; }