Fixed softlocks when one player runs out of lives, or death by lava
Also bubbles player when falling into quicksand Fixes #36
This commit is contained in:
parent
daa05d98a0
commit
388470d579
|
@ -718,7 +718,6 @@ void initiate_painting_warp(void) {
|
||||||
s16 level_trigger_warp(struct MarioState *m, s32 warpOp) {
|
s16 level_trigger_warp(struct MarioState *m, s32 warpOp) {
|
||||||
// only allow for local player
|
// only allow for local player
|
||||||
if (m != &gMarioStates[0]) { return 0; }
|
if (m != &gMarioStates[0]) { return 0; }
|
||||||
if (!is_player_active(m)) { return 0; }
|
|
||||||
|
|
||||||
s32 val04 = TRUE;
|
s32 val04 = TRUE;
|
||||||
|
|
||||||
|
|
|
@ -1563,7 +1563,7 @@ s32 act_lava_boost(struct MarioState *m) {
|
||||||
m->health = 0x100;
|
m->health = 0x100;
|
||||||
} else {
|
} else {
|
||||||
m->health = 0xFF;
|
m->health = 0xFF;
|
||||||
return drop_and_set_mario_action(m, ACT_DEATH_ON_BACK, 0);
|
mario_set_bubbled(m);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -875,7 +875,7 @@ s32 act_bubbled(struct MarioState* m) {
|
||||||
if (m->playerIndex == 0) {
|
if (m->playerIndex == 0) {
|
||||||
u8 allInBubble = TRUE;
|
u8 allInBubble = TRUE;
|
||||||
for (int i = 0; i < MAX_PLAYERS; i++) {
|
for (int i = 0; i < MAX_PLAYERS; i++) {
|
||||||
if (gMarioStates[i].action != ACT_BUBBLED) {
|
if (gMarioStates[i].action != ACT_BUBBLED && gMarioStates[i].health >= 0x100) {
|
||||||
allInBubble = FALSE;
|
allInBubble = FALSE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -791,7 +791,8 @@ s32 act_quicksand_death(struct MarioState *m) {
|
||||||
play_sound_if_no_flag(m, SOUND_MARIO_WAAAOOOW, MARIO_ACTION_SOUND_PLAYED);
|
play_sound_if_no_flag(m, SOUND_MARIO_WAAAOOOW, MARIO_ACTION_SOUND_PLAYED);
|
||||||
}
|
}
|
||||||
if ((m->quicksandDepth += 5.0f) >= 180.0f) {
|
if ((m->quicksandDepth += 5.0f) >= 180.0f) {
|
||||||
level_trigger_warp(m, WARP_OP_DEATH);
|
//level_trigger_warp(m, WARP_OP_DEATH);
|
||||||
|
mario_set_bubbled(m);
|
||||||
m->actionState = 2;
|
m->actionState = 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
|
||||||
static u8 warpToLevel = LEVEL_BITDW;
|
static u8 warpToLevel = LEVEL_LLL;
|
||||||
|
|
||||||
#define SCANCODE_0 0x0B
|
#define SCANCODE_0 0x0B
|
||||||
#define SCANCODE_3 0x04
|
#define SCANCODE_3 0x04
|
||||||
|
|
Loading…
Reference in New Issue