From d0e49ba67f678496ec355d1f1a73be985d5a961a Mon Sep 17 00:00:00 2001 From: Marioiscool246 Date: Fri, 20 May 2022 14:32:47 -0400 Subject: [PATCH] Particle sync fixes (#112) * Fix lingering particles when a player exits an area or disconnects --- src/game/object_list_processor.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/game/object_list_processor.c b/src/game/object_list_processor.c index 561b83b5..ca0919e6 100644 --- a/src/game/object_list_processor.c +++ b/src/game/object_list_processor.c @@ -16,6 +16,7 @@ #include "object_collision.h" #include "object_helpers.h" #include "object_list_processor.h" +#include "obj_behaviors.h" #include "platform_displacement.h" #include "profiler.h" #include "spawn_object.h" @@ -281,7 +282,7 @@ void bhv_mario_update(void) { vec3f_copy(gMarioState->marioBodyState->torsoPos, gMarioState->pos); } - if (stateIndex == 0) { + if ((stateIndex == 0) || (!is_player_active(gMarioState))) { gMarioState->particleFlags = 0; }