diff --git a/src/g_game.c b/src/g_game.c index 6b2af2c5d..93a318e40 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 && grandprixinfo.gp == true && grandprixinfo.masterbots == false) + { + players[i].botvars.difficulty--; + + if (players[i].botvars.difficulty < 1) + { + players[i].botvars.difficulty = 1; + } + } + else + { + K_PlayerLoseLife(&players[i]); + } } } diff --git a/src/p_slopes.c b/src/p_slopes.c index 5175d850a..d71f80813 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,23 @@ void P_ButteredSlope(mobj_t *mo) thrust = FINESINE(mo->standingslope->zangle>>ANGLETOFINESHIFT) * 5 / 4 * (mo->eflags & MFE_VERTICALFLIP ? 1 : -1); - if (mo->player) { + 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 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; thrust = FixedMul(thrust, mult); }