mirror of
https://github.com/libsm64/libsm64.git
synced 2025-01-22 15:43:11 -05:00
fix snoring sfx not stopping on wake up
also stops the snoring sound when mario is deleted
This commit is contained in:
parent
f4b6232496
commit
e9a3114084
2 changed files with 10 additions and 8 deletions
|
@ -331,14 +331,14 @@ s32 act_sleeping(struct MarioState *m) {
|
|||
}
|
||||
|
||||
s32 act_waking_up(struct MarioState *m) {
|
||||
// if (!m->actionTimer) {
|
||||
// func_803205E8(SOUND_MARIO_SNORING1, m->marioObj->header.gfx.cameraToObject);
|
||||
// func_803205E8(SOUND_MARIO_SNORING2, m->marioObj->header.gfx.cameraToObject);
|
||||
//#ifndef VERSION_JP
|
||||
// func_803205E8(SOUND_MARIO_SNORING3, m->marioObj->header.gfx.cameraToObject);
|
||||
//#endif
|
||||
// raise_background_noise(2);
|
||||
// }
|
||||
if (!m->actionTimer) {
|
||||
stop_sound(SOUND_MARIO_SNORING1, m->marioObj->header.gfx.cameraToObject);
|
||||
stop_sound(SOUND_MARIO_SNORING2, m->marioObj->header.gfx.cameraToObject);
|
||||
#ifndef VERSION_JP
|
||||
stop_sound(SOUND_MARIO_SNORING3, m->marioObj->header.gfx.cameraToObject);
|
||||
#endif
|
||||
raise_background_noise(2);
|
||||
}
|
||||
|
||||
if (m->input & INPUT_UNKNOWN_10) {
|
||||
return set_mario_action(m, ACT_SHOCKWAVE_BOUNCE, 0);
|
||||
|
|
|
@ -265,6 +265,8 @@ SM64_LIB_FN void sm64_mario_delete( int32_t marioId )
|
|||
struct GlobalState *globalState = ((struct MarioInstance *)s_mario_instance_pool.objects[ marioId ])->globalState;
|
||||
global_state_bind( globalState );
|
||||
|
||||
stop_sound(SOUND_MARIO_SNORING3, gMarioState->marioObj->header.gfx.cameraToObject);
|
||||
|
||||
free( gMarioObject );
|
||||
free_area( gCurrentArea );
|
||||
|
||||
|
|
Loading…
Reference in a new issue