Fixed desync for late joiners when using Non-stop mode and made bubble when no lives remaining kick you out of the level (#40)

This commit is contained in:
Isaac 2022-03-24 13:48:06 +10:00 committed by GitHub
parent 456a59e8f7
commit d07a391f17
2 changed files with 3 additions and 0 deletions

View File

@ -944,6 +944,7 @@ u32 interact_star_or_key(struct MarioState *m, UNUSED u32 interactType, struct O
if (grandStar) {
return set_mario_action(m, ACT_JUMBO_STAR_CUTSCENE, 0);
}
save_file_do_save(gCurrSaveFileNum - 1, TRUE);
if (!noExit || gServerSettings.stayInLevelAfterStar != 2) {
return set_mario_action(m, starGrabAction, noExit + 2 * grandStar);

View File

@ -1016,6 +1016,8 @@ s32 act_bubbled(struct MarioState* m) {
if (m->playerIndex == 0) {
if (m->numLives == -1) {
m->marioObj->header.gfx.node.flags |= GRAPH_RENDER_INVISIBLE;
level_trigger_warp(m, WARP_OP_DEATH);
return set_mario_action(m, ACT_SOFT_BONK, 0);
} else {
m->marioObj->header.gfx.node.flags &= ~GRAPH_RENDER_INVISIBLE;
}