From c711f9f7c91fa9169f26ced2369ff3231a8c79df Mon Sep 17 00:00:00 2001 From: MysterD Date: Wed, 3 May 2023 01:38:08 -0700 Subject: [PATCH] Actually fix crash in init_mario_after_warp() --- src/game/level_update.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/game/level_update.c b/src/game/level_update.c index f8b0f447..c6de49c9 100644 --- a/src/game/level_update.c +++ b/src/game/level_update.c @@ -403,8 +403,8 @@ void set_mario_initial_action(struct MarioState *m, u32 spawnType, u32 actionArg void init_mario_after_warp(void) { struct ObjectWarpNode *spawnNode = area_get_warp_node(sWarpDest.nodeId); - if (spawnNode == NULL || spawnNode->object == NULL) { if (gCurrentArea) { spawnNode = &gCurrentArea->warpNodes[0xFA]; } } - if (spawnNode == NULL || spawnNode->object == NULL) { if (gCurrentArea) { spawnNode = &gCurrentArea->warpNodes[0x00]; } } + if (spawnNode == NULL || spawnNode->object == NULL) { spawnNode = area_get_warp_node(0xFA); } + if (spawnNode == NULL || spawnNode->object == NULL) { spawnNode = area_get_warp_node(0x00); } if (spawnNode == NULL || spawnNode->object == NULL) { return; } u32 marioSpawnType = get_mario_spawn_type(spawnNode->object);