From 2033e84bce292a671d442df28e9dad308d6d5c62 Mon Sep 17 00:00:00 2001 From: Sally Coolatta Date: Mon, 3 Jan 2022 00:17:59 -0500 Subject: [PATCH] Minimum impact amount for splashes --- src/k_terrain.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/k_terrain.c b/src/k_terrain.c index 68a78af69..bae39d216 100644 --- a/src/k_terrain.c +++ b/src/k_terrain.c @@ -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);