Merge branch 'spb-sliptide-disabled-during-switch' into 'master'

SPB Sliptide disabled during "Hot Potato" (Resolves #1596)

Closes #1596

See merge request kart-krew-dev/ring-racers-internal!2720
This commit is contained in:
Oni VelocitOni 2025-08-04 05:32:26 +00:00
commit 5aa6af4f97

View file

@ -231,7 +231,7 @@ static void SpawnSPBSliptide(mobj_t *spb, SINT8 dir)
K_MatchGenericExtraFlags(spark, spb); K_MatchGenericExtraFlags(spark, spb);
} }
} }
// Used for seeking and when SPB is trailing its target from way too close! // Used for seeking and when SPB is trailing its target from way too close!
static void SpawnSPBSpeedLines(mobj_t *spb) static void SpawnSPBSpeedLines(mobj_t *spb)
@ -392,6 +392,7 @@ static void SPBSeek(mobj_t *spb, mobj_t *bestMobj)
// Go past our target and explode instead. // Go past our target and explode instead.
if (spb->fuse == 0) if (spb->fuse == 0)
{ {
spb_intangible(spb) = SPB_FLASHING;
spb->fuse = 2*TICRATE; spb->fuse = 2*TICRATE;
} }
} }
@ -626,6 +627,13 @@ static void SPBSeek(mobj_t *spb, mobj_t *bestMobj)
} }
} }
//CONS_Printf("%d: leveltime %d: SPB intangibility %d: SPBModeTimer\n", leveltime, spb_intangible(spb), spb_modetimer(spb));
// Tired of this thing whacking people when switching targets.
// I'm pretty sure checking mode timer doesn't work but, idk insurance!!
if (spb_intangible(spb) <= 0 || (spb_modetimer(spb) > 0))
{
if (sliptide != 0) if (sliptide != 0)
{ {
// 1 if turning left, -1 if turning right. // 1 if turning left, -1 if turning right.
@ -637,6 +645,7 @@ static void SPBSeek(mobj_t *spb, mobj_t *bestMobj)
// if we're mostly going straight, then spawn the V dust cone! // if we're mostly going straight, then spawn the V dust cone!
SpawnSPBDust(spb); SpawnSPBDust(spb);
} }
}
// Always spawn speed lines while seeking // Always spawn speed lines while seeking
SpawnSPBSpeedLines(spb); SpawnSPBSpeedLines(spb);
@ -1038,6 +1047,7 @@ void Obj_SPBThink(mobj_t *spb)
spb->color = SKINCOLOR_NONE; spb->color = SKINCOLOR_NONE;
spb->colorized = false; spb->colorized = false;
} }
spb_intangible(spb) = SPB_FLASHING; // This is supposed to make it intangible when it's about to quit
} }
// Clamp within level boundaries. // Clamp within level boundaries.