mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-02-18 19:41:29 +00:00
Merge branch 'big-boost' into 'master'
Big Boosts See merge request KartKrew/Kart!643
This commit is contained in:
commit
7f71775ae0
1 changed files with 8 additions and 5 deletions
13
src/k_kart.c
13
src/k_kart.c
|
|
@ -2992,15 +2992,14 @@ INT16 K_GetSpindashChargeTime(player_t *player)
|
|||
fixed_t K_GetSpindashChargeSpeed(player_t *player)
|
||||
{
|
||||
// more speed for higher weight & speed
|
||||
// Tails = +6.25%, Fang = +20.31%, Mighty = +20.31%, Metal = +25%
|
||||
// Tails = +18.75%, Fang = +46.88%, Mighty = +46.88%, Metal = +56.25%
|
||||
// (can be higher than this value when overcharged)
|
||||
const fixed_t val = (player->kartspeed + player->kartweight) * (FRACUNIT/32);
|
||||
const fixed_t val = ((player->kartspeed + player->kartweight) + 2) * (FRACUNIT/32);
|
||||
|
||||
// TODO: gametyperules
|
||||
return (gametype == GT_BATTLE) ? (4 * val) : val;
|
||||
}
|
||||
|
||||
|
||||
// sets boostpower, speedboost, accelboost, and handleboost to whatever we need it to be
|
||||
static void K_GetKartBoostPower(player_t *player)
|
||||
{
|
||||
|
|
@ -3085,7 +3084,7 @@ static void K_GetKartBoostPower(player_t *player)
|
|||
|
||||
if (player->startboost) // Startup Boost
|
||||
{
|
||||
ADDBOOST(FRACUNIT/2, 4*FRACUNIT, 0); // + 50% top speed, + 400% acceleration, +0% handling
|
||||
ADDBOOST(FRACUNIT, 4*FRACUNIT, sliptidehandling/2); // + 100% top speed, + 400% acceleration, +25% handling
|
||||
}
|
||||
|
||||
if (player->driftboost) // Drift Boost
|
||||
|
|
@ -7291,6 +7290,8 @@ static void K_LookForRings(mobj_t *pmo)
|
|||
*/
|
||||
void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
||||
{
|
||||
const boolean onground = P_IsObjectOnGround(player->mo);
|
||||
|
||||
K_UpdateOffroad(player);
|
||||
K_UpdateDraft(player);
|
||||
K_UpdateEngineSounds(player); // Thanks, VAda!
|
||||
|
|
@ -7562,8 +7563,10 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
|||
if (player->strongdriftboost)
|
||||
player->strongdriftboost--;
|
||||
|
||||
if (player->startboost)
|
||||
if (player->startboost > 0 && onground == true)
|
||||
{
|
||||
player->startboost--;
|
||||
}
|
||||
|
||||
if (player->spindashboost)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue