Fix K_PlayerTripwireSpeedThreshold breakage

This commit is contained in:
AJ Martinez 2024-04-27 23:46:30 -07:00
parent b70e72fc75
commit b97c6e34c2
2 changed files with 5 additions and 4 deletions

View file

@ -2982,10 +2982,10 @@ fixed_t K_PlayerTripwireSpeedThreshold(const player_t *player)
// Make it harder for bots to do this when rubberbanding. // Make it harder for bots to do this when rubberbanding.
// This is actually biased really hard against the bot, // This is actually biased really hard against the bot,
// because the bot rubberbanding speed increase is // because the bot rubberbanding speed increase isgit buil
// decreased with other boosts. // decreased with other boosts.
required_speed = FixedMul(top_speed, player->botvars.rubberband); required_speed = FixedMul(required_speed, player->botvars.rubberband);
} }
return required_speed; return required_speed;
@ -3001,7 +3001,7 @@ tripwirepass_t K_TripwirePassConditions(const player_t *player)
if ( if (
player->flamedash || player->flamedash ||
(player->speed > K_PlayerTripwireSpeedThreshold(player)) && player->tripwireReboundDelay == 0) ((player->speed > K_PlayerTripwireSpeedThreshold(player)) && player->tripwireReboundDelay == 0)
) )
return TRIPWIRE_BOOST; return TRIPWIRE_BOOST;
@ -3075,7 +3075,7 @@ boolean K_WaterRun(mobj_t *mobj)
return K_IsHoldingDownTop(mobj->player) == false; return K_IsHoldingDownTop(mobj->player) == false;
} }
minspeed = K_PlayerTripwireSpeedThreshold(player); minspeed = K_PlayerTripwireSpeedThreshold(mobj->player);
if (mobj->player->speed < minspeed / 5) // 40% if (mobj->player->speed < minspeed / 5) // 40%
{ {

View file

@ -201,6 +201,7 @@ void K_StripOther(player_t *player);
void K_MomentumToFacing(player_t *player); void K_MomentumToFacing(player_t *player);
boolean K_ApplyOffroad(const player_t *player); boolean K_ApplyOffroad(const player_t *player);
boolean K_SlopeResistance(const player_t *player); boolean K_SlopeResistance(const player_t *player);
fixed_t K_PlayerTripwireSpeedThreshold(const player_t *player);
tripwirepass_t K_TripwirePassConditions(const player_t *player); tripwirepass_t K_TripwirePassConditions(const player_t *player);
boolean K_TripwirePass(const player_t *player); boolean K_TripwirePass(const player_t *player);
boolean K_MovingHorizontally(mobj_t *mobj); boolean K_MovingHorizontally(mobj_t *mobj);