From c58628d1bdb43b2f8a11b8b2b6d33b2537bcfe00 Mon Sep 17 00:00:00 2001 From: James R Date: Thu, 5 Jan 2023 19:19:39 -0800 Subject: [PATCH] Remove non TERRAIN offroad particles Fixes spectators generating offroad particles when touching the ground. --- src/k_terrain.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/src/k_terrain.c b/src/k_terrain.c index a702f53ad..5c161a14a 100644 --- a/src/k_terrain.c +++ b/src/k_terrain.c @@ -966,26 +966,13 @@ void K_HandleFootstepParticles(mobj_t *mo) return; } - if (!(mo->flags & MF_APPLYTERRAIN)) + if (!(mo->flags & MF_APPLYTERRAIN) || mo->terrain == NULL) { // No TERRAIN effects for this object. return; } - if (mo->terrain == NULL || mo->terrain->footstepID == SIZE_MAX) - { - // 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); - } + fs = K_GetFootstepByIndex(mo->terrain->footstepID); if (fs == NULL || fs->mobjType == MT_NULL || fs->frequency <= 0) {