Broly: fix underflow on remaining timer

- Fix Fuel Canister setting player's hitlag to -1, causing
  SPB to stop thinking
This commit is contained in:
James R 2024-03-08 06:07:15 -08:00
parent 266e36928b
commit 061e3c282c

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(); }