From 68f09d34ea7bd54fb38fe9c765c9f6320a41cc3b Mon Sep 17 00:00:00 2001 From: Gregory Heskett Date: Mon, 3 Oct 2022 19:06:53 -0400 Subject: [PATCH] Bugfix: Reset mario's room when switching areas (#504) Mario's room sometimes is not reset when warping between different areas, generally when warping from one area with rooms to another without them. This can cause things like doors to not render properly. --- src/game/area.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/game/area.c b/src/game/area.c index c0a49ee5..cd1c9ef2 100644 --- a/src/game/area.c +++ b/src/game/area.c @@ -235,6 +235,8 @@ void load_area(s32 index) { main_pool_pop_state(); main_pool_push_state(); + gMarioCurrentRoom = 0; + if (gCurrentArea->terrainData != NULL) { load_area_terrain(index, gCurrentArea->terrainData, gCurrentArea->surfaceRooms, gCurrentArea->macroObjects);