From 3762c68fefc7dac37dd34e2d2595ecaf2a9f4e84 Mon Sep 17 00:00:00 2001 From: MysterD Date: Thu, 24 Sep 2020 18:32:18 -0700 Subject: [PATCH] Prevented lava from taking extra lives from bubbled players --- src/game/interaction.c | 1 + src/game/mario_actions_airborne.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/game/interaction.c b/src/game/interaction.c index c3710c92..d94a829e 100644 --- a/src/game/interaction.c +++ b/src/game/interaction.c @@ -2041,6 +2041,7 @@ void check_death_barrier(struct MarioState *m) { } void check_lava_boost(struct MarioState *m) { + if (m->action == ACT_BUBBLED) { return; } if (!(m->action & ACT_FLAG_RIDING_SHELL) && m->pos[1] < m->floorHeight + 10.0f) { if (!(m->flags & MARIO_METAL_CAP)) { m->hurtCounter += (m->flags & MARIO_CAP_ON_HEAD) ? 12 : 18; diff --git a/src/game/mario_actions_airborne.c b/src/game/mario_actions_airborne.c index 021231e1..c205b12b 100644 --- a/src/game/mario_actions_airborne.c +++ b/src/game/mario_actions_airborne.c @@ -372,6 +372,10 @@ u32 common_air_action_step(struct MarioState *m, u32 landAction, s32 animation, update_air_without_turn(m); stepResult = perform_air_step(m, stepArg); + if (m->action == ACT_BUBBLED && stepResult == AIR_STEP_HIT_LAVA_WALL) { + stepResult = AIR_STEP_HIT_WALL; + } + switch (stepResult) { case AIR_STEP_NONE: set_mario_animation(m, animation);