From ff9a2329fb4621b9d30b14cd81b43709fb0216bc Mon Sep 17 00:00:00 2001 From: Agent X <44549182+AgentXLP@users.noreply.github.com> Date: Fri, 27 Dec 2024 22:35:52 -0500 Subject: [PATCH] Improve a bug patch --- src/engine/level_script.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/engine/level_script.c b/src/engine/level_script.c index 1e094115a..ecdbe63ad 100644 --- a/src/engine/level_script.c +++ b/src/engine/level_script.c @@ -401,10 +401,13 @@ static void level_cmd_alloc_level_pool(void) { static void level_cmd_free_level_pool(void) { s32 i; - // these pointers would be invalid on the act selector menu - gMarioStates[0].wall = NULL; - gMarioStates[0].ceil = NULL; - gMarioStates[0].floor = NULL; + for (i = 0; i < MAX_PLAYERS; i++) { + // these pointers would be invalid on the act selector menu + gMarioStates[i].wall = NULL; + gMarioStates[i].ceil = NULL; + gMarioStates[i].floor = NULL; + } + if (!sFinishedLoadingPerm) { sFinishedLoadingPerm = true;