This commit is contained in:
AJ Martinez 2024-05-02 00:43:07 -07:00
parent 8615ed9db9
commit c05a9db159
2 changed files with 19 additions and 1 deletions

View file

@ -11814,6 +11814,18 @@ static void K_KartSpindash(player_t *player)
player->spindash = 0;
P_ResetPitchRoll(player->mo);
// 2.2 - alternate fastfall
if (!G_CompatLevel(0x000A))
{
if (K_PressingEBrake(player) && player->curshield != KSHIELD_BUBBLE && player->trickpanel == TRICKSTATE_NONE)
{
mobj_t *fuckingthing = P_SpawnGhostMobj(player->mo);
fuckingthing->extravalue1 = 69;
fuckingthing->renderflags &= ~RF_TRANSMASK;
fuckingthing->tics = 3;
}
}
return;
}
else if (player->fastfall != 0)
@ -11955,7 +11967,7 @@ boolean K_FastFallBounce(player_t *player)
// 2.2 - More lenient fastfall
if (!G_CompatLevel(0x000A))
{
if (player->curshield != KSHIELD_BUBBLE)
if (player->curshield != KSHIELD_BUBBLE && K_PressingEBrake(player))
{
// Nudge the player in their facing angle, and provide a little starting momentum if they need it.
// The bounce is already a strong tradeoff, so this allows it to be used for saves and get you back into flow.
@ -11963,6 +11975,10 @@ boolean K_FastFallBounce(player_t *player)
fixed_t minspeed = K_GetKartSpeed(player, false, false)/2;
fixed_t returnspeed = max(FixedHypot(player->mo->momx, player->mo->momy), minspeed);
S_StartSound(player->mo, sfx_gshac);
S_StartSound(player->mo, sfx_gshdc);
K_AddHitLag(player->mo, 4, false);
// Initial momentum set uses real speed to avoid some weird twitchy behavior at low XY speed
P_InstaThrust(player->mo, momangle, FixedHypot(player->mo->momx, player->mo->momy)/2);
P_Thrust(player->mo, player->mo->angle, returnspeed/2);

View file

@ -1089,6 +1089,8 @@ mobj_t *P_SpawnGhostMobj(mobj_t *mobj)
ghost->sprite2 = mobj->sprite2;
ghost->frame = mobj->frame;
ghost->tics = -1;
// Trying to control transparency on ghost mobjs? Turn around.
// Look for the MT_GHOST thinker in p_mobj.c.
ghost->renderflags = (mobj->renderflags & ~RF_TRANSMASK)|RF_TRANS50;
ghost->fuse = ghost->info->damage;
ghost->skin = mobj->skin;