Prevent 'exit course' from doing the wrong warp sometimes

This commit is contained in:
MysterD 2022-01-28 00:03:39 -08:00
parent 35ac2165ad
commit f0ad3dd7d0

View file

@ -827,10 +827,7 @@ s16 level_trigger_warp(struct MarioState *m, s32 warpOp) {
break; break;
case WARP_OP_EXIT: case WARP_OP_EXIT:
sSourceWarpNodeId = WARP_NODE_WARP_FLOOR; sSourceWarpNodeId = WARP_NODE_DEATH;
if (area_get_warp_node(sSourceWarpNodeId) == NULL) {
sSourceWarpNodeId = WARP_NODE_DEATH;
}
sDelayedWarpTimer = 20; sDelayedWarpTimer = 20;
play_transition(WARP_TRANSITION_FADE_INTO_CIRCLE, 0x14, 0x00, 0x00, 0x00); play_transition(WARP_TRANSITION_FADE_INTO_CIRCLE, 0x14, 0x00, 0x00, 0x00);
break; break;