mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-27 04:41:23 +00:00
denom of A_CheckRandom can't be zero, that would be bad
This commit is contained in:
parent
caf081b6f5
commit
9cec9093bb
1 changed files with 3 additions and 0 deletions
|
@ -8528,6 +8528,9 @@ void A_CheckRandom(mobj_t *actor)
|
||||||
if (LUA_CallAction("A_CheckRandom", actor))
|
if (LUA_CallAction("A_CheckRandom", actor))
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
|
if ((locvar1 & 0xFFFF) == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
// The PRNG doesn't suck anymore, OK?
|
// The PRNG doesn't suck anymore, OK?
|
||||||
if (locvar1 >> 16)
|
if (locvar1 >> 16)
|
||||||
chance *= (locvar1 >> 16);
|
chance *= (locvar1 >> 16);
|
||||||
|
|
Loading…
Reference in a new issue