mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Minimum impact amount for splashes
This commit is contained in:
parent
9e56e54e31
commit
2033e84bce
1 changed files with 6 additions and 0 deletions
|
|
@ -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)
|
void K_SpawnSplashForMobj(mobj_t *mo, fixed_t impact)
|
||||||
{
|
{
|
||||||
|
const fixed_t minImpact = 4 * mo->scale;
|
||||||
t_splash_t *s = NULL;
|
t_splash_t *s = NULL;
|
||||||
|
|
||||||
if (mo == NULL || P_MobjWasRemoved(mo) == true)
|
if (mo == NULL || P_MobjWasRemoved(mo) == true)
|
||||||
|
|
@ -602,6 +603,11 @@ void K_SpawnSplashForMobj(mobj_t *mo, fixed_t impact)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (impact < minImpact)
|
||||||
|
{
|
||||||
|
impact = minImpact;
|
||||||
|
}
|
||||||
|
|
||||||
// Idea for later: if different spawning styles are desired,
|
// Idea for later: if different spawning styles are desired,
|
||||||
// we can put a switch case here!
|
// we can put a switch case here!
|
||||||
K_SpawnSplashParticles(mo, s, impact);
|
K_SpawnSplashParticles(mo, s, impact);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue