diff --git a/src/objects/broly.hpp b/src/objects/broly.hpp index d75a7fc4b..64f7f58da 100644 --- a/src/objects/broly.hpp +++ b/src/objects/broly.hpp @@ -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(); } diff --git a/src/objects/spb.c b/src/objects/spb.c index 89ac8f174..2c0d51fa9 100644 --- a/src/objects/spb.c +++ b/src/objects/spb.c @@ -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);