mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2025-01-06 23:51:17 +00:00
Shell music only starts and stops for local player
This commit is contained in:
parent
933ee68477
commit
b9e84ad3b9
2 changed files with 7 additions and 7 deletions
|
@ -280,7 +280,7 @@ u32 attack_object(struct Object *o, s32 interaction) {
|
|||
void mario_stop_riding_object(struct MarioState *m) {
|
||||
if (m->riddenObj != NULL) {
|
||||
m->riddenObj->oInteractStatus = INT_STATUS_STOP_RIDING;
|
||||
stop_shell_music();
|
||||
if (m->playerIndex == 0) { stop_shell_music(); }
|
||||
m->riddenObj = NULL;
|
||||
}
|
||||
}
|
||||
|
@ -297,7 +297,7 @@ void mario_grab_used_object(struct MarioState *m) {
|
|||
void mario_drop_held_object(struct MarioState *m) {
|
||||
if (m->heldObj != NULL) {
|
||||
if (m->heldObj->behavior == segmented_to_virtual(bhvKoopaShellUnderwater)) {
|
||||
stop_shell_music();
|
||||
if (m->playerIndex == 0) { stop_shell_music(); }
|
||||
}
|
||||
|
||||
obj_set_held_state(m->heldObj, bhvCarrySomething4);
|
||||
|
@ -318,7 +318,7 @@ void mario_drop_held_object(struct MarioState *m) {
|
|||
void mario_throw_held_object(struct MarioState *m) {
|
||||
if (m->heldObj != NULL) {
|
||||
if (m->heldObj->behavior == segmented_to_virtual(bhvKoopaShellUnderwater)) {
|
||||
stop_shell_music();
|
||||
if (m->playerIndex == 0) { stop_shell_music(); }
|
||||
}
|
||||
|
||||
obj_set_held_state(m->heldObj, bhvCarrySomething5);
|
||||
|
@ -1485,7 +1485,7 @@ u32 interact_koopa_shell(struct MarioState *m, UNUSED u32 interactType, struct O
|
|||
|
||||
attack_object(o, interaction);
|
||||
update_mario_sound_and_camera(m);
|
||||
play_shell_music();
|
||||
if (m->playerIndex == 0) { play_shell_music(); }
|
||||
mario_drop_held_object(m);
|
||||
|
||||
//! Puts Mario in ground action even when in air, making it easy to
|
||||
|
|
|
@ -754,7 +754,7 @@ static s32 act_water_shell_swimming(struct MarioState *m) {
|
|||
m->heldObj->oInteractStatus = INT_STATUS_STOP_RIDING;
|
||||
m->heldObj = NULL;
|
||||
}
|
||||
stop_shell_music();
|
||||
if (m->playerIndex == 0) { stop_shell_music(); }
|
||||
set_mario_action(m, ACT_FLUTTER_KICK, 0);
|
||||
}
|
||||
|
||||
|
@ -849,7 +849,7 @@ static s32 act_water_punch(struct MarioState *m) {
|
|||
set_mario_animation(m, MARIO_ANIM_WATER_PICK_UP_OBJ);
|
||||
if (is_anim_at_end(m)) {
|
||||
if (m->heldObj != NULL && m->heldObj->behavior == segmented_to_virtual(bhvKoopaShellUnderwater)) {
|
||||
play_shell_music();
|
||||
if (m->playerIndex == 0) { play_shell_music(); }
|
||||
set_mario_action(m, ACT_WATER_SHELL_SWIMMING, 0);
|
||||
} else {
|
||||
set_mario_action(m, ACT_HOLD_WATER_ACTION_END, 1);
|
||||
|
@ -1503,7 +1503,7 @@ static s32 check_common_submerged_cancels(struct MarioState *m) {
|
|||
if (m->action == ACT_WATER_SHELL_SWIMMING && m->heldObj != NULL) {
|
||||
m->heldObj->oInteractStatus = INT_STATUS_STOP_RIDING;
|
||||
m->heldObj = NULL;
|
||||
stop_shell_music();
|
||||
if (m->playerIndex == 0) { stop_shell_music(); }
|
||||
}
|
||||
|
||||
return transition_submerged_to_walking(m);
|
||||
|
|
Loading…
Reference in a new issue