mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-22 10:52:23 +00:00
Prevent infinite lives rollover to extremely negative numbers. (Discovered while messing around with pandora's box recently.)
This commit is contained in:
parent
96aa11c825
commit
d2c6d6ad73
1 changed files with 2 additions and 0 deletions
|
@ -1240,6 +1240,8 @@ void P_GivePlayerLives(player_t *player, INT32 numlives)
|
|||
numlives = (numlives + prevlives - player->lives);
|
||||
}
|
||||
}
|
||||
else if (player->lives == INFLIVES)
|
||||
return;
|
||||
|
||||
player->lives += numlives;
|
||||
|
||||
|
|
Loading…
Reference in a new issue