Merge branch 'lavafall-crash-avoidance' into 'next'

Fix Lavafalls crashing the game when scaled down.

See merge request STJr/SRB2!2544
This commit is contained in:
Lactozilla 2024-11-24 16:57:19 +00:00
commit c4dbf42ded

View file

@ -14395,7 +14395,7 @@ void A_LavafallLava(mobj_t *actor)
if (LUA_CallAction(A_LAVAFALLLAVA, actor))
return;
if ((40 - actor->fuse) % (2*(actor->scale >> FRACBITS)))
if ((40 - actor->fuse) % max(2*(actor->scale >> FRACBITS), 1)) // avoid crashes if actor->scale < FRACUNIT
return;
// Don't spawn lava unless a player is nearby.