Merge branch 'fix-doublejump-divby0' into 'next'

Fix a divby0 when you have specific character stats.

See merge request STJr/SRB2!1374
This commit is contained in:
James R 2021-01-31 01:17:41 -05:00
commit 5b287f9cce
1 changed files with 1 additions and 1 deletions

View File

@ -4499,7 +4499,7 @@ void P_DoJump(player_t *player, boolean soundandstate)
if (twodlevel || (player->mo->flags2 & MF2_TWOD))
factor += player->jumpfactor / 10;
if (player->charflags & SF_MULTIABILITY && player->charability == CA_DOUBLEJUMP)
if (player->charflags & SF_MULTIABILITY && player->charability == CA_DOUBLEJUMP && (player->actionspd >> FRACBITS) != -1)
factor -= max(0, player->secondjump * player->jumpfactor / ((player->actionspd >> FRACBITS) + 1)); // Reduce the jump height each time
//if (maptol & TOL_NIGHTS)