Fix K_PlayerTripwireSpeedThreshold breakage
This commit is contained in:
parent
bb4d3ea2fb
commit
2f9c1631ca
2 changed files with 26 additions and 1 deletions
26
src/k_kart.c
26
src/k_kart.c
|
|
@ -2678,6 +2678,30 @@ boolean K_SlopeResistance(player_t *player)
|
|||
return false;
|
||||
}
|
||||
|
||||
fixed_t K_PlayerTripwireSpeedThreshold(player_t *player)
|
||||
{
|
||||
fixed_t required_speed = 2 * K_GetKartSpeed(player, false, false); // 200%
|
||||
|
||||
if (player->offroad && K_ApplyOffroad(player))
|
||||
{
|
||||
// Increase to 300% if you're lawnmowering.
|
||||
required_speed = (required_speed * 3) / 2;
|
||||
}
|
||||
|
||||
if (player->botvars.rubberband > FRACUNIT && K_PlayerUsesBotMovement(player) == true)
|
||||
{
|
||||
// Make it harder for bots to do this when rubberbanding.
|
||||
|
||||
// This is actually biased really hard against the bot,
|
||||
// because the bot rubberbanding speed increase is
|
||||
// decreased with other boosts.
|
||||
|
||||
required_speed = FixedMul(required_speed, player->botvars.rubberband);
|
||||
}
|
||||
|
||||
return required_speed;
|
||||
}
|
||||
|
||||
tripwirepass_t K_TripwirePassConditions(player_t *player)
|
||||
{
|
||||
if (
|
||||
|
|
@ -2688,7 +2712,7 @@ tripwirepass_t K_TripwirePassConditions(player_t *player)
|
|||
|
||||
if (
|
||||
player->flamedash ||
|
||||
(player->speed > 2 * K_GetKartSpeed(player, false, false) && player->tripwireReboundDelay == 0)
|
||||
((player->speed > K_PlayerTripwireSpeedThreshold(player)) && player->tripwireReboundDelay == 0)
|
||||
)
|
||||
return TRIPWIRE_BOOST;
|
||||
|
||||
|
|
|
|||
|
|
@ -106,6 +106,7 @@ void K_StripOther(player_t *player);
|
|||
void K_MomentumToFacing(player_t *player);
|
||||
boolean K_ApplyOffroad(player_t *player);
|
||||
boolean K_SlopeResistance(player_t *player);
|
||||
fixed_t K_PlayerTripwireSpeedThreshold(player_t *player);
|
||||
tripwirepass_t K_TripwirePassConditions(player_t *player);
|
||||
boolean K_TripwirePass(player_t *player);
|
||||
boolean K_MovingHorizontally(player_t *player);
|
||||
|
|
|
|||
Loading…
Reference in a new issue