mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-23 20:45:11 +00:00
Prevent drowning alert from playing for remote players
This commit is contained in:
parent
5f3895463f
commit
d3d13c26f8
1 changed files with 12 additions and 9 deletions
|
@ -1599,17 +1599,20 @@ void update_mario_health(struct MarioState *m) {
|
|||
}
|
||||
}
|
||||
|
||||
// Play a noise to alert the player when Mario is close to drowning.
|
||||
if (((m->action & ACT_GROUP_MASK) == ACT_GROUP_SUBMERGED) && (m->health < 0x300)) {
|
||||
play_sound(SOUND_MOVING_ALMOST_DROWNING, gDefaultSoundArgs);
|
||||
if (!gRumblePakTimer) {
|
||||
gRumblePakTimer = 36;
|
||||
if (is_rumble_finished_and_queue_empty()) {
|
||||
queue_rumble_data_mario(m, 3, 30);
|
||||
if (m->playerIndex == 0) {
|
||||
// Play a noise to alert the player when Mario is close to drowning.
|
||||
if (((m->action & ACT_GROUP_MASK) == ACT_GROUP_SUBMERGED) && (m->health < 0x300)) {
|
||||
play_sound(SOUND_MOVING_ALMOST_DROWNING, gDefaultSoundArgs);
|
||||
if (!gRumblePakTimer) {
|
||||
gRumblePakTimer = 36;
|
||||
if (is_rumble_finished_and_queue_empty()) {
|
||||
queue_rumble_data_mario(m, 3, 30);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
gRumblePakTimer = 0;
|
||||
else {
|
||||
gRumblePakTimer = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue