Minimum impact amount for splashes

This commit is contained in:
Sally Coolatta 2022-01-03 00:17:59 -05:00
parent 9e56e54e31
commit 2033e84bce

View file

@ -578,6 +578,7 @@ static void K_SpawnSplashParticles(mobj_t *mo, t_splash_t *s, fixed_t impact)
--------------------------------------------------*/
void K_SpawnSplashForMobj(mobj_t *mo, fixed_t impact)
{
const fixed_t minImpact = 4 * mo->scale;
t_splash_t *s = NULL;
if (mo == NULL || P_MobjWasRemoved(mo) == true)
@ -602,6 +603,11 @@ void K_SpawnSplashForMobj(mobj_t *mo, fixed_t impact)
return;
}
if (impact < minImpact)
{
impact = minImpact;
}
// Idea for later: if different spawning styles are desired,
// we can put a switch case here!
K_SpawnSplashParticles(mo, s, impact);