Slower Drop Dash boost type

This commit is contained in:
AJ Martinez 2023-05-27 21:55:26 -07:00
parent 8240dbe4e6
commit 4875311ac9
4 changed files with 13 additions and 3 deletions

View file

@ -530,7 +530,8 @@ struct player_t
respawnvars_t respawn; // Respawn info respawnvars_t respawn; // Respawn info
mobj_t *ringShooter; // DEZ respawner object mobj_t *ringShooter; // DEZ respawner object
tic_t airtime; // Used to track just air time, but has evolved over time into a general "karted" timer. Rename this variable? tic_t airtime; // Used to track just air time, but has evolved over time into a general "karted" timer. Rename this variable?
UINT8 startboost; // (0 to 125) - Boost you get from start of race or respawn drop dash UINT8 startboost; // (0 to 125) - Boost you get from start of race
UINT8 dropdashboost; // Boost you get when holding A while respawning
UINT16 flashing; UINT16 flashing;
UINT16 spinouttimer; // Spin-out from a banana peel or oil slick (was "pw_bananacam") UINT16 spinouttimer; // Spin-out from a banana peel or oil slick (was "pw_bananacam")

View file

@ -1564,7 +1564,7 @@ void K_SpawnDashDustRelease(player_t *player)
if (!P_IsObjectOnGround(player->mo)) if (!P_IsObjectOnGround(player->mo))
return; return;
if (!player->speed && !player->startboost && !player->spindash) if (!player->speed && !player->startboost && !player->spindash && !player->dropdashboost)
return; return;
travelangle = player->mo->angle; travelangle = player->mo->angle;
@ -3107,6 +3107,11 @@ static void K_GetKartBoostPower(player_t *player)
ADDBOOST(FRACUNIT, 4*FRACUNIT, SLIPTIDEHANDLING); // + 100% top speed, + 400% acceleration, +50% handling ADDBOOST(FRACUNIT, 4*FRACUNIT, SLIPTIDEHANDLING); // + 100% top speed, + 400% acceleration, +50% handling
} }
if (player->dropdashboost) // Drop dash
{
ADDBOOST(FRACUNIT/3, 4*FRACUNIT, SLIPTIDEHANDLING); // + 33% top speed, + 400% acceleration, +50% handling
}
if (player->driftboost) // Drift Boost if (player->driftboost) // Drift Boost
{ {
// Rebuff Eggman's stat block corner // Rebuff Eggman's stat block corner
@ -7881,6 +7886,8 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
{ {
player->startboost--; player->startboost--;
} }
if (player->dropdashboost)
player->dropdashboost--;
if (player->sliptideZipBoost > 0 && onground == true) if (player->sliptideZipBoost > 0 && onground == true)
{ {

View file

@ -799,7 +799,7 @@ static void K_HandleDropDash(player_t *player)
if ((buttons & BT_ACCELERATE) && (player->respawn.dropdash >= TICRATE/4)) if ((buttons & BT_ACCELERATE) && (player->respawn.dropdash >= TICRATE/4))
{ {
S_StartSound(player->mo, sfx_s23c); S_StartSound(player->mo, sfx_s23c);
player->startboost = 50; player->dropdashboost = 50;
K_SpawnDashDustRelease(player); K_SpawnDashDustRelease(player);
} }

View file

@ -281,6 +281,7 @@ static void P_NetArchivePlayers(savebuffer_t *save)
WRITEUINT32(save->p, K_GetWaypointHeapIndex(players[i].nextwaypoint)); WRITEUINT32(save->p, K_GetWaypointHeapIndex(players[i].nextwaypoint));
WRITEUINT32(save->p, players[i].airtime); WRITEUINT32(save->p, players[i].airtime);
WRITEUINT8(save->p, players[i].startboost); WRITEUINT8(save->p, players[i].startboost);
WRITEUINT8(save->p, players[i].dropdashboost);
WRITEUINT16(save->p, players[i].flashing); WRITEUINT16(save->p, players[i].flashing);
WRITEUINT16(save->p, players[i].spinouttimer); WRITEUINT16(save->p, players[i].spinouttimer);
@ -666,6 +667,7 @@ static void P_NetUnArchivePlayers(savebuffer_t *save)
players[i].nextwaypoint = (waypoint_t *)(size_t)READUINT32(save->p); players[i].nextwaypoint = (waypoint_t *)(size_t)READUINT32(save->p);
players[i].airtime = READUINT32(save->p); players[i].airtime = READUINT32(save->p);
players[i].startboost = READUINT8(save->p); players[i].startboost = READUINT8(save->p);
players[i].dropdashboost = READUINT8(save->p);
players[i].flashing = READUINT16(save->p); players[i].flashing = READUINT16(save->p);
players[i].spinouttimer = READUINT16(save->p); players[i].spinouttimer = READUINT16(save->p);