mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-26 12:01:47 +00:00
Remove non TERRAIN offroad particles
Fixes spectators generating offroad particles when touching the ground.
This commit is contained in:
parent
16ac11d76e
commit
c58628d1bd
1 changed files with 2 additions and 15 deletions
|
|
@ -966,26 +966,13 @@ void K_HandleFootstepParticles(mobj_t *mo)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(mo->flags & MF_APPLYTERRAIN))
|
if (!(mo->flags & MF_APPLYTERRAIN) || mo->terrain == NULL)
|
||||||
{
|
{
|
||||||
// No TERRAIN effects for this object.
|
// No TERRAIN effects for this object.
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mo->terrain == NULL || mo->terrain->footstepID == SIZE_MAX)
|
fs = K_GetFootstepByIndex(mo->terrain->footstepID);
|
||||||
{
|
|
||||||
// If no terrain, check for offroad.
|
|
||||||
// If we're in offroad, use the default particle.
|
|
||||||
|
|
||||||
if (mo->player != NULL && mo->player->boostpower < FRACUNIT)
|
|
||||||
{
|
|
||||||
fs = K_GetFootstepByIndex(defaultOffroadFootstep);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
fs = K_GetFootstepByIndex(mo->terrain->footstepID);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (fs == NULL || fs->mobjType == MT_NULL || fs->frequency <= 0)
|
if (fs == NULL || fs->mobjType == MT_NULL || fs->frequency <= 0)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue