Merge branch 'fix-broly-underflow' into 'master'

Fix bugged SPB after player hits Fuel Canister (Lost Colony)

Closes #1083

See merge request KartKrew/Kart!2045
This commit is contained in:
AJ Martinez 2024-03-09 06:03:30 +00:00
commit 90753596e0
2 changed files with 2 additions and 2 deletions

View file

@ -44,7 +44,7 @@ struct Broly : Mobj
bool valid() const { return duration(); }
tic_t remaining() const { return tics - kBufferTics; }
tic_t remaining() const { return tics > kBufferTics ? tics - kBufferTics : 0u; }
Fixed linear() const { return (remaining() * FRACUNIT) / duration(); }

View file

@ -679,7 +679,7 @@ static void SPBChase(mobj_t *spb, mobj_t *bestMobj)
return;
}
if (chase->hitlag)
if (chase->hitlag > 0)
{
// If the player is frozen, the SPB should be too.
spb->hitlag = max(spb->hitlag, chase->hitlag);