From 569b9a7dee4e36fa7cf7895da620404a133747dd Mon Sep 17 00:00:00 2001 From: Sally Coolatta Date: Sat, 11 Mar 2023 03:36:13 -0500 Subject: [PATCH 1/4] Reduce all bot difficulty when retrying Especially reasonable now that you have a penalty for retrying. --- src/g_game.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/g_game.c b/src/g_game.c index 6b2af2c5d..f7f9bc345 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -2138,7 +2138,19 @@ void G_Ticker(boolean run) { if (playeringame[i]) { - K_PlayerLoseLife(&players[i]); + if (players[i].bot == true) + { + players[i].botvars.difficulty--; + + if (players[i].botvars.difficulty < 1) + { + players[i].botvars.difficulty = 1; + } + } + else + { + K_PlayerLoseLife(&players[i]); + } } } From 5639113ed848ae234276079f5a3db893f0aa2cdd Mon Sep 17 00:00:00 2001 From: Sally Coolatta Date: Sat, 11 Mar 2023 04:59:47 -0500 Subject: [PATCH 2/4] Slope thrust changes - Slope thrust is scaled with game speed. Makes Easy more reasonable, and Hard goofier. - Slope upward/downward thrust multiplier is applied to all objects equally, instead of only players. --- src/p_slopes.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/src/p_slopes.c b/src/p_slopes.c index 5175d850a..fb2631aef 100644 --- a/src/p_slopes.c +++ b/src/p_slopes.c @@ -1112,13 +1112,18 @@ void P_HandleSlopeLanding(mobj_t *thing, pslope_t *slope) // Handles sliding down slopes, like if they were made of butter :) void P_ButteredSlope(mobj_t *mo) { - fixed_t thrust; + const fixed_t gameSpeed = K_GetKartGameSpeedScalar(gamespeed); + fixed_t thrust = 0; if (mo->flags & (MF_NOCLIPHEIGHT|MF_NOGRAVITY)) + { return; // don't slide down slopes if you can't touch them or you're not affected by gravity + } if (P_CanApplySlopePhysics(mo, mo->standingslope) == false) + { return; // No physics, no butter. + } if (mo->player != NULL) { @@ -1141,17 +1146,21 @@ void P_ButteredSlope(mobj_t *mo) thrust = FINESINE(mo->standingslope->zangle>>ANGLETOFINESHIFT) * 5 / 4 * (mo->eflags & MFE_VERTICALFLIP ? 1 : -1); - if (mo->player) { + // Make uphill easier to climb, and downhill even faster. + if (mo->momx || mo->momy) + { fixed_t mult = FRACUNIT; - if (mo->momx || mo->momy) { - angle_t angle = R_PointToAngle2(0, 0, mo->momx, mo->momy) - mo->standingslope->xydirection; + angle_t angle = R_PointToAngle2(0, 0, mo->momx, mo->momy) - mo->standingslope->xydirection; - if (P_MobjFlip(mo) * mo->standingslope->zdelta < 0) - angle ^= ANGLE_180; - - mult = FRACUNIT + (FRACUNIT + FINECOSINE(angle>>ANGLETOFINESHIFT))*4/3; + if (P_MobjFlip(mo) * mo->standingslope->zdelta < 0) + { + angle ^= ANGLE_180; } + // Make downhills goofier for Hard, and climbing slopes easier for Easy. + mult = FixedMul(mult, gameSpeed); + + mult = FRACUNIT + (FRACUNIT + mult)*4/3; thrust = FixedMul(thrust, mult); } From 431a99db78904528e3f8523c23e7cd76ff429787 Mon Sep 17 00:00:00 2001 From: Sally Coolatta Date: Sat, 11 Mar 2023 05:01:50 -0500 Subject: [PATCH 3/4] Don't decrease bot difficulty on Master --- src/g_game.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/g_game.c b/src/g_game.c index f7f9bc345..93a318e40 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -2138,7 +2138,7 @@ void G_Ticker(boolean run) { if (playeringame[i]) { - if (players[i].bot == true) + if (players[i].bot == true && grandprixinfo.gp == true && grandprixinfo.masterbots == false) { players[i].botvars.difficulty--; From 383bf4b604bf49ab0aefd5db70486fe065902c1a Mon Sep 17 00:00:00 2001 From: Sally Coolatta Date: Sat, 11 Mar 2023 18:07:04 -0500 Subject: [PATCH 4/4] Fix deleted line for uphill/downhill multiplier --- src/p_slopes.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/p_slopes.c b/src/p_slopes.c index fb2631aef..d71f80813 100644 --- a/src/p_slopes.c +++ b/src/p_slopes.c @@ -1146,7 +1146,6 @@ void P_ButteredSlope(mobj_t *mo) thrust = FINESINE(mo->standingslope->zangle>>ANGLETOFINESHIFT) * 5 / 4 * (mo->eflags & MFE_VERTICALFLIP ? 1 : -1); - // Make uphill easier to climb, and downhill even faster. if (mo->momx || mo->momy) { fixed_t mult = FRACUNIT; @@ -1157,7 +1156,10 @@ void P_ButteredSlope(mobj_t *mo) angle ^= ANGLE_180; } - // Make downhills goofier for Hard, and climbing slopes easier for Easy. + // Make uphill easier to climb, and downhill even faster. + mult = FINECOSINE(angle >> ANGLETOFINESHIFT); + + // Make relative to game speed mult = FixedMul(mult, gameSpeed); mult = FRACUNIT + (FRACUNIT + mult)*4/3;