mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Spring/spindash grease & invincibility gives you slope resistence
This commit is contained in:
parent
e8774cf7b2
commit
7584274636
3 changed files with 9 additions and 1 deletions
|
|
@ -2030,6 +2030,13 @@ boolean K_ApplyOffroad(player_t *player)
|
|||
return true;
|
||||
}
|
||||
|
||||
boolean K_SlopeResistance(player_t *player)
|
||||
{
|
||||
if (player->kartstuff[k_invincibilitytimer] || player->kartstuff[k_sneakertimer] || player->kartstuff[k_tiregrease])
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
static fixed_t K_FlameShieldDashVar(INT32 val)
|
||||
{
|
||||
// 1 second = 75% + 50% top speed
|
||||
|
|
|
|||
|
|
@ -82,6 +82,7 @@ void K_StripItems(player_t *player);
|
|||
void K_StripOther(player_t *player);
|
||||
void K_MomentumToFacing(player_t *player);
|
||||
boolean K_ApplyOffroad(player_t *player);
|
||||
boolean K_SlopeResistance(player_t *player);
|
||||
INT16 K_GetSpindashChargeTime(player_t *player);
|
||||
fixed_t K_GetSpindashChargeSpeed(player_t *player);
|
||||
fixed_t K_GetKartSpeedFromStat(UINT8 kartspeed);
|
||||
|
|
|
|||
|
|
@ -1851,7 +1851,7 @@ static void P_3dMovement(player_t *player)
|
|||
totalthrust.x = totalthrust.y = 0; // I forget if this is needed
|
||||
totalthrust.z = FRACUNIT*P_MobjFlip(player->mo)/3; // A bit of extra push-back on slopes
|
||||
|
||||
if (player->kartstuff[k_sneakertimer] > 0)
|
||||
if (K_SlopeResistance(player) == true)
|
||||
{
|
||||
totalthrust.z = -(totalthrust.z);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue