Give purple & rainbow driftboosts a 30% speed boost

This commit is contained in:
lachablock 2021-04-21 14:40:13 +10:00
parent 80ff9f2203
commit aeaf6c94f5
6 changed files with 22 additions and 3 deletions

View file

@ -376,6 +376,7 @@ typedef struct player_s
SINT8 drift; // (-5 to 5) - Drifting Left or Right, plus a bigger counter = sharper turn
fixed_t driftcharge; // Charge your drift so you can release a burst of speed
UINT8 driftboost; // (0 to 125) - Boost you get from drifting
UINT8 strongdriftboost; // (0 to 125) - While active, boost from drifting gives a stronger speed increase
SINT8 aizdriftstrat; // (-1 to 1) - Let go of your drift while boosting? Helper for the SICK STRATZ (sliptiding!) you have just unlocked
INT32 aizdrifttilt;

View file

@ -2536,7 +2536,14 @@ static void K_GetKartBoostPower(player_t *player)
if (player->driftboost) // Drift Boost
{
ADDBOOST(FRACUNIT/4, 4*FRACUNIT, 0); // + 25% top speed, + 400% acceleration, +0% handling
if (player->strongdriftboost) // Purple/Rainbow drift boost
{
ADDBOOST(3*FRACUNIT/10, 4*FRACUNIT, 0); // + 30% top speed, + 400% acceleration, +0% handling
}
else
{
ADDBOOST(FRACUNIT/4, 4*FRACUNIT, 0); // + 25% top speed, + 400% acceleration, +0% handling
}
}
if (player->ringboost) // Ring Boost
@ -6529,6 +6536,9 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
if (player->driftboost)
player->driftboost--;
if (player->strongdriftboost)
player->strongdriftboost--;
if (player->startboost)
player->startboost--;
@ -7456,6 +7466,8 @@ static void K_KartDrift(player_t *player, boolean onground)
if (player->driftboost < 85)
player->driftboost = 85;
if (player->strongdriftboost < 85)
player->strongdriftboost = 85;
K_SpawnDriftBoostExplosion(player, 3);
K_SpawnDriftElectricSparks(player);
@ -7468,6 +7480,8 @@ static void K_KartDrift(player_t *player, boolean onground)
if (player->driftboost < 125)
player->driftboost = 125;
if (player->strongdriftboost < 125)
player->strongdriftboost = 125;
K_SpawnDriftBoostExplosion(player, 4);
K_SpawnDriftElectricSparks(player);

View file

@ -150,7 +150,7 @@ void K_DoIngameRespawn(player_t *player)
K_DoFault(player);
player->ringboost = 0;
player->driftboost = 0;
player->driftboost = player->strongdriftboost = 0;
// If player was tumbling, set variables so that they don't tumble like crazy after they're done respawning
if (player->tumbleBounces > 0)

View file

@ -244,6 +244,8 @@ static int player_get(lua_State *L)
lua_pushinteger(L, plr->driftcharge);
else if (fastcmp(field,"driftboost"))
lua_pushinteger(L, plr->driftboost);
else if (fastcmp(field,"strongdriftboost"))
lua_pushinteger(L, plr->strongdriftboost);
else if (fastcmp(field,"aizdriftstraft"))
lua_pushinteger(L, plr->aizdriftstrat);
else if (fastcmp(field,"aizdrifttilt"))

View file

@ -1865,7 +1865,7 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
}
player->sneakertimer = player->numsneakers = 0;
player->driftboost = 0;
player->driftboost = player->strongdriftboost = 0;
player->ringboost = 0;
switch (type)

View file

@ -233,6 +233,7 @@ static void P_NetArchivePlayers(void)
WRITESINT8(save_p, players[i].drift);
WRITEFIXED(save_p, players[i].driftcharge);
WRITEUINT8(save_p, players[i].driftboost);
WRITEUINT8(save_p, players[i].strongdriftboost);
WRITESINT8(save_p, players[i].aizdriftstrat);
WRITEINT32(save_p, players[i].aizdrifttilt);
@ -484,6 +485,7 @@ static void P_NetUnArchivePlayers(void)
players[i].drift = READSINT8(save_p);
players[i].driftcharge = READFIXED(save_p);
players[i].driftboost = READUINT8(save_p);
players[i].strongdriftboost = READUINT8(save_p);
players[i].aizdriftstrat = READSINT8(save_p);
players[i].aizdrifttilt = READINT32(save_p);