From b89fccbf51a7f16654967ea06b5db5d54df6e622 Mon Sep 17 00:00:00 2001 From: MysterD Date: Sun, 4 Oct 2020 17:00:52 -0700 Subject: [PATCH] Prevented glitchy remote movement when moving through warp doors --- src/game/behaviors/sparkle_spawn_star.inc.c | 2 +- src/game/behaviors/spawn_star.inc.c | 2 +- src/game/mario_actions_cutscene.c | 10 ++++++---- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/game/behaviors/sparkle_spawn_star.inc.c b/src/game/behaviors/sparkle_spawn_star.inc.c index 300e50cf..2865a30c 100644 --- a/src/game/behaviors/sparkle_spawn_star.inc.c +++ b/src/game/behaviors/sparkle_spawn_star.inc.c @@ -84,7 +84,7 @@ void bhv_spawned_star_loop(void) { if (o->oTimer == 0) { if (nearest_mario_state_to_object(o) == &gMarioStates[0]) { cutscene_object(CUTSCENE_STAR_SPAWN, o); - gMarioStates[0].freeze = 200; + gMarioStates[0].freeze = 60; } //set_time_stop_flags(TIME_STOP_ENABLED | TIME_STOP_MARIO_AND_DOORS); //o->activeFlags |= ACTIVE_FLAG_INITIATED_TIME_STOP; diff --git a/src/game/behaviors/spawn_star.inc.c b/src/game/behaviors/spawn_star.inc.c index 3a11454b..ffffc59a 100644 --- a/src/game/behaviors/spawn_star.inc.c +++ b/src/game/behaviors/spawn_star.inc.c @@ -47,7 +47,7 @@ void bhv_star_spawn_init(void) { cutscene_object(CUTSCENE_STAR_SPAWN, o); else cutscene_object(CUTSCENE_RED_COIN_STAR_SPAWN, o); - gMarioStates[0].freeze = 200; + gMarioStates[0].freeze = 60; } //set_time_stop_flags(TIME_STOP_ENABLED | TIME_STOP_MARIO_AND_DOORS); diff --git a/src/game/mario_actions_cutscene.c b/src/game/mario_actions_cutscene.c index f95f9923..e70a643d 100644 --- a/src/game/mario_actions_cutscene.c +++ b/src/game/mario_actions_cutscene.c @@ -1072,10 +1072,12 @@ s32 act_warp_door_spawn(struct MarioState *m) { } } } else if (m->usedObj == NULL || (m->usedObj->oAction == 0 || m->usedObj->oAction == 100)) { - if (gShouldNotPlayCastleMusic == TRUE && gCurrLevelNum == LEVEL_CASTLE) { - set_mario_action(m, ACT_READING_AUTOMATIC_DIALOG, DIALOG_021); - } else { - set_mario_action(m, ACT_IDLE, 0); + if (m->playerIndex == 0) { + if (gShouldNotPlayCastleMusic == TRUE && gCurrLevelNum == LEVEL_CASTLE) { + set_mario_action(m, ACT_READING_AUTOMATIC_DIALOG, DIALOG_021); + } else { + set_mario_action(m, ACT_IDLE, 0); + } } } set_mario_animation(m, MARIO_ANIM_FIRST_PERSON);