Fuck it, use a boost type

This commit is contained in:
Antonio Martinez 2025-10-08 22:22:03 -04:00
parent 668a2d8d31
commit fb63ce7304
4 changed files with 20 additions and 2 deletions

View file

@ -757,6 +757,7 @@ struct player_t
tic_t lastairtime;
UINT16 bigwaypointgap; // timer counts down if finish line distance gap is too big to update waypoint
UINT8 startboost; // (0 to 125) - Boost you get from start of race
UINT8 neostartboost; // Weaker partial startboost
UINT8 dropdashboost; // Boost you get when holding A while respawning
UINT8 aciddropdashboost; // acid dropdash

View file

@ -1554,7 +1554,7 @@ static boolean K_TryDraft(player_t *player, mobj_t *dest, fixed_t minDist, fixed
if (dest->player != NULL)
{
// No tethering off of the guy who got the starting bonus :P
if (dest->player->startboost > 0)
if (dest->player->startboost > 0 || dest->player->neostartboost > 0)
{
return false;
}
@ -3840,6 +3840,11 @@ static void K_GetKartBoostPower(player_t *player)
ADDBOOST(FRACUNIT, 4*FRACUNIT, HANDLESCALING); // + 100% top speed, + 400% acceleration, +50% handling
}
if (player->neostartboost) // Startup Boost
{
ADDBOOST(FRACUNIT/2, 2*FRACUNIT, HANDLESCALING/3); // + 50% top speed, + 200% acceleration, +no sliptide% handling
}
if (player->dropdashboost) // Drop dash
{
ADDBOOST(FRACUNIT/3, 4*FRACUNIT, HANDLESCALING); // + 33% top speed, + 400% acceleration, +50% handling
@ -10717,6 +10722,12 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
{
player->startboost--;
}
if (player->neostartboost > 0 && onground == true)
{
player->neostartboost--;
}
if (player->dropdashboost)
player->dropdashboost--;

View file

@ -321,6 +321,8 @@ static int player_get(lua_State *L)
lua_pushinteger(L, plr->gateSound);
else if (fastcmp(field,"startboost"))
lua_pushinteger(L, plr->startboost);
else if (fastcmp(field,"neostartboost"))
lua_pushinteger(L, plr->neostartboost);
else if (fastcmp(field,"dropdashboost"))
lua_pushinteger(L, plr->dropdashboost);
else if (fastcmp(field,"aciddropdashboost"))
@ -992,6 +994,8 @@ static int player_set(lua_State *L)
plr->gateSound = luaL_checkinteger(L, 3);
else if (fastcmp(field,"startboost"))
plr->startboost = luaL_checkinteger(L, 3);
else if (fastcmp(field,"neostartboost"))
plr->neostartboost = luaL_checkinteger(L, 3);
else if (fastcmp(field,"dropdashboost"))
plr->dropdashboost = luaL_checkinteger(L, 3);
else if (fastcmp(field,"aciddropdashboost"))
@ -1049,7 +1053,7 @@ static int player_set(lua_State *L)
else if (fastcmp(field,"fakeboost"))
plr->fakeBoost = luaL_checkinteger(L, 3);
else if (fastcmp(field,"subsonicleniency"))
plr->subsonicleniency = luaL_checkinteger(L, 3);
plr->subsonicleniency = luaL_checkinteger(L, 3);
else if (fastcmp(field,"tripwireleniency"))
plr->tripwireLeniency = luaL_checkinteger(L, 3);
else if (fastcmp(field,"tripwireairleniency"))

View file

@ -467,6 +467,7 @@ static void P_NetArchivePlayers(savebuffer_t *save)
WRITEUINT32(save->p, players[i].lastairtime);
WRITEUINT16(save->p, players[i].bigwaypointgap);
WRITEUINT8(save->p, players[i].startboost);
WRITEUINT8(save->p, players[i].neostartboost);
WRITEUINT8(save->p, players[i].dropdashboost);
WRITEUINT8(save->p, players[i].aciddropdashboost);
@ -1148,6 +1149,7 @@ static void P_NetUnArchivePlayers(savebuffer_t *save)
players[i].lastairtime = READUINT32(save->p);
players[i].bigwaypointgap = READUINT16(save->p);
players[i].startboost = READUINT8(save->p);
players[i].neostartboost = READUINT8(save->p);
players[i].dropdashboost = READUINT8(save->p);
players[i].aciddropdashboost = READUINT8(save->p);