mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-03-22 19:02:15 +00:00
Drop Dash + alternate start boosts
New respawn boost behavior, where you just hold for long enough instead of timing it with hitting the ground. Also much weaker, just gives you enough boost to get going instead of being a free sneaker. Start boosts have been severely changed. The perfect one has an extra tic on its timing window and gets Sneaker boosting special effects, but every other possible boost has been severely nerfed.
This commit is contained in:
parent
aca9d505cc
commit
7a91398066
6 changed files with 80 additions and 42 deletions
|
@ -276,6 +276,7 @@ typedef enum
|
|||
k_waypoint, // Waypoints.
|
||||
k_starpostwp, // Temporarily stores player waypoint for... some reason. Used when respawning and finishing.
|
||||
k_respawn, // Timer for the DEZ laser respawn effect
|
||||
k_dropdash, // Charge up for respawn Drop Dash
|
||||
|
||||
k_throwdir, // Held dir of controls; 1 = forward, 0 = none, -1 = backward (was "player->heldDir")
|
||||
k_lapanimation, // Used to show the lap start wing logo animation
|
||||
|
@ -291,7 +292,8 @@ typedef enum
|
|||
k_driftend, // Drift has ended, used to adjust character angle after drift
|
||||
k_driftcharge, // Charge your drift so you can release a burst of speed
|
||||
k_driftboost, // Boost you get from drifting
|
||||
k_boostcharge, // Charge-up for boosting at the start of the race, or when dropping from respawn
|
||||
k_boostcharge, // Charge-up for boosting at the start of the race
|
||||
k_startboost, // Boost you get from start of race or respawn drop dash
|
||||
k_jmp, // In Mario Kart, letting go of the jump button stops the drift
|
||||
k_offroad, // In Super Mario Kart, going offroad has lee-way of about 1 second before you start losing speed
|
||||
k_pogospring, // Pogo spring bounce effect
|
||||
|
|
|
@ -7672,6 +7672,7 @@ static const char *const KARTSTUFF_LIST[] = {
|
|||
"WAYPOINT",
|
||||
"STARPOSTWP",
|
||||
"RESPAWN",
|
||||
"DROPDASH",
|
||||
|
||||
"THROWDIR",
|
||||
"LAPANIMATION",
|
||||
|
@ -7688,6 +7689,7 @@ static const char *const KARTSTUFF_LIST[] = {
|
|||
"DRIFTCHARGE",
|
||||
"DRIFTBOOST",
|
||||
"BOOSTCHARGE",
|
||||
"STARTBOOST",
|
||||
"JMP",
|
||||
"OFFROAD",
|
||||
"POGOSPRING",
|
||||
|
|
111
src/k_kart.c
111
src/k_kart.c
|
@ -1236,7 +1236,7 @@ void K_RespawnChecker(player_t *player)
|
|||
if (player->spectator)
|
||||
return;
|
||||
|
||||
if (player->kartstuff[k_respawn] > 3)
|
||||
if (player->kartstuff[k_respawn] > 1)
|
||||
{
|
||||
player->kartstuff[k_respawn]--;
|
||||
player->mo->momz = 0;
|
||||
|
@ -1274,26 +1274,39 @@ void K_RespawnChecker(player_t *player)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (player->kartstuff[k_respawn] > 0 && player->kartstuff[k_respawn] <= 3)
|
||||
else if (player->kartstuff[k_respawn] == 1)
|
||||
{
|
||||
if (!P_IsObjectOnGround(player->mo))
|
||||
{
|
||||
player->powers[pw_flashing] = 2;
|
||||
// If you tried to boost while in the air,
|
||||
// you lose your chance of boosting at all.
|
||||
|
||||
// Sal: That's stupid and prone to accidental usage.
|
||||
// Let's rip off Mania instead, and turn this into a Drop Dash!
|
||||
|
||||
if (cmd->buttons & BT_ACCELERATE)
|
||||
{
|
||||
player->powers[pw_flashing] = 0;
|
||||
player->kartstuff[k_respawn] = 0;
|
||||
}
|
||||
player->kartstuff[k_dropdash]++;
|
||||
else
|
||||
player->kartstuff[k_dropdash] = 0;
|
||||
|
||||
if (player->kartstuff[k_dropdash] == TICRATE/4)
|
||||
S_StartSound(player->mo, sfx_ddash);
|
||||
|
||||
if ((player->kartstuff[k_dropdash] >= TICRATE/4)
|
||||
&& (player->kartstuff[k_dropdash] & 1))
|
||||
player->mo->colorized = true;
|
||||
else
|
||||
player->mo->colorized = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
player->kartstuff[k_respawn]--;
|
||||
// Quick! You only have three tics to boost!
|
||||
if (cmd->buttons & BT_ACCELERATE)
|
||||
K_DoSneaker(player, true);
|
||||
if ((cmd->buttons & BT_ACCELERATE) && (player->kartstuff[k_dropdash] >= TICRATE/4))
|
||||
{
|
||||
S_StartSound(player->mo, sfx_s23c);
|
||||
player->kartstuff[k_startboost] = 50;
|
||||
}
|
||||
player->mo->colorized = false;
|
||||
player->kartstuff[k_dropdash] = 0;
|
||||
player->kartstuff[k_respawn] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1478,23 +1491,6 @@ static void K_GetKartBoostPower(player_t *player)
|
|||
else if (player->kartstuff[k_bananadrag] > TICRATE)
|
||||
boostpower = 4*boostpower/5;
|
||||
|
||||
if (player->kartstuff[k_growshrinktimer] > 0) // Grow
|
||||
{
|
||||
speedboost = max(speedboost, FRACUNIT/5); // + 20%
|
||||
}
|
||||
|
||||
if (player->kartstuff[k_invincibilitytimer]) // Invincibility
|
||||
{
|
||||
speedboost = max(speedboost, 3*(FRACUNIT/8)); // + 37.5%
|
||||
accelboost = max(accelboost, 3*FRACUNIT); // + 600%
|
||||
}
|
||||
|
||||
if (player->kartstuff[k_driftboost]) // Drift Boost
|
||||
{
|
||||
speedboost = max(speedboost, FRACUNIT/4); // + 25%
|
||||
accelboost = max(accelboost, 4*FRACUNIT); // + 400%
|
||||
}
|
||||
|
||||
if (player->kartstuff[k_sneakertimer]) // Sneaker
|
||||
{
|
||||
switch (gamespeed)
|
||||
|
@ -1512,6 +1508,29 @@ static void K_GetKartBoostPower(player_t *player)
|
|||
accelboost = max(accelboost, 8*FRACUNIT); // + 800%
|
||||
}
|
||||
|
||||
if (player->kartstuff[k_invincibilitytimer]) // Invincibility
|
||||
{
|
||||
speedboost = max(speedboost, 3*FRACUNIT/8); // + 37.5%
|
||||
accelboost = max(accelboost, 3*FRACUNIT); // + 300%
|
||||
}
|
||||
|
||||
if (player->kartstuff[k_growshrinktimer] > 0) // Grow
|
||||
{
|
||||
speedboost = max(speedboost, FRACUNIT/5); // + 20%
|
||||
}
|
||||
|
||||
if (player->kartstuff[k_driftboost]) // Drift Boost
|
||||
{
|
||||
speedboost = max(speedboost, FRACUNIT/4); // + 25%
|
||||
accelboost = max(accelboost, 4*FRACUNIT); // + 400%
|
||||
}
|
||||
|
||||
if (player->kartstuff[k_startboost]) // Startup Boost
|
||||
{
|
||||
speedboost = max(speedboost, FRACUNIT/4); // + 25%
|
||||
accelboost = max(accelboost, 6*FRACUNIT); // + 300%
|
||||
}
|
||||
|
||||
// don't average them anymore, this would make a small boost and a high boost less useful
|
||||
// just take the highest we want instead
|
||||
|
||||
|
@ -2704,9 +2723,10 @@ void K_DoSneaker(player_t *player, boolean doPFlag)
|
|||
player->kartstuff[k_sneakertimer] = sneakertime;
|
||||
|
||||
if (doPFlag)
|
||||
{
|
||||
player->pflags |= PF_ATTACKDOWN;
|
||||
|
||||
K_PlayTauntSound(player->mo);
|
||||
K_PlayTauntSound(player->mo);
|
||||
}
|
||||
|
||||
K_GetKartBoostPower(player);
|
||||
if (player->kartstuff[k_speedboost] > prevboost)
|
||||
|
@ -3328,6 +3348,9 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
|||
if (player->kartstuff[k_driftboost])
|
||||
player->kartstuff[k_driftboost]--;
|
||||
|
||||
if (player->kartstuff[k_startboost])
|
||||
player->kartstuff[k_startboost]--;
|
||||
|
||||
if (player->kartstuff[k_invincibilitytimer])
|
||||
player->kartstuff[k_invincibilitytimer]--;
|
||||
|
||||
|
@ -4505,16 +4528,24 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
|||
// Get an instant boost!
|
||||
else if (player->kartstuff[k_boostcharge] <= 50)
|
||||
{
|
||||
player->kartstuff[k_sneakertimer] = -((21*(player->kartstuff[k_boostcharge]*player->kartstuff[k_boostcharge]))/425)+131; // max time is 70, min time is 7; yay parabooolas
|
||||
if (!player->kartstuff[k_floorboost] || player->kartstuff[k_floorboost] == 3)
|
||||
player->kartstuff[k_startboost] = (50-player->kartstuff[k_boostcharge])+20;
|
||||
|
||||
if (player->kartstuff[k_boostcharge] <= 36)
|
||||
{
|
||||
if (player->kartstuff[k_sneakertimer] >= 70)
|
||||
S_StartSound(player->mo, sfx_s25f); // Special sound for the perfect start boost!
|
||||
else if (player->kartstuff[k_sneakertimer] >= sneakertime)
|
||||
S_StartSound(player->mo, sfx_cdfm01); // Sneaker boost sound for big boost
|
||||
else
|
||||
S_StartSound(player->mo, sfx_s23c); // Drift boost sound for small boost
|
||||
player->kartstuff[k_startboost] = 0;
|
||||
K_DoSneaker(player, false);
|
||||
player->kartstuff[k_sneakertimer] = 70; // PERFECT BOOST!!
|
||||
|
||||
if (!player->kartstuff[k_floorboost] || player->kartstuff[k_floorboost] == 3) // Let everyone hear this one
|
||||
S_StartSound(player->mo, sfx_s25f);
|
||||
}
|
||||
else if ((!player->kartstuff[k_floorboost] || player->kartstuff[k_floorboost] == 3) && P_IsLocalPlayer(player))
|
||||
{
|
||||
if (player->kartstuff[k_boostcharge] <= 40)
|
||||
S_StartSound(player->mo, sfx_cdfm01); // You were almost there!
|
||||
else
|
||||
S_StartSound(player->mo, sfx_s23c); // Nope, better luck next time.
|
||||
}
|
||||
}
|
||||
// You overcharged your engine? Those things are expensive!!!
|
||||
else if (player->kartstuff[k_boostcharge] > 50)
|
||||
|
|
|
@ -9285,7 +9285,7 @@ void P_PlayerThink(player_t *player)
|
|||
#if 1
|
||||
// "Blur" a bit when you have speed shoes and are going fast enough
|
||||
if ((player->powers[pw_super] || player->powers[pw_sneakers]
|
||||
|| player->kartstuff[k_driftboost] || player->kartstuff[k_sneakertimer]) && !player->kartstuff[k_invincibilitytimer] // SRB2kart
|
||||
|| player->kartstuff[k_driftboost] || player->kartstuff[k_sneakertimer] || player->kartstuff[k_startboost]) && !player->kartstuff[k_invincibilitytimer] // SRB2kart
|
||||
&& (player->speed + abs(player->mo->momz)) > FixedMul(20*FRACUNIT,player->mo->scale))
|
||||
{
|
||||
mobj_t *gmobj = P_SpawnGhostMobj(player->mo);
|
||||
|
@ -9434,6 +9434,7 @@ void P_PlayerThink(player_t *player)
|
|||
if (!(player->pflags & PF_NIGHTSMODE
|
||||
|| player->kartstuff[k_hyudorotimer] // SRB2kart - fixes Hyudoro not flashing when it should.
|
||||
|| player->kartstuff[k_growshrinktimer] > 0 // Grow doesn't flash either.
|
||||
|| player->kartstuff[k_respawn] // Respawn timer (for drop dash effect)
|
||||
|| (G_BattleGametype() && player->kartstuff[k_bumper] <= 0 && player->kartstuff[k_comebacktimer])
|
||||
|| leveltime < starttime)) // Level intro
|
||||
{
|
||||
|
|
|
@ -811,6 +811,7 @@ sfxinfo_t S_sfx[NUMSFX] =
|
|||
{"noooo1", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"noooo2", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"hogbom", false, 110, 8, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"ddash", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"dbgsal", false, 110, 8, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
|
||||
// SRB2kart - Skin sounds
|
||||
|
|
|
@ -883,6 +883,7 @@ typedef enum
|
|||
sfx_noooo1,
|
||||
sfx_noooo2,
|
||||
sfx_hogbom,
|
||||
sfx_ddash,
|
||||
sfx_dbgsal,
|
||||
|
||||
sfx_kwin,
|
||||
|
|
Loading…
Reference in a new issue