Translated Luigi sounds through new Character system

This commit is contained in:
MysterD 2020-10-16 23:33:41 -07:00
parent b522f89377
commit 1564ac7c0f
15 changed files with 283 additions and 234 deletions

View file

@ -4327,6 +4327,7 @@
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\include\behavior_table.h" />
<ClInclude Include="..\include\luigi_audio_defines.h" />
<ClInclude Include="..\src\game\characters.h" />
<ClInclude Include="..\src\game\chat.h" />
<ClInclude Include="..\src\game\rng_position.h" />
@ -4334,6 +4335,7 @@
<ClInclude Include="..\src\menu\custom_menu_system.h" />
<ClInclude Include="..\src\pc\controller\controller_keyboard_debug.h" />
<ClInclude Include="..\src\pc\debuglog.h" />
<ClInclude Include="..\src\pc\network\branch.h" />
<ClInclude Include="..\src\pc\network\discord\activity.h" />
<ClInclude Include="..\src\pc\network\discord\discord.h" />
<ClInclude Include="..\src\pc\network\discord\discord_game_sdk.h" />

View file

@ -16051,5 +16051,11 @@
<ClInclude Include="..\src\game\characters.h">
<Filter>Header Files\src\game</Filter>
</ClInclude>
<ClInclude Include="..\src\pc\network\branch.h">
<Filter>Header Files\src\pc\network</Filter>
</ClInclude>
<ClInclude Include="..\include\luigi_audio_defines.h">
<Filter>Header Files\include</Filter>
</ClInclude>
</ItemGroup>
</Project>

View file

@ -3,7 +3,7 @@
/* Mario Sound Effects */
// A random number 0-2 is added to the sound ID before playing, producing Yah/Wah/Hoo
#define SOUND_LUIGI_YAH_WAH_HOO SOUND_ARG_LOAD(0x0A, 4, 0x00, 0x80, 8)
#define SOUND_LUIGI_YAH_WAH_HOO SOUND_ARG_LOAD(0x0A, 4, 0x00, 0x80, 8)
#define SOUND_LUIGI_HOOHOO SOUND_ARG_LOAD(0x0A, 4, 0x03, 0x80, 8)
#define SOUND_LUIGI_YAHOO SOUND_ARG_LOAD(0x0A, 4, 0x04, 0x80, 8)
#define SOUND_LUIGI_UH SOUND_ARG_LOAD(0x0A, 4, 0x05, 0x80, 8)
@ -14,10 +14,10 @@
#define SOUND_LUIGI_ATTACKED SOUND_ARG_LOAD(0x0A, 4, 0x0A, 0xFF, 8)
#define SOUND_LUIGI_OOOF SOUND_ARG_LOAD(0x0A, 4, 0x0B, 0x80, 8)
#define SOUND_LUIGI_OOOF2 SOUND_ARG_LOAD(0x0A, 4, 0x0B, 0xD0, 8)
#define SOUND_LUIGI_HERE_WE_GO SOUND_ARG_LOAD(0x0A, 4, 0x0C, 0x80, 8)
#define SOUND_LUIGI_HERE_WE_GO SOUND_ARG_LOAD(0x0A, 4, 0x0C, 0x80, 8)
#define SOUND_LUIGI_YAWNING SOUND_ARG_LOAD(0x0A, 4, 0x0D, 0x80, 8)
#define SOUND_LUIGI_SNORING1 SOUND_ARG_LOAD(0x0A, 4, 0x0E, 0x80, 8)
#define SOUND_LUIGI_SNORING2 SOUND_ARG_LOAD(0x0A, 4, 0x0F, 0x80, 8)
#define SOUND_LUIGI_SNORING1 SOUND_ARG_LOAD(0x0A, 4, 0x0E, 0x80, 8)
#define SOUND_LUIGI_SNORING2 SOUND_ARG_LOAD(0x0A, 4, 0x0F, 0x80, 8)
#define SOUND_LUIGI_WAAAOOOW SOUND_ARG_LOAD(0x0A, 4, 0x10, 0xC0, 8)
#define SOUND_LUIGI_HAHA SOUND_ARG_LOAD(0x0A, 4, 0x11, 0x80, 8)
#define SOUND_LUIGI_HAHA_2 SOUND_ARG_LOAD(0x0A, 4, 0x11, 0xF0, 8)
@ -25,7 +25,7 @@
#define SOUND_LUIGI_UH2_2 SOUND_ARG_LOAD(0x0A, 4, 0x13, 0x80, 8)
#define SOUND_LUIGI_ON_FIRE SOUND_ARG_LOAD(0x0A, 4, 0x14, 0xA0, 8)
#define SOUND_LUIGI_DYING SOUND_ARG_LOAD(0x0A, 4, 0x15, 0xFF, 8)
#define SOUND_LUIGI_PANTING_COLD SOUND_ARG_LOAD(0x0A, 4, 0x16, 0x80, 8)
#define SOUND_LUIGI_PANTING_COLD SOUND_ARG_LOAD(0x0A, 4, 0x16, 0x80, 8)
// A random number 0-2 is added to the sound ID before playing
#define SOUND_LUIGI_PANTING SOUND_ARG_LOAD(0x0A, 4, 0x18, 0x80, 8)

View file

@ -1,7 +1,11 @@
#include "types.h"
#include "characters.h"
#include "hud.h"
#include "model_ids.h"
#include "object_constants.h"
#include "audio_defines.h"
#include "luigi_audio_defines.h"
#include "pc/configfile.h"
struct Character gCharacters[CT_MAX] = {
[CT_MARIO] = {
@ -11,7 +15,51 @@ struct Character gCharacters[CT_MAX] = {
.capModelId = MODEL_MARIOS_CAP,
.capKleptoAnimState = KLEPTO_ANIM_STATE_HOLDING_CAP,
.capUkikiAnimState = UKIKI_ANIM_STATE_HAT_ON,
// sounds
.soundYahWahHoo = SOUND_MARIO_YAH_WAH_HOO,
.soundHoohoo = SOUND_MARIO_HOOHOO,
.soundYahoo = SOUND_MARIO_YAHOO,
.soundUh = SOUND_MARIO_UH,
.soundHrmm = SOUND_MARIO_HRMM,
.soundWah2 = SOUND_MARIO_WAH2,
.soundWhoa = SOUND_MARIO_WHOA,
.soundEeuh = SOUND_MARIO_EEUH,
.soundAttacked = SOUND_MARIO_ATTACKED,
.soundOoof = SOUND_MARIO_OOOF,
.soundOoof2 = SOUND_MARIO_OOOF2,
.soundHereWeGo = SOUND_MARIO_HERE_WE_GO,
.soundYawning = SOUND_MARIO_YAWNING,
.soundSnoring1 = SOUND_MARIO_SNORING1,
.soundSnoring2 = SOUND_MARIO_SNORING2,
.soundWaaaooow = SOUND_MARIO_WAAAOOOW,
.soundHaha = SOUND_MARIO_HAHA,
.soundHaha_2 = SOUND_MARIO_HAHA_2,
.soundUh2 = SOUND_MARIO_UH2,
.soundUh2_2 = SOUND_MARIO_UH2_2,
.soundOnFire = SOUND_MARIO_ON_FIRE,
.soundDying = SOUND_MARIO_DYING,
.soundPantingCold = SOUND_MARIO_PANTING_COLD,
.soundPanting = SOUND_MARIO_PANTING,
.soundCoughing1 = SOUND_MARIO_COUGHING1,
.soundCoughing2 = SOUND_MARIO_COUGHING2,
.soundCoughing3 = SOUND_MARIO_COUGHING3,
.soundPunchYah = SOUND_MARIO_PUNCH_YAH,
.soundPunchHoo = SOUND_MARIO_PUNCH_HOO,
.soundMamaMia = SOUND_MARIO_MAMA_MIA,
.soundGroundPoundWah = SOUND_MARIO_GROUND_POUND_WAH,
.soundDrowning = SOUND_MARIO_DROWNING,
.soundPunchWah = SOUND_MARIO_PUNCH_WAH,
.soundYahooWahaYippee = SOUND_MARIO_YAHOO_WAHA_YIPPEE,
.soundDoh = SOUND_MARIO_DOH,
.soundGameOver = SOUND_MARIO_GAME_OVER,
.soundHello = SOUND_MARIO_HELLO,
.soundPressStartToPlay = SOUND_MARIO_PRESS_START_TO_PLAY,
.soundTwirlBounce = SOUND_MARIO_TWIRL_BOUNCE,
.soundSnoring3 = SOUND_MARIO_SNORING3,
.soundSoLongaBowser = SOUND_MARIO_SO_LONGA_BOWSER,
.soundImaTired = SOUND_MARIO_IMA_TIRED,
},
[CT_LUIGI] = {
.hudHead = '.',
.cameraHudHead = GLYPH_CAM_LUIGI_HEAD,
@ -19,5 +67,53 @@ struct Character gCharacters[CT_MAX] = {
.capModelId = MODEL_LUIGIS_CAP,
.capKleptoAnimState = KLEPTO_ANIM_STATE_HOLDING_CAP_LUIGI,
.capUkikiAnimState = UKIKI_ANIM_STATE_HAT_ON_LUIGI,
// sounds
.soundYahWahHoo = SOUND_LUIGI_YAH_WAH_HOO,
.soundHoohoo = SOUND_LUIGI_HOOHOO,
.soundYahoo = SOUND_LUIGI_YAHOO,
.soundUh = SOUND_LUIGI_UH,
.soundHrmm = SOUND_LUIGI_HRMM,
.soundWah2 = SOUND_LUIGI_WAH2,
.soundWhoa = SOUND_LUIGI_WHOA,
.soundEeuh = SOUND_LUIGI_EEUH,
.soundAttacked = SOUND_LUIGI_ATTACKED,
.soundOoof = SOUND_LUIGI_OOOF,
.soundOoof2 = SOUND_LUIGI_OOOF2,
.soundHereWeGo = SOUND_LUIGI_HERE_WE_GO,
.soundYawning = SOUND_LUIGI_YAWNING,
.soundSnoring1 = SOUND_LUIGI_SNORING1,
.soundSnoring2 = SOUND_LUIGI_SNORING2,
.soundWaaaooow = SOUND_LUIGI_WAAAOOOW,
.soundHaha = SOUND_LUIGI_HAHA,
.soundHaha_2 = SOUND_LUIGI_HAHA_2,
.soundUh2 = SOUND_LUIGI_UH2,
.soundUh2_2 = SOUND_LUIGI_UH2_2,
.soundOnFire = SOUND_LUIGI_ON_FIRE,
.soundDying = SOUND_LUIGI_DYING,
.soundPantingCold = SOUND_LUIGI_PANTING_COLD,
.soundPanting = SOUND_LUIGI_PANTING,
.soundCoughing1 = SOUND_LUIGI_COUGHING1,
.soundCoughing2 = SOUND_LUIGI_COUGHING2,
.soundCoughing3 = SOUND_LUIGI_COUGHING3,
.soundPunchYah = SOUND_LUIGI_PUNCH_YAH,
.soundPunchHoo = SOUND_LUIGI_PUNCH_HOO,
.soundMamaMia = SOUND_LUIGI_MAMA_MIA,
.soundGroundPoundWah = SOUND_LUIGI_GROUND_POUND_WAH,
.soundDrowning = SOUND_LUIGI_DROWNING,
.soundPunchWah = SOUND_LUIGI_PUNCH_WAH,
.soundYahooWahaYippee = SOUND_LUIGI_YAHOO_WAHA_YIPPEE,
.soundDoh = SOUND_LUIGI_DOH,
.soundGameOver = SOUND_LUIGI_GAME_OVER,
.soundHello = SOUND_LUIGI_HELLO,
.soundPressStartToPlay = SOUND_LUIGI_PRESS_START_TO_PLAY,
.soundTwirlBounce = SOUND_LUIGI_TWIRL_BOUNCE,
.soundSnoring3 = SOUND_LUIGI_SNORING3,
.soundSoLongaBowser = SOUND_LUIGI_SO_LONGA_BOWSER,
.soundImaTired = SOUND_LUIGI_IMA_TIRED,
},
};
};
struct Character* get_character_sound(struct MarioState* m) {
if (m == NULL || m->character == NULL) { return &gCharacters[CT_MARIO]; }
return configLuigiSounds ? m->character : &gCharacters[CT_MARIO];
}

View file

@ -18,8 +18,52 @@ struct Character {
u32 capModelId;
s32 capKleptoAnimState;
s32 capUkikiAnimState;
// sounds
s32 soundYahWahHoo;
s32 soundHoohoo;
s32 soundYahoo;
s32 soundUh;
s32 soundHrmm;
s32 soundWah2;
s32 soundWhoa;
s32 soundEeuh;
s32 soundAttacked;
s32 soundOoof;
s32 soundOoof2;
s32 soundHereWeGo;
s32 soundYawning;
s32 soundSnoring1;
s32 soundSnoring2;
s32 soundWaaaooow;
s32 soundHaha;
s32 soundHaha_2;
s32 soundUh2;
s32 soundUh2_2;
s32 soundOnFire;
s32 soundDying;
s32 soundPantingCold;
s32 soundPanting;
s32 soundCoughing1;
s32 soundCoughing2;
s32 soundCoughing3;
s32 soundPunchYah;
s32 soundPunchHoo;
s32 soundMamaMia;
s32 soundGroundPoundWah;
s32 soundDrowning;
s32 soundPunchWah;
s32 soundYahooWahaYippee;
s32 soundDoh;
s32 soundGameOver;
s32 soundHello;
s32 soundPressStartToPlay;
s32 soundTwirlBounce;
s32 soundSnoring3;
s32 soundSoLongaBowser;
s32 soundImaTired;
};
struct MarioState;
extern struct Character gCharacters[];
struct Character* get_character_sound(struct MarioState* m);
#endif // CHARACTERS_H

View file

@ -797,8 +797,7 @@ u32 take_damage_and_knock_back(struct MarioState *m, struct Object *o) {
}
if (o->oDamageOrCoinValue > 0) {
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound((configLuigiSounds && isLuigi) ? SOUND_LUIGI_ATTACKED : SOUND_MARIO_ATTACKED, m->marioObj->header.gfx.cameraToObject);
play_sound(get_character_sound(m)->soundAttacked, m->marioObj->header.gfx.cameraToObject);
}
update_mario_sound_and_camera(m);
@ -1384,8 +1383,7 @@ u32 interact_tornado(struct MarioState *m, UNUSED u32 interactType, struct Objec
marioObj->oMarioTornadoYawVel = 0x400;
marioObj->oMarioTornadoPosY = m->pos[1] - o->oPosY;
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound((configLuigiSounds && isLuigi) ? SOUND_LUIGI_WAAAOOOW : SOUND_MARIO_WAAAOOOW, m->marioObj->header.gfx.cameraToObject);
play_sound(get_character_sound(m)->soundWaaaooow, m->marioObj->header.gfx.cameraToObject);
queue_rumble_data_mario(m, 30, 60);
return set_mario_action(m, ACT_TORNADO_TWIRLING, m->action == ACT_TWIRLING);
@ -1407,8 +1405,7 @@ u32 interact_whirlpool(struct MarioState *m, UNUSED u32 interactType, struct Obj
marioObj->oMarioWhirlpoolPosY = m->pos[1] - o->oPosY;
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound((configLuigiSounds && isLuigi) ? SOUND_LUIGI_WAAAOOOW : SOUND_MARIO_WAAAOOOW, m->marioObj->header.gfx.cameraToObject);
play_sound(get_character_sound(m)->soundWaaaooow, m->marioObj->header.gfx.cameraToObject);
queue_rumble_data_mario(m, 30, 60);
return set_mario_action(m, ACT_CAUGHT_IN_WHIRLPOOL, 0);
@ -1431,8 +1428,7 @@ u32 interact_strong_wind(struct MarioState *m, UNUSED u32 interactType, struct O
m->forwardVel = -24.0f;
m->vel[1] = 12.0f;
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound((configLuigiSounds && isLuigi) ? SOUND_LUIGI_WAAAOOOW : SOUND_MARIO_WAAAOOOW, m->marioObj->header.gfx.cameraToObject);
play_sound(get_character_sound(m)->soundWaaaooow, m->marioObj->header.gfx.cameraToObject);
update_mario_sound_and_camera(m);
return set_mario_action(m, ACT_GETTING_BLOWN, 0);
}
@ -1456,8 +1452,7 @@ u32 interact_flame(struct MarioState *m, UNUSED u32 interactType, struct Object
} else {
m->marioObj->oMarioBurnTimer = 0;
update_mario_sound_and_camera(m);
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound((configLuigiSounds && isLuigi) ? SOUND_LUIGI_ON_FIRE : SOUND_MARIO_ON_FIRE, m->marioObj->header.gfx.cameraToObject);
play_sound(get_character_sound(m)->soundOnFire, m->marioObj->header.gfx.cameraToObject);
if ((m->action & ACT_FLAG_AIR) && m->vel[1] <= 0.0f) {
burningAction = ACT_BURNING_FALL;
@ -1480,8 +1475,7 @@ u32 interact_snufit_bullet(struct MarioState *m, UNUSED u32 interactType, struct
m->interactObj = o;
take_damage_from_interact_object(m);
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound((configLuigiSounds && isLuigi) ? SOUND_LUIGI_ATTACKED : SOUND_MARIO_ATTACKED, m->marioObj->header.gfx.cameraToObject);
play_sound(get_character_sound(m)->soundAttacked, m->marioObj->header.gfx.cameraToObject);
update_mario_sound_and_camera(m);
return drop_and_set_mario_action(m, determine_knockback_action(m, o->oDamageOrCoinValue),
@ -1542,8 +1536,7 @@ u32 interact_bully(struct MarioState *m, UNUSED u32 interactType, struct Object
m->invincTimer = 2;
update_mario_sound_and_camera(m);
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound((configLuigiSounds && isLuigi) ? SOUND_LUIGI_EEUH : SOUND_MARIO_EEUH, m->marioObj->header.gfx.cameraToObject);
play_sound(get_character_sound(m)->soundEeuh, m->marioObj->header.gfx.cameraToObject);
play_sound(SOUND_OBJ_BULLY_METAL, m->marioObj->header.gfx.cameraToObject);
push_mario_out_of_object(m, o, 5.0f);
@ -1565,8 +1558,7 @@ u32 interact_shock(struct MarioState *m, UNUSED u32 interactType, struct Object
m->interactObj = o;
take_damage_from_interact_object(m);
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound((configLuigiSounds && isLuigi) ? SOUND_LUIGI_ATTACKED : SOUND_MARIO_ATTACKED, m->marioObj->header.gfx.cameraToObject);
play_sound(get_character_sound(m)->soundAttacked, m->marioObj->header.gfx.cameraToObject);
queue_rumble_data_mario(m, 70, 60);
if (m->action & (ACT_FLAG_SWIMMING | ACT_FLAG_METAL_WATER)) {
@ -1626,8 +1618,7 @@ u32 interact_hit_from_below(struct MarioState *m, UNUSED u32 interactType, struc
bounce_off_object(m, o, 80.0f);
reset_mario_pitch(m);
#ifndef VERSION_JP
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound((configLuigiSounds && isLuigi) ? SOUND_LUIGI_TWIRL_BOUNCE : SOUND_MARIO_TWIRL_BOUNCE, m->marioObj->header.gfx.cameraToObject);
play_sound(get_character_sound(m)->soundTwirlBounce, m->marioObj->header.gfx.cameraToObject);
#endif
return drop_and_set_mario_action(m, ACT_TWIRLING, 0);
} else {
@ -1662,8 +1653,7 @@ u32 interact_bounce_top(struct MarioState *m, UNUSED u32 interactType, struct Ob
bounce_off_object(m, o, 80.0f);
reset_mario_pitch(m);
#ifndef VERSION_JP
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound((configLuigiSounds && isLuigi) ? SOUND_LUIGI_TWIRL_BOUNCE : SOUND_MARIO_TWIRL_BOUNCE, m->marioObj->header.gfx.cameraToObject);
play_sound(get_character_sound(m)->soundTwirlBounce, m->marioObj->header.gfx.cameraToObject);
#endif
return drop_and_set_mario_action(m, ACT_TWIRLING, 0);
} else {
@ -1781,8 +1771,7 @@ u32 check_object_grab_mario(struct MarioState *m, UNUSED u32 interactType, struc
m->usedObj = o;
update_mario_sound_and_camera(m);
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound((configLuigiSounds && isLuigi) ? SOUND_LUIGI_OOOF : SOUND_MARIO_OOOF, m->marioObj->header.gfx.cameraToObject);
play_sound(get_character_sound(m)->soundOoof, m->marioObj->header.gfx.cameraToObject);
queue_rumble_data_mario(m, 5, 80);
return set_mario_action(m, ACT_GRABBED, 0);
}
@ -1912,8 +1901,7 @@ u32 interact_cap(struct MarioState *m, UNUSED u32 interactType, struct Object *o
}
play_sound(SOUND_MENU_STAR_SOUND, m->marioObj->header.gfx.cameraToObject);
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound((configLuigiSounds && isLuigi) ? SOUND_LUIGI_HERE_WE_GO : SOUND_MARIO_HERE_WE_GO, m->marioObj->header.gfx.cameraToObject);
play_sound(get_character_sound(m)->soundHereWeGo, m->marioObj->header.gfx.cameraToObject);
if (capMusic != 0) {
play_cap_music(capMusic);
@ -2129,8 +2117,7 @@ void check_death_barrier(struct MarioState *m) {
return;
}
if (level_trigger_warp(m, WARP_OP_WARP_FLOOR) == 20 && !(m->flags & MARIO_UNKNOWN_18)) {
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound((configLuigiSounds && isLuigi) ? SOUND_LUIGI_WAAAOOOW : SOUND_MARIO_WAAAOOOW, m->marioObj->header.gfx.cameraToObject);
play_sound(get_character_sound(m)->soundWaaaooow, m->marioObj->header.gfx.cameraToObject);
}
}
}

View file

@ -264,14 +264,13 @@ void play_sound_if_no_flag(struct MarioState *m, u32 soundBits, u32 flags) {
*/
void play_mario_jump_sound(struct MarioState *m) {
if (!(m->flags & MARIO_MARIO_SOUND_PLAYED)) {
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
#ifndef VERSION_JP
if (m->action == ACT_TRIPLE_JUMP) {
play_sound(((configLuigiSounds && isLuigi) ? SOUND_LUIGI_YAHOO_WAHA_YIPPEE : SOUND_MARIO_YAHOO_WAHA_YIPPEE) + ((gAudioRandom % 5) << 16),
play_sound((get_character_sound(m)->soundYahooWahaYippee) + ((gAudioRandom % 5) << 16),
m->marioObj->header.gfx.cameraToObject);
} else {
#endif
play_sound(((configLuigiSounds && isLuigi) ? SOUND_LUIGI_YAH_WAH_HOO : SOUND_MARIO_YAH_WAH_HOO) + ((gAudioRandom % 3) << 16),
play_sound((get_character_sound(m)->soundYahWahHoo) + ((gAudioRandom % 3) << 16),
m->marioObj->header.gfx.cameraToObject);
#ifndef VERSION_JP
}
@ -1910,11 +1909,10 @@ s32 execute_mario_action(UNUSED struct Object *o) {
// HACK: mute snoring even when we skip the waking up action
if (gMarioState->isSnoring && gMarioState->action != ACT_SLEEPING) {
u8 isLuigi = (gNetworkType == NT_SERVER) ? (gMarioState->playerIndex != 0) : (gMarioState->playerIndex == 0);
func_803205E8((configLuigiSounds && isLuigi) ? SOUND_LUIGI_SNORING1 : SOUND_MARIO_SNORING1, gMarioState->marioObj->header.gfx.cameraToObject);
func_803205E8((configLuigiSounds && isLuigi) ? SOUND_LUIGI_SNORING2 : SOUND_MARIO_SNORING2, gMarioState->marioObj->header.gfx.cameraToObject);
func_803205E8(get_character_sound(gMarioState)->soundSnoring1, gMarioState->marioObj->header.gfx.cameraToObject);
func_803205E8(get_character_sound(gMarioState)->soundSnoring2, gMarioState->marioObj->header.gfx.cameraToObject);
#ifndef VERSION_JP
func_803205E8((configLuigiSounds && isLuigi) ? SOUND_LUIGI_SNORING3 : SOUND_MARIO_SNORING3, gMarioState->marioObj->header.gfx.cameraToObject);
func_803205E8(get_character_sound(gMarioState)->soundSnoring3, gMarioState->marioObj->header.gfx.cameraToObject);
#endif
gMarioState->isSnoring = FALSE;
}

View file

@ -34,8 +34,7 @@ void play_far_fall_sound(struct MarioState *m) {
if (!(action & ACT_FLAG_INVULNERABLE) && action != ACT_TWIRLING && action != ACT_FLYING
&& !(m->flags & MARIO_UNKNOWN_18)) {
if (m->peakHeight - m->pos[1] > 1150.0f) {
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound((configLuigiSounds && isLuigi) ? SOUND_LUIGI_WAAAOOOW : SOUND_MARIO_WAAAOOOW, m->marioObj->header.gfx.cameraToObject);
play_sound(get_character_sound(m)->soundWaaaooow, m->marioObj->header.gfx.cameraToObject);
m->flags |= MARIO_UNKNOWN_18;
}
}
@ -43,11 +42,10 @@ void play_far_fall_sound(struct MarioState *m) {
#ifndef VERSION_JP
void play_knockback_sound(struct MarioState *m) {
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
if (m->actionArg == 0 && (m->forwardVel <= -28.0f || m->forwardVel >= 28.0f)) {
play_sound_if_no_flag(m, (configLuigiSounds && isLuigi) ? SOUND_LUIGI_DOH : SOUND_MARIO_DOH, MARIO_MARIO_SOUND_PLAYED);
play_sound_if_no_flag(m, get_character_sound(m)->soundDoh, MARIO_MARIO_SOUND_PLAYED);
} else {
play_sound_if_no_flag(m, (configLuigiSounds && isLuigi) ? SOUND_LUIGI_UH : SOUND_MARIO_UH, MARIO_MARIO_SOUND_PLAYED);
play_sound_if_no_flag(m, get_character_sound(m)->soundUh, MARIO_MARIO_SOUND_PLAYED);
}
}
#endif
@ -63,8 +61,7 @@ s32 lava_boost_on_wall(struct MarioState *m) {
m->hurtCounter += (m->flags & MARIO_CAP_ON_HEAD) ? 12 : 18;
}
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound((configLuigiSounds && isLuigi) ? SOUND_LUIGI_ON_FIRE : SOUND_MARIO_ON_FIRE, m->marioObj->header.gfx.cameraToObject);
play_sound(get_character_sound(m)->soundOnFire, m->marioObj->header.gfx.cameraToObject);
update_mario_sound_and_camera(m);
return drop_and_set_mario_action(m, ACT_LAVA_BOOST, 1);
}
@ -93,8 +90,7 @@ s32 check_fall_damage(struct MarioState *m, u32 hardFallAction) {
m->hurtCounter += (m->flags & MARIO_CAP_ON_HEAD) ? 16 : 24;
queue_rumble_data_mario(m, 5, 80);
if (m->playerIndex == 0) { set_camera_shake_from_hit(SHAKE_FALL_DAMAGE); }
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound((configLuigiSounds && isLuigi) ? SOUND_LUIGI_ATTACKED : SOUND_MARIO_ATTACKED, m->marioObj->header.gfx.cameraToObject);
play_sound(get_character_sound(m)->soundAttacked, m->marioObj->header.gfx.cameraToObject);
return drop_and_set_mario_action(m, hardFallAction, 4);
} else if (fallHeight > damageHeight && !mario_floor_is_slippery(m)) {
m->hurtCounter += (m->flags & MARIO_CAP_ON_HEAD) ? 8 : 12;
@ -102,8 +98,7 @@ s32 check_fall_damage(struct MarioState *m, u32 hardFallAction) {
queue_rumble_data_mario(m, 5, 80);
if (m->playerIndex == 0) { set_camera_shake_from_hit(SHAKE_FALL_DAMAGE); }
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound((configLuigiSounds && isLuigi) ? SOUND_LUIGI_ATTACKED : SOUND_MARIO_ATTACKED, m->marioObj->header.gfx.cameraToObject);
play_sound(get_character_sound(m)->soundAttacked, m->marioObj->header.gfx.cameraToObject);
}
}
}
@ -136,11 +131,10 @@ s32 should_get_stuck_in_ground(struct MarioState *m) {
s32 check_fall_damage_or_get_stuck(struct MarioState *m, u32 hardFallAction) {
if (should_get_stuck_in_ground(m)) {
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
#ifdef VERSION_JP
play_sound((configLuigiSounds && isLuigi) ? SOUND_LUIGI_OOOF : SOUND_MARIO_OOOF, m->marioObj->header.gfx.cameraToObject);
play_sound(get_character_sound(m)->soundOoof, m->marioObj->header.gfx.cameraToObject);
#else
play_sound((configLuigiSounds && isLuigi) ? SOUND_LUIGI_OOOF2 : SOUND_MARIO_OOOF2, m->marioObj->header.gfx.cameraToObject);
play_sound(get_character_sound(m)->soundOoof2, m->marioObj->header.gfx.cameraToObject);
#endif
m->particleFlags |= PARTICLE_MIST_CIRCLE;
drop_and_set_mario_action(m, ACT_FEET_STUCK_IN_GROUND, 0);
@ -479,8 +473,7 @@ s32 act_double_jump(struct MarioState *m) {
return set_mario_action(m, ACT_GROUND_POUND, 0);
}
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_mario_sound(m, SOUND_ACTION_TERRAIN_JUMP, (configLuigiSounds && isLuigi) ? SOUND_LUIGI_HOOHOO : SOUND_MARIO_HOOHOO);
play_mario_sound(m, SOUND_ACTION_TERRAIN_JUMP, get_character_sound(m)->soundHoohoo);
common_air_action_step(m, ACT_DOUBLE_JUMP_LAND, animation,
AIR_STEP_CHECK_LEDGE_GRAB | AIR_STEP_CHECK_HANG);
return FALSE;
@ -502,8 +495,7 @@ s32 act_triple_jump(struct MarioState *m) {
#ifndef VERSION_JP
play_mario_sound(m, SOUND_ACTION_TERRAIN_JUMP, 0);
#else
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_mario_sound(m, SOUND_ACTION_TERRAIN_JUMP, (configLuigiSounds && isLuigi) ? SOUND_LUIGI_YAHOO : SOUND_MARIO_YAHOO);
play_mario_sound(m, SOUND_ACTION_TERRAIN_JUMP, get_character_sound(m)->soundYahoo);
#endif
common_air_action_step(m, ACT_TRIPLE_JUMP_LAND, MARIO_ANIM_TRIPLE_JUMP, 0);
@ -519,8 +511,7 @@ s32 act_backflip(struct MarioState *m) {
return set_mario_action(m, ACT_GROUND_POUND, 0);
}
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_mario_sound(m, SOUND_ACTION_TERRAIN_JUMP, (configLuigiSounds && isLuigi) ? SOUND_LUIGI_YAH_WAH_HOO : SOUND_MARIO_YAH_WAH_HOO);
play_mario_sound(m, SOUND_ACTION_TERRAIN_JUMP, get_character_sound(m)->soundYahWahHoo);
common_air_action_step(m, ACT_BACKFLIP_LAND, MARIO_ANIM_BACKFLIP, 0);
if (m->action == ACT_BACKFLIP_LAND) {
@ -645,11 +636,10 @@ s32 act_long_jump(struct MarioState *m) {
animation = MARIO_ANIM_SLOW_LONGJUMP;
}
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_mario_sound(m, SOUND_ACTION_TERRAIN_JUMP, (configLuigiSounds && isLuigi) ? SOUND_LUIGI_YAHOO : SOUND_MARIO_YAHOO);
play_mario_sound(m, SOUND_ACTION_TERRAIN_JUMP, get_character_sound(m)->soundYahoo);
if (m->floor->type == SURFACE_VERTICAL_WIND && m->actionState == 0) {
play_sound((configLuigiSounds && isLuigi) ? SOUND_LUIGI_HERE_WE_GO : SOUND_MARIO_HERE_WE_GO, m->marioObj->header.gfx.cameraToObject);
play_sound(get_character_sound(m)->soundHereWeGo, m->marioObj->header.gfx.cameraToObject);
m->actionState = 1;
}
@ -728,9 +718,8 @@ s32 act_twirling(struct MarioState *m) {
}
s32 act_dive(struct MarioState *m) {
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
if (m->actionArg == 0) {
play_mario_sound(m, SOUND_ACTION_THROW, (configLuigiSounds && isLuigi) ? SOUND_LUIGI_HOOHOO : SOUND_MARIO_HOOHOO);
play_mario_sound(m, SOUND_ACTION_THROW, get_character_sound(m)->soundHoohoo);
} else {
play_mario_sound(m, SOUND_ACTION_TERRAIN_JUMP, 0);
}
@ -763,9 +752,9 @@ s32 act_dive(struct MarioState *m) {
if (should_get_stuck_in_ground(m) && m->faceAngle[0] == -0x2AAA) {
queue_rumble_data_mario(m, 5, 80);
#ifdef VERSION_JP
play_sound((configLuigiSounds && isLuigi) ? SOUND_LUIGI_OOOF : SOUND_MARIO_OOOF, m->marioObj->header.gfx.cameraToObject);
play_sound(get_character_sound(m)->soundOoof, m->marioObj->header.gfx.cameraToObject);
#else
play_sound((configLuigiSounds && isLuigi) ? SOUND_LUIGI_OOOF2 : SOUND_MARIO_OOOF2, m->marioObj->header.gfx.cameraToObject);
play_sound(get_character_sound(m)->soundOoof2, m->marioObj->header.gfx.cameraToObject);
#endif
m->particleFlags |= PARTICLE_MIST_CIRCLE;
drop_and_set_mario_action(m, ACT_HEAD_STUCK_IN_GROUND, 0);
@ -804,8 +793,7 @@ s32 act_air_throw(struct MarioState *m) {
mario_throw_held_object(m);
}
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound_if_no_flag(m, (configLuigiSounds && isLuigi) ? SOUND_LUIGI_WAH2 : SOUND_MARIO_WAH2, MARIO_MARIO_SOUND_PLAYED);
play_sound_if_no_flag(m, get_character_sound(m)->soundWah2, MARIO_MARIO_SOUND_PLAYED);
set_mario_animation(m, MARIO_ANIM_THROW_LIGHT_OBJECT);
update_air_without_turn(m);
@ -949,8 +937,7 @@ s32 act_ground_pound(struct MarioState *m) {
m->actionTimer++;
if (m->actionTimer >= m->marioObj->header.gfx.unk38.curAnim->unk08 + 4) {
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound((configLuigiSounds && isLuigi) ? SOUND_LUIGI_GROUND_POUND_WAH : SOUND_MARIO_GROUND_POUND_WAH, m->marioObj->header.gfx.cameraToObject);
play_sound(get_character_sound(m)->soundGroundPoundWah, m->marioObj->header.gfx.cameraToObject);
m->actionState = 1;
}
} else {
@ -960,11 +947,10 @@ s32 act_ground_pound(struct MarioState *m) {
if (stepResult == AIR_STEP_LANDED) {
if (should_get_stuck_in_ground(m)) {
queue_rumble_data_mario(m, 5, 80);
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
#ifdef VERSION_JP
play_sound((configLuigiSounds && isLuigi) ? SOUND_LUIGI_OOOF : SOUND_MARIO_OOOF, m->marioObj->header.gfx.cameraToObject);
play_sound(get_character_sound(m)->soundOoof, m->marioObj->header.gfx.cameraToObject);
#else
play_sound((configLuigiSounds && isLuigi) ? SOUND_LUIGI_OOOF2 : SOUND_MARIO_OOOF2, m->marioObj->header.gfx.cameraToObject);
play_sound(get_character_sound(m)->soundOoof2, m->marioObj->header.gfx.cameraToObject);
#endif
m->particleFlags |= PARTICLE_MIST_CIRCLE;
set_mario_action(m, ACT_BUTT_STUCK_IN_GROUND, 0);
@ -1176,8 +1162,7 @@ s32 act_backward_air_kb(struct MarioState *m) {
#ifndef VERSION_JP
play_knockback_sound(m);
#else
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound_if_no_flag(m, (configLuigiSounds && isLuigi) ? SOUND_LUIGI_UH : SOUND_MARIO_UH, MARIO_MARIO_SOUND_PLAYED);
play_sound_if_no_flag(m, get_character_sound(m)->soundUh, MARIO_MARIO_SOUND_PLAYED);
#endif
common_air_knockback_step(m, ACT_BACKWARD_GROUND_KB, ACT_HARD_BACKWARD_GROUND_KB, 0x0002, -16.0f);
return FALSE;
@ -1191,8 +1176,7 @@ s32 act_forward_air_kb(struct MarioState *m) {
#ifndef VERSION_JP
play_knockback_sound(m);
#else
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound_if_no_flag(m, (configLuigiSounds && isLuigi) ? SOUND_LUIGI_UH : SOUND_MARIO_UH, MARIO_MARIO_SOUND_PLAYED);
play_sound_if_no_flag(m, get_character_sound(m)->soundUh, MARIO_MARIO_SOUND_PLAYED);
#endif
common_air_knockback_step(m, ACT_FORWARD_GROUND_KB, ACT_HARD_FORWARD_GROUND_KB, 0x002D, 16.0f);
return FALSE;
@ -1202,8 +1186,7 @@ s32 act_hard_backward_air_kb(struct MarioState *m) {
#ifndef VERSION_JP
play_knockback_sound(m);
#else
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound_if_no_flag(m, (configLuigiSounds && isLuigi) ? SOUND_LUIGI_UH : SOUND_MARIO_UH, MARIO_MARIO_SOUND_PLAYED);
play_sound_if_no_flag(m, get_character_sound(m)->soundUh, MARIO_MARIO_SOUND_PLAYED);
#endif
common_air_knockback_step(m, ACT_HARD_BACKWARD_GROUND_KB, ACT_HARD_BACKWARD_GROUND_KB, 0x0002,
-16.0f);
@ -1214,8 +1197,7 @@ s32 act_hard_forward_air_kb(struct MarioState *m) {
#ifndef VERSION_JP
play_knockback_sound(m);
#else
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound_if_no_flag(m, (configLuigiSounds && isLuigi) ? SOUND_LUIGI_UH : SOUND_MARIO_UH, MARIO_MARIO_SOUND_PLAYED);
play_sound_if_no_flag(m, get_character_sound(m)->soundUh, MARIO_MARIO_SOUND_PLAYED);
#endif
common_air_knockback_step(m, ACT_HARD_FORWARD_GROUND_KB, ACT_HARD_FORWARD_GROUND_KB, 0x002D, 16.0f);
return FALSE;
@ -1229,8 +1211,7 @@ s32 act_thrown_backward(struct MarioState *m) {
landAction = ACT_BACKWARD_GROUND_KB;
}
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound_if_no_flag(m, (configLuigiSounds && isLuigi) ? SOUND_LUIGI_WAAAOOOW : SOUND_MARIO_WAAAOOOW, MARIO_MARIO_SOUND_PLAYED);
play_sound_if_no_flag(m, get_character_sound(m)->soundWaaaooow, MARIO_MARIO_SOUND_PLAYED);
common_air_knockback_step(m, landAction, ACT_HARD_BACKWARD_GROUND_KB, 0x0002, m->forwardVel);
@ -1248,8 +1229,7 @@ s32 act_thrown_forward(struct MarioState *m) {
landAction = ACT_FORWARD_GROUND_KB;
}
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound_if_no_flag(m, (configLuigiSounds && isLuigi) ? SOUND_LUIGI_WAAAOOOW : SOUND_MARIO_WAAAOOOW, MARIO_MARIO_SOUND_PLAYED);
play_sound_if_no_flag(m, get_character_sound(m)->soundWaaaooow, MARIO_MARIO_SOUND_PLAYED);
if (common_air_knockback_step(m, landAction, ACT_HARD_FORWARD_GROUND_KB, 0x002D, m->forwardVel)
== AIR_STEP_NONE) {
@ -1273,8 +1253,7 @@ s32 act_soft_bonk(struct MarioState *m) {
#ifndef VERSION_JP
play_knockback_sound(m);
#else
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound_if_no_flag(m, (configLuigiSounds && isLuigi) ? SOUND_LUIGI_UH : SOUND_MARIO_UH, MARIO_MARIO_SOUND_PLAYED);
play_sound_if_no_flag(m, get_character_sound(m)->soundUh, MARIO_MARIO_SOUND_PLAYED);
#endif
common_air_knockback_step(m, ACT_FREEFALL_LAND, ACT_HARD_BACKWARD_GROUND_KB, 0x0056, m->forwardVel);
@ -1304,8 +1283,7 @@ s32 act_getting_blown(struct MarioState *m) {
mario_set_forward_vel(m, m->forwardVel);
#ifdef VERSION_JP
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound_if_no_flag(m, (configLuigiSounds && isLuigi) ? SOUND_LUIGI_UH : SOUND_MARIO_UH, MARIO_MARIO_SOUND_PLAYED);
play_sound_if_no_flag(m, get_character_sound(m)->soundUh, MARIO_MARIO_SOUND_PLAYED);
#endif
set_mario_animation(m, MARIO_ANIM_BACKWARD_AIR_KB);
@ -1533,12 +1511,11 @@ s32 act_hold_butt_slide_air(struct MarioState *m) {
}
s32 act_lava_boost(struct MarioState *m) {
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
if (!(m->flags & MARIO_MARIO_SOUND_PLAYED)) {
play_sound_if_no_flag(m, (configLuigiSounds && isLuigi) ? SOUND_LUIGI_ON_FIRE : SOUND_MARIO_ON_FIRE, MARIO_MARIO_SOUND_PLAYED);
play_sound_if_no_flag(m, get_character_sound(m)->soundOnFire, MARIO_MARIO_SOUND_PLAYED);
queue_rumble_data_mario(m, 5, 80);
}
play_sound_if_no_flag(m, (configLuigiSounds && isLuigi) ? SOUND_LUIGI_ON_FIRE : SOUND_MARIO_ON_FIRE, MARIO_MARIO_SOUND_PLAYED);
play_sound_if_no_flag(m, get_character_sound(m)->soundOnFire, MARIO_MARIO_SOUND_PLAYED);
if (!(m->input & INPUT_NONZERO_ANALOG)) {
m->forwardVel = approach_f32(m->forwardVel, 0.0f, 0.35f, 0.35f);
@ -1554,7 +1531,7 @@ s32 act_lava_boost(struct MarioState *m) {
m->hurtCounter += (m->flags & MARIO_CAP_ON_HEAD) ? 12 : 18;
}
m->vel[1] = 84.0f;
play_sound((configLuigiSounds && isLuigi) ? SOUND_LUIGI_ON_FIRE : SOUND_MARIO_ON_FIRE, m->marioObj->header.gfx.cameraToObject);
play_sound(get_character_sound(m)->soundOnFire, m->marioObj->header.gfx.cameraToObject);
queue_rumble_data_mario(m, 5, 80);
} else {
play_mario_heavy_landing_sound(m, SOUND_ACTION_TERRAIN_BODY_HIT_GROUND);
@ -1604,8 +1581,7 @@ s32 act_lava_boost(struct MarioState *m) {
s32 act_slide_kick(struct MarioState *m) {
if (m->actionTimer == 0) {
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_mario_sound(m, SOUND_ACTION_TERRAIN_JUMP, (configLuigiSounds && isLuigi) ? SOUND_LUIGI_HOOHOO : SOUND_MARIO_HOOHOO);
play_mario_sound(m, SOUND_ACTION_TERRAIN_JUMP, get_character_sound(m)->soundHoohoo);
set_mario_animation(m, MARIO_ANIM_SLIDE_KICK);
}
@ -1658,8 +1634,7 @@ s32 act_jump_kick(struct MarioState *m) {
s32 animFrame;
if (m->actionState == 0) {
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound_if_no_flag(m, (configLuigiSounds && isLuigi) ? SOUND_LUIGI_PUNCH_HOO : SOUND_MARIO_PUNCH_HOO, MARIO_ACTION_SOUND_PLAYED);
play_sound_if_no_flag(m, get_character_sound(m)->soundPunchHoo, MARIO_ACTION_SOUND_PLAYED);
m->marioObj->header.gfx.unk38.animID = -1;
set_mario_animation(m, MARIO_ANIM_AIR_KICK);
m->actionState = 1;
@ -1700,8 +1675,7 @@ s32 act_shot_from_cannon(struct MarioState *m) {
mario_set_forward_vel(m, m->forwardVel);
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound_if_no_flag(m, (configLuigiSounds && isLuigi) ? SOUND_LUIGI_YAHOO : SOUND_MARIO_YAHOO, MARIO_MARIO_SOUND_PLAYED);
play_sound_if_no_flag(m, get_character_sound(m)->soundYahoo, MARIO_MARIO_SOUND_PLAYED);
switch (perform_air_step(m, 0)) {
case AIR_STEP_NONE:
@ -1948,8 +1922,7 @@ s32 act_flying(struct MarioState *m) {
if (startPitch <= 0 && m->faceAngle[0] > 0 && m->forwardVel >= 48.0f) {
play_sound(SOUND_ACTION_FLYING_FAST, m->marioObj->header.gfx.cameraToObject);
#ifndef VERSION_JP
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound(((configLuigiSounds && isLuigi) ? SOUND_LUIGI_YAHOO_WAHA_YIPPEE : SOUND_MARIO_YAHOO_WAHA_YIPPEE) + ((gAudioRandom % 5) << 16),
play_sound((get_character_sound(m)->soundYahooWahaYippee) + ((gAudioRandom % 5) << 16),
m->marioObj->header.gfx.cameraToObject);
#endif
queue_rumble_data_mario(m, 50, 40);
@ -1973,8 +1946,7 @@ s32 act_riding_hoot(struct MarioState *m) {
m->usedObj->oInteractStatus = 0;
m->usedObj->oHootMarioReleaseTime = gGlobalTimer;
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound_if_no_flag(m, (configLuigiSounds && isLuigi) ? SOUND_LUIGI_UH : SOUND_MARIO_UH, MARIO_MARIO_SOUND_PLAYED);
play_sound_if_no_flag(m, get_character_sound(m)->soundUh, MARIO_MARIO_SOUND_PLAYED);
queue_rumble_data_mario(m, 4, 40);
return set_mario_action(m, ACT_FREEFALL, 0);
}
@ -2031,8 +2003,7 @@ s32 act_flying_triple_jump(struct MarioState *m) {
}
#endif
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_mario_sound(m, SOUND_ACTION_TERRAIN_JUMP, (configLuigiSounds && isLuigi) ? SOUND_LUIGI_YAHOO : SOUND_MARIO_YAHOO);
play_mario_sound(m, SOUND_ACTION_TERRAIN_JUMP, get_character_sound(m)->soundYahoo);
if (m->actionState == 0) {
set_mario_animation(m, MARIO_ANIM_TRIPLE_JUMP_FLY);
@ -2110,8 +2081,7 @@ s32 act_vertical_wind(struct MarioState *m) {
s16 intendedDYaw = m->intendedYaw - m->faceAngle[1];
f32 intendedMag = m->intendedMag / 32.0f;
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound_if_no_flag(m, (configLuigiSounds && isLuigi) ? SOUND_LUIGI_HERE_WE_GO : SOUND_MARIO_HERE_WE_GO, MARIO_MARIO_SOUND_PLAYED);
play_sound_if_no_flag(m, get_character_sound(m)->soundHereWeGo, MARIO_MARIO_SOUND_PLAYED);
if (m->actionState == 0) {
set_mario_animation(m, MARIO_ANIM_FORWARD_SPINNING_FLIP);
if (m->marioObj->header.gfx.unk38.animFrame == 1) {
@ -2152,8 +2122,7 @@ s32 act_special_triple_jump(struct MarioState *m) {
return set_mario_action(m, ACT_GROUND_POUND, 0);
}
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_mario_sound(m, SOUND_ACTION_TERRAIN_JUMP, (configLuigiSounds && isLuigi) ? SOUND_LUIGI_YAHOO : SOUND_MARIO_YAHOO);
play_mario_sound(m, SOUND_ACTION_TERRAIN_JUMP, get_character_sound(m)->soundYahoo);
update_air_without_turn(m);

View file

@ -236,8 +236,7 @@ s32 act_climbing_pole(struct MarioState *m) {
s32 act_grab_pole_slow(struct MarioState *m) {
if (m->usedObj == NULL) { m->usedObj = cur_obj_find_nearest_pole(); }
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound_if_no_flag(m, (configLuigiSounds && isLuigi) ? SOUND_LUIGI_WHOA : SOUND_MARIO_WHOA, MARIO_MARIO_SOUND_PLAYED);
play_sound_if_no_flag(m, get_character_sound(m)->soundWhoa, MARIO_MARIO_SOUND_PLAYED);
if (set_pole_position(m, 0.0f) == POLE_NONE) {
set_mario_animation(m, MARIO_ANIM_GRAB_POLE_SHORT);
@ -254,8 +253,7 @@ s32 act_grab_pole_fast(struct MarioState *m) {
struct Object *marioObj = m->marioObj;
if (m->usedObj == NULL) { m->usedObj = cur_obj_find_nearest_pole(); }
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound_if_no_flag(m, (configLuigiSounds && isLuigi) ? SOUND_LUIGI_WHOA : SOUND_MARIO_WHOA, MARIO_MARIO_SOUND_PLAYED);
play_sound_if_no_flag(m, get_character_sound(m)->soundWhoa, MARIO_MARIO_SOUND_PLAYED);
m->faceAngle[1] += marioObj->oMarioPoleYawVel;
marioObj->oMarioPoleYawVel = marioObj->oMarioPoleYawVel * 8 / 10;
@ -601,8 +599,7 @@ s32 act_ledge_grab(struct MarioState *m) {
}
if (m->actionArg == 0) {
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound_if_no_flag(m, (configLuigiSounds && isLuigi) ? SOUND_LUIGI_WHOA : SOUND_MARIO_WHOA, MARIO_MARIO_SOUND_PLAYED);
play_sound_if_no_flag(m, get_character_sound(m)->soundWhoa, MARIO_MARIO_SOUND_PLAYED);
}
stop_and_set_height_to_floor(m);
@ -624,8 +621,7 @@ s32 act_ledge_climb_slow(struct MarioState *m) {
}
if (m->actionTimer == 10) {
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound_if_no_flag(m, (configLuigiSounds && isLuigi) ? SOUND_LUIGI_EEUH : SOUND_MARIO_EEUH, MARIO_MARIO_SOUND_PLAYED);
play_sound_if_no_flag(m, get_character_sound(m)->soundEeuh, MARIO_MARIO_SOUND_PLAYED);
}
update_ledge_climb(m, MARIO_ANIM_SLOW_LEDGE_GRAB, ACT_IDLE);
@ -643,8 +639,7 @@ s32 act_ledge_climb_down(struct MarioState *m) {
return let_go_of_ledge(m);
}
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound_if_no_flag(m, (configLuigiSounds && isLuigi) ? SOUND_LUIGI_WHOA : SOUND_MARIO_WHOA, MARIO_MARIO_SOUND_PLAYED);
play_sound_if_no_flag(m, get_character_sound(m)->soundWhoa, MARIO_MARIO_SOUND_PLAYED);
update_ledge_climb(m, MARIO_ANIM_CLIMB_DOWN_LEDGE, ACT_LEDGE_GRAB);
m->actionArg = 1;
@ -657,8 +652,7 @@ s32 act_ledge_climb_fast(struct MarioState *m) {
return let_go_of_ledge(m);
}
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound_if_no_flag(m, (configLuigiSounds && isLuigi) ? SOUND_LUIGI_UH2 : SOUND_MARIO_UH2, MARIO_MARIO_SOUND_PLAYED);
play_sound_if_no_flag(m, get_character_sound(m)->soundUh2, MARIO_MARIO_SOUND_PLAYED);
update_ledge_climb(m, MARIO_ANIM_FAST_LEDGE_GRAB, ACT_IDLE);

View file

@ -649,7 +649,6 @@ s32 act_debug_free_move(struct MarioState *m) {
void general_star_dance_handler(struct MarioState *m, s32 isInWater) {
s32 dialogID;
if (m->actionState == 0) {
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
switch (++m->actionTimer) {
case 1:
for (int i = 0; i < MAX_PLAYERS; i++) {
@ -676,7 +675,7 @@ void general_star_dance_handler(struct MarioState *m, s32 isInWater) {
break;
case 42:
play_sound((configLuigiSounds && isLuigi) ? SOUND_LUIGI_HERE_WE_GO : SOUND_MARIO_HERE_WE_GO, m->marioObj->header.gfx.cameraToObject);
play_sound(get_character_sound(m)->soundHereWeGo, m->marioObj->header.gfx.cameraToObject);
break;
case 80:
@ -771,8 +770,7 @@ s32 act_standing_death(struct MarioState *m) {
return set_mario_action(m, ACT_SUFFOCATION, 0);
}
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound_if_no_flag(m, (configLuigiSounds && isLuigi) ? SOUND_LUIGI_DYING : SOUND_MARIO_DYING, MARIO_ACTION_SOUND_PLAYED);
play_sound_if_no_flag(m, get_character_sound(m)->soundDying, MARIO_ACTION_SOUND_PLAYED);
common_death_handler(m, MARIO_ANIM_DYING_FALL_OVER, 80);
if (m->marioObj->header.gfx.unk38.animFrame == 77) {
play_mario_landing_sound(m, SOUND_ACTION_TERRAIN_BODY_HIT_GROUND);
@ -781,22 +779,19 @@ s32 act_standing_death(struct MarioState *m) {
}
s32 act_electrocution(struct MarioState *m) {
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound_if_no_flag(m, (configLuigiSounds && isLuigi) ? SOUND_LUIGI_DYING : SOUND_MARIO_DYING, MARIO_ACTION_SOUND_PLAYED);
play_sound_if_no_flag(m, get_character_sound(m)->soundDying, MARIO_ACTION_SOUND_PLAYED);
common_death_handler(m, MARIO_ANIM_ELECTROCUTION, 43);
return FALSE;
}
s32 act_suffocation(struct MarioState *m) {
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound_if_no_flag(m, (configLuigiSounds && isLuigi) ? SOUND_LUIGI_DYING : SOUND_MARIO_DYING, MARIO_ACTION_SOUND_PLAYED);
play_sound_if_no_flag(m, get_character_sound(m)->soundDying, MARIO_ACTION_SOUND_PLAYED);
common_death_handler(m, MARIO_ANIM_SUFFOCATING, 86);
return FALSE;
}
s32 act_death_on_back(struct MarioState *m) {
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound_if_no_flag(m, (configLuigiSounds && isLuigi) ? SOUND_LUIGI_DYING : SOUND_MARIO_DYING, MARIO_ACTION_SOUND_PLAYED);
play_sound_if_no_flag(m, get_character_sound(m)->soundDying, MARIO_ACTION_SOUND_PLAYED);
if (common_death_handler(m, MARIO_ANIM_DYING_ON_BACK, 54) == 40) {
play_mario_heavy_landing_sound(m, SOUND_ACTION_TERRAIN_BODY_HIT_GROUND);
}
@ -804,8 +799,7 @@ s32 act_death_on_back(struct MarioState *m) {
}
s32 act_death_on_stomach(struct MarioState *m) {
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound_if_no_flag(m, (configLuigiSounds && isLuigi) ? SOUND_LUIGI_DYING : SOUND_MARIO_DYING, MARIO_ACTION_SOUND_PLAYED);
play_sound_if_no_flag(m, get_character_sound(m)->soundDying, MARIO_ACTION_SOUND_PLAYED);
if (common_death_handler(m, MARIO_ANIM_DYING_ON_STOMACH, 37) == 37) {
play_mario_heavy_landing_sound(m, SOUND_ACTION_TERRAIN_BODY_HIT_GROUND);
}
@ -820,8 +814,7 @@ s32 act_quicksand_death(struct MarioState *m) {
}
if (m->actionState == 1) {
if (m->quicksandDepth >= 100.0f) {
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound_if_no_flag(m, (configLuigiSounds && isLuigi) ? SOUND_LUIGI_WAAAOOOW : SOUND_MARIO_WAAAOOOW, MARIO_ACTION_SOUND_PLAYED);
play_sound_if_no_flag(m, get_character_sound(m)->soundWaaaooow, MARIO_ACTION_SOUND_PLAYED);
}
if ((m->quicksandDepth += 5.0f) >= 180.0f) {
//level_trigger_warp(m, WARP_OP_DEATH);
@ -835,8 +828,7 @@ s32 act_quicksand_death(struct MarioState *m) {
}
s32 act_eaten_by_bubba(struct MarioState *m) {
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound_if_no_flag(m, (configLuigiSounds && isLuigi) ? SOUND_LUIGI_DYING : SOUND_MARIO_DYING, MARIO_ACTION_SOUND_PLAYED);
play_sound_if_no_flag(m, get_character_sound(m)->soundDying, MARIO_ACTION_SOUND_PLAYED);
set_mario_animation(m, MARIO_ANIM_A_POSE);
//m->marioObj->header.gfx.node.flags &= ~GRAPH_RENDER_ACTIVE;
if (m != &gMarioStates[0]) {
@ -1101,8 +1093,7 @@ s32 act_emerge_from_pipe(struct MarioState *m) {
marioObj->header.gfx.node.flags |= GRAPH_RENDER_ACTIVE;
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound_if_no_flag(m, (configLuigiSounds && isLuigi) ? SOUND_LUIGI_YAHOO : SOUND_MARIO_YAHOO, MARIO_MARIO_SOUND_PLAYED);
play_sound_if_no_flag(m, get_character_sound(m)->soundYahoo, MARIO_MARIO_SOUND_PLAYED);
if (gCurrLevelNum == LEVEL_THI) {
if (gCurrAreaIndex == 2) {
@ -1284,11 +1275,10 @@ s32 act_exit_land_save_dialog(struct MarioState *m) {
s32 act_death_exit(struct MarioState *m) {
if (15 < m->actionTimer++
&& launch_mario_until_land(m, ACT_DEATH_EXIT_LAND, MARIO_ANIM_GENERAL_FALL, -32.0f)) {
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
#ifdef VERSION_JP
play_sound((configLuigiSounds && isLuigi) ? SOUND_LUIGI_OOOF : SOUND_MARIO_OOOF, m->marioObj->header.gfx.cameraToObject);
play_sound(get_character_sound(m)->soundOoof, m->marioObj->header.gfx.cameraToObject);
#else
play_sound((configLuigiSounds && isLuigi) ? SOUND_LUIGI_OOOF2 : SOUND_MARIO_OOOF2, m->marioObj->header.gfx.cameraToObject);
play_sound(get_character_sound(m)->soundOoof2, m->marioObj->header.gfx.cameraToObject);
#endif
queue_rumble_data_mario(m, 5, 80);
//m->numLives--;
@ -1302,11 +1292,10 @@ s32 act_death_exit(struct MarioState *m) {
s32 act_unused_death_exit(struct MarioState *m) {
if (launch_mario_until_land(m, ACT_FREEFALL_LAND_STOP, MARIO_ANIM_GENERAL_FALL, 0.0f)) {
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
#ifdef VERSION_JP
play_sound((configLuigiSounds && isLuigi) ? SOUND_LUIGI_OOOF : SOUND_MARIO_OOOF, m->marioObj->header.gfx.cameraToObject);
play_sound(get_character_sound(m)->soundOoof, m->marioObj->header.gfx.cameraToObject);
#else
play_sound((configLuigiSounds && isLuigi) ? SOUND_LUIGI_OOOF2 : SOUND_MARIO_OOOF2, m->marioObj->header.gfx.cameraToObject);
play_sound(get_character_sound(m)->soundOoof2, m->marioObj->header.gfx.cameraToObject);
#endif
//m->numLives--;
// restore 7.75 units of health
@ -1319,11 +1308,10 @@ s32 act_unused_death_exit(struct MarioState *m) {
s32 act_falling_death_exit(struct MarioState *m) {
if (launch_mario_until_land(m, ACT_DEATH_EXIT_LAND, MARIO_ANIM_GENERAL_FALL, 0.0f)) {
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
#ifdef VERSION_JP
play_sound((configLuigiSounds && isLuigi) ? SOUND_LUIGI_OOOF : SOUND_MARIO_OOOF, m->marioObj->header.gfx.cameraToObject);
play_sound(get_character_sound(m)->soundOoof, m->marioObj->header.gfx.cameraToObject);
#else
play_sound((configLuigiSounds && isLuigi) ? SOUND_LUIGI_OOOF2 : SOUND_MARIO_OOOF2, m->marioObj->header.gfx.cameraToObject);
play_sound(get_character_sound(m)->soundOoof2, m->marioObj->header.gfx.cameraToObject);
#endif
queue_rumble_data_mario(m, 5, 80);
//m->numLives--;
@ -1339,8 +1327,7 @@ s32 act_falling_death_exit(struct MarioState *m) {
s32 act_special_exit_airborne(struct MarioState *m) {
struct Object *marioObj = m->marioObj;
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound_if_no_flag(m, (configLuigiSounds && isLuigi) ? SOUND_LUIGI_YAHOO : SOUND_MARIO_YAHOO, MARIO_MARIO_SOUND_PLAYED);
play_sound_if_no_flag(m, get_character_sound(m)->soundYahoo, MARIO_MARIO_SOUND_PLAYED);
if (m->actionTimer++ < 11) {
marioObj->header.gfx.node.flags &= ~GRAPH_RENDER_ACTIVE;
@ -1588,8 +1575,7 @@ s32 act_teleport_fade_in(struct MarioState *m) {
}
s32 act_shocked(struct MarioState *m) {
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound_if_no_flag(m, (configLuigiSounds && isLuigi) ? SOUND_LUIGI_WAAAOOOW : SOUND_MARIO_WAAAOOOW, MARIO_ACTION_SOUND_PLAYED);
play_sound_if_no_flag(m, get_character_sound(m)->soundWaaaooow, MARIO_ACTION_SOUND_PLAYED);
play_sound(SOUND_MOVING_SHOCKED, m->marioObj->header.gfx.cameraToObject);
if (m->playerIndex == 0) { set_camera_shake_from_hit(SHAKE_SHOCK); }
@ -1651,8 +1637,7 @@ s32 act_squished(struct MarioState *m) {
if (!(m->flags & MARIO_METAL_CAP) && m->invincTimer == 0) {
// cap on: 3 units; cap off: 4.5 units
m->hurtCounter += m->flags & MARIO_CAP_ON_HEAD ? 12 : 18;
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound_if_no_flag(m, (configLuigiSounds && isLuigi) ? SOUND_LUIGI_ATTACKED : SOUND_MARIO_ATTACKED, MARIO_MARIO_SOUND_PLAYED);
play_sound_if_no_flag(m, get_character_sound(m)->soundAttacked, MARIO_MARIO_SOUND_PLAYED);
}
// Both of the 1.8's are really floats, but one of them has to
@ -1871,13 +1856,12 @@ static void intro_cutscene_jump_out_of_pipe(struct MarioState *m) {
if (m->actionTimer++ >= 118) {
m->marioObj->header.gfx.node.flags |= GRAPH_RENDER_ACTIVE;
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
#ifdef VERSION_EU
// For some reason these calls were swapped.
play_sound_if_no_flag(m, SOUND_ACTION_HIT_3, MARIO_ACTION_SOUND_PLAYED);
play_sound_if_no_flag(m, (configLuigiSounds && isLuigi) ? SOUND_LUIGI_YAHOO : SOUND_MARIO_YAHOO, MARIO_MARIO_SOUND_PLAYED);
play_sound_if_no_flag(m, get_character_sound(m)->soundYahoo, MARIO_MARIO_SOUND_PLAYED);
#else
play_sound_if_no_flag(m, (configLuigiSounds && isLuigi) ? SOUND_LUIGI_YAHOO : SOUND_MARIO_YAHOO, MARIO_MARIO_SOUND_PLAYED);
play_sound_if_no_flag(m, get_character_sound(m)->soundYahoo, MARIO_MARIO_SOUND_PLAYED);
#ifndef VERSION_JP
play_sound_if_no_flag(m, SOUND_ACTION_HIT_3, MARIO_ACTION_SOUND_PLAYED);
#endif
@ -1889,7 +1873,7 @@ static void intro_cutscene_jump_out_of_pipe(struct MarioState *m) {
sound_banks_enable(2, 0x0330);
play_mario_landing_sound(m, SOUND_ACTION_TERRAIN_LANDING);
#ifndef VERSION_JP
play_sound((configLuigiSounds && isLuigi) ? SOUND_LUIGI_HAHA : SOUND_MARIO_HAHA, m->marioObj->header.gfx.cameraToObject);
play_sound(get_character_sound(m)->soundHaha, m->marioObj->header.gfx.cameraToObject);
#endif
advance_cutscene_step(m);
}
@ -2025,19 +2009,18 @@ static s32 jumbo_star_cutscene_taking_off(struct MarioState *m) {
marioObj->rawData.asF32[0x22] -= 32.0f;
}
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
switch (animFrame) {
case 3:
play_sound(((configLuigiSounds && isLuigi) ? SOUND_LUIGI_YAH_WAH_HOO : SOUND_MARIO_YAH_WAH_HOO) + (gAudioRandom % 3 << 16),
play_sound((get_character_sound(m)->soundYahWahHoo) + (gAudioRandom % 3 << 16),
m->marioObj->header.gfx.cameraToObject);
break;
case 28:
play_sound((configLuigiSounds && isLuigi) ? SOUND_LUIGI_HOOHOO : SOUND_MARIO_HOOHOO, m->marioObj->header.gfx.cameraToObject);
play_sound(get_character_sound(m)->soundHoohoo, m->marioObj->header.gfx.cameraToObject);
break;
case 60:
play_sound((configLuigiSounds && isLuigi) ? SOUND_LUIGI_YAHOO : SOUND_MARIO_YAHOO, m->marioObj->header.gfx.cameraToObject);
play_sound(get_character_sound(m)->soundYahoo, m->marioObj->header.gfx.cameraToObject);
break;
}
m->particleFlags |= PARTICLE_SPARKLES;

View file

@ -1387,8 +1387,7 @@ void common_slide_action(struct MarioState *m, u32 endAction, u32 airAction, s32
case GROUND_STEP_LEFT_GROUND:
set_mario_action(m, airAction, 0);
if (m->forwardVel < -50.0f || 50.0f < m->forwardVel) {
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound((configLuigiSounds && isLuigi) ? SOUND_LUIGI_HOOHOO : SOUND_MARIO_HOOHOO, m->marioObj->header.gfx.cameraToObject);
play_sound(get_character_sound(m)->soundHoohoo, m->marioObj->header.gfx.cameraToObject);
}
break;
@ -1607,14 +1606,13 @@ s32 common_ground_knockback_action(struct MarioState *m, s32 animation, s32 arg2
play_mario_heavy_landing_sound_once(m, SOUND_ACTION_TERRAIN_BODY_HIT_GROUND);
}
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
if (arg4 > 0) {
play_sound_if_no_flag(m, (configLuigiSounds && isLuigi) ? SOUND_LUIGI_ATTACKED : SOUND_MARIO_ATTACKED, MARIO_MARIO_SOUND_PLAYED);
play_sound_if_no_flag(m, get_character_sound(m)->soundAttacked, MARIO_MARIO_SOUND_PLAYED);
} else {
#ifdef VERSION_JP
play_sound_if_no_flag(m, (configLuigiSounds && isLuigi) ? SOUND_LUIGI_OOOF : SOUND_MARIO_OOOF, MARIO_MARIO_SOUND_PLAYED);
play_sound_if_no_flag(m, get_character_sound(m)->soundOoof, MARIO_MARIO_SOUND_PLAYED);
#else
play_sound_if_no_flag(m, (configLuigiSounds && isLuigi) ? SOUND_LUIGI_OOOF2 : SOUND_MARIO_OOOF2, MARIO_MARIO_SOUND_PLAYED);
play_sound_if_no_flag(m, get_character_sound(m)->soundOoof2, MARIO_MARIO_SOUND_PLAYED);
#endif
}
@ -1665,8 +1663,7 @@ s32 act_hard_backward_ground_kb(struct MarioState *m) {
#ifndef VERSION_JP
if (val04 == 0x36 && m->prevAction == ACT_SPECIAL_DEATH_EXIT) {
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound((configLuigiSounds && isLuigi) ? SOUND_LUIGI_MAMA_MIA : SOUND_MARIO_MAMA_MIA, m->marioObj->header.gfx.cameraToObject);
play_sound(get_character_sound(m)->soundMamaMia, m->marioObj->header.gfx.cameraToObject);
}
#endif
@ -1723,8 +1720,7 @@ s32 act_death_exit_land(struct MarioState *m) {
val04 = set_mario_animation(m, MARIO_ANIM_FALL_OVER_BACKWARDS);
if (val04 == 0x36) {
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound((configLuigiSounds && isLuigi) ? SOUND_LUIGI_MAMA_MIA : SOUND_MARIO_MAMA_MIA, m->marioObj->header.gfx.cameraToObject);
play_sound(get_character_sound(m)->soundMamaMia, m->marioObj->header.gfx.cameraToObject);
}
if (val04 == 0x44) {
play_mario_landing_sound(m, SOUND_ACTION_TERRAIN_LANDING);
@ -1879,8 +1875,7 @@ s32 act_long_jump_land(struct MarioState *m) {
}
if (!(m->input & INPUT_NONZERO_ANALOG)) {
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound_if_no_flag(m, (configLuigiSounds && isLuigi) ? SOUND_LUIGI_UH2_2 : SOUND_MARIO_UH2_2, MARIO_MARIO_SOUND_PLAYED);
play_sound_if_no_flag(m, get_character_sound(m)->soundUh2_2, MARIO_MARIO_SOUND_PLAYED);
}
common_landing_action(m,
@ -1906,8 +1901,7 @@ s32 act_triple_jump_land(struct MarioState *m) {
}
if (!(m->input & INPUT_NONZERO_ANALOG)) {
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound_if_no_flag(m, (configLuigiSounds && isLuigi) ? SOUND_LUIGI_HAHA : SOUND_MARIO_HAHA, MARIO_MARIO_SOUND_PLAYED);
play_sound_if_no_flag(m, get_character_sound(m)->soundHaha, MARIO_MARIO_SOUND_PLAYED);
}
common_landing_action(m, MARIO_ANIM_TRIPLE_JUMP_LAND, ACT_FREEFALL);
@ -1924,8 +1918,7 @@ s32 act_backflip_land(struct MarioState *m) {
}
if (!(m->input & INPUT_NONZERO_ANALOG)) {
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound_if_no_flag(m, (configLuigiSounds && isLuigi) ? SOUND_LUIGI_HAHA : SOUND_MARIO_HAHA, MARIO_MARIO_SOUND_PLAYED);
play_sound_if_no_flag(m, get_character_sound(m)->soundHaha, MARIO_MARIO_SOUND_PLAYED);
}
common_landing_action(m, MARIO_ANIM_TRIPLE_JUMP_LAND, ACT_FREEFALL);

View file

@ -39,10 +39,9 @@ s32 mario_update_punch_sequence(struct MarioState *m) {
endAction = ACT_IDLE, crouchEndAction = ACT_CROUCHING;
}
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
switch (m->actionArg) {
case 0:
play_sound((configLuigiSounds && isLuigi) ? SOUND_LUIGI_PUNCH_YAH : SOUND_MARIO_PUNCH_YAH, m->marioObj->header.gfx.cameraToObject);
play_sound(get_character_sound(m)->soundPunchYah, m->marioObj->header.gfx.cameraToObject);
// Fall-through:
case 1:
set_mario_animation(m, MARIO_ANIM_FIRST_PUNCH);
@ -82,7 +81,7 @@ s32 mario_update_punch_sequence(struct MarioState *m) {
break;
case 3:
play_sound((configLuigiSounds && isLuigi) ? SOUND_LUIGI_PUNCH_YAH : SOUND_MARIO_PUNCH_WAH, m->marioObj->header.gfx.cameraToObject);
play_sound(get_character_sound(m)->soundPunchYah, m->marioObj->header.gfx.cameraToObject);
// Fall-through:
case 4:
set_mario_animation(m, MARIO_ANIM_SECOND_PUNCH);
@ -117,7 +116,7 @@ s32 mario_update_punch_sequence(struct MarioState *m) {
break;
case 6:
play_mario_action_sound(m, (configLuigiSounds && isLuigi) ? SOUND_LUIGI_PUNCH_HOO : SOUND_MARIO_PUNCH_HOO, 1);
play_mario_action_sound(m, get_character_sound(m)->soundPunchHoo, 1);
animFrame = set_mario_animation(m, MARIO_ANIM_GROUND_KICK);
if (animFrame == 0) {
m->marioBodyState->punchState = (2 << 6) | 6;
@ -133,7 +132,7 @@ s32 mario_update_punch_sequence(struct MarioState *m) {
break;
case 9:
play_mario_action_sound(m, (configLuigiSounds && isLuigi) ? SOUND_LUIGI_PUNCH_HOO : SOUND_MARIO_PUNCH_HOO, 1);
play_mario_action_sound(m, get_character_sound(m)->soundPunchHoo, 1);
set_mario_animation(m, MARIO_ANIM_BREAKDANCE);
animFrame = m->marioObj->header.gfx.unk38.animFrame;
@ -193,8 +192,7 @@ s32 act_picking_up(struct MarioState *m) {
// slot (cloning via fake object).
mario_grab_used_object(m);
if (m->heldObj != NULL) {
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound_if_no_flag(m, (configLuigiSounds && isLuigi) ? SOUND_LUIGI_HRMM : SOUND_MARIO_HRMM, MARIO_MARIO_SOUND_PLAYED);
play_sound_if_no_flag(m, get_character_sound(m)->soundHrmm, MARIO_MARIO_SOUND_PLAYED);
m->actionState = 1;
} else {
set_mario_action(m, ACT_IDLE, 0);
@ -274,8 +272,7 @@ s32 act_throwing(struct MarioState *m) {
if (++m->actionTimer == 7) {
mario_throw_held_object(m);
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound_if_no_flag(m, (configLuigiSounds && isLuigi) ? SOUND_LUIGI_WAH2 : SOUND_MARIO_WAH2, MARIO_MARIO_SOUND_PLAYED);
play_sound_if_no_flag(m, get_character_sound(m)->soundWah2, MARIO_MARIO_SOUND_PLAYED);
play_sound_if_no_flag(m, SOUND_ACTION_THROW, MARIO_ACTION_SOUND_PLAYED);
queue_rumble_data_mario(m, 3, 50);
}
@ -295,8 +292,7 @@ s32 act_heavy_throw(struct MarioState *m) {
if (++m->actionTimer == 13) {
mario_drop_held_object(m);
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound_if_no_flag(m, (configLuigiSounds && isLuigi) ? SOUND_LUIGI_WAH2 : SOUND_MARIO_WAH2, MARIO_MARIO_SOUND_PLAYED);
play_sound_if_no_flag(m, get_character_sound(m)->soundWah2, MARIO_MARIO_SOUND_PLAYED);
play_sound_if_no_flag(m, SOUND_ACTION_THROW, MARIO_ACTION_SOUND_PLAYED);
queue_rumble_data_mario(m, 3, 50);
}
@ -333,8 +329,7 @@ s32 act_picking_up_bowser(struct MarioState *m) {
mario_grab_used_object(m);
if (m->heldObj != NULL) {
queue_rumble_data_mario(m, 5, 80);
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound((configLuigiSounds && isLuigi) ? SOUND_LUIGI_HRMM : SOUND_MARIO_HRMM, m->marioObj->header.gfx.cameraToObject);
play_sound(get_character_sound(m)->soundHrmm, m->marioObj->header.gfx.cameraToObject);
if (m->playerIndex == 0) {
network_send_object(m->heldObj);
} else {
@ -363,8 +358,7 @@ s32 act_holding_bowser(struct MarioState *m) {
mario_grab_used_object(m);
if (m->heldObj != NULL) {
queue_rumble_data_mario(m, 5, 80);
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound((configLuigiSounds && isLuigi) ? SOUND_LUIGI_HRMM : SOUND_MARIO_HRMM, m->marioObj->header.gfx.cameraToObject);
play_sound(get_character_sound(m)->soundHrmm, m->marioObj->header.gfx.cameraToObject);
} else {
set_mario_action(m, ACT_IDLE, 0);
return FALSE;
@ -375,15 +369,14 @@ s32 act_holding_bowser(struct MarioState *m) {
s16 spin;
if (m->playerIndex == 0 && m->input & INPUT_B_PRESSED) {
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
#ifndef VERSION_JP
if (m->angleVel[1] <= -0xE00 || m->angleVel[1] >= 0xE00) {
play_sound((configLuigiSounds && isLuigi) ? SOUND_LUIGI_SO_LONGA_BOWSER : SOUND_MARIO_SO_LONGA_BOWSER, m->marioObj->header.gfx.cameraToObject);
play_sound(get_character_sound(m)->soundSoLongaBowser, m->marioObj->header.gfx.cameraToObject);
} else {
play_sound((configLuigiSounds && isLuigi) ? SOUND_LUIGI_HERE_WE_GO : SOUND_MARIO_HERE_WE_GO, m->marioObj->header.gfx.cameraToObject);
play_sound(get_character_sound(m)->soundHereWeGo, m->marioObj->header.gfx.cameraToObject);
}
#else
play_sound((configLuigiSounds && isLuigi) ? SOUND_LUIGI_HERE_WE_GO : SOUND_MARIO_HERE_WE_GO, m->marioObj->header.gfx.cameraToObject);
play_sound(get_character_sound(m)->soundHereWeGo, m->marioObj->header.gfx.cameraToObject);
#endif
return set_mario_action(m, ACT_RELEASING_BOWSER, 0);
}

View file

@ -245,21 +245,18 @@ s32 act_start_sleeping(struct MarioState *m) {
#ifndef VERSION_JP
if (m->actionState == 2) {
if (sp24 == -1) {
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound((configLuigiSounds && isLuigi) ? SOUND_LUIGI_YAWNING : SOUND_MARIO_YAWNING, m->marioObj->header.gfx.cameraToObject);
play_sound(get_character_sound(m)->soundYawning, m->marioObj->header.gfx.cameraToObject);
}
}
if (m->actionState == 1) {
if (sp24 == -1) {
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound((configLuigiSounds && isLuigi) ? SOUND_LUIGI_IMA_TIRED : SOUND_MARIO_IMA_TIRED, m->marioObj->header.gfx.cameraToObject);
play_sound(get_character_sound(m)->soundImaTired, m->marioObj->header.gfx.cameraToObject);
}
}
#else
if (m->actionState == 2) {
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound_if_no_flag(m, (configLuigiSounds && isLuigi) ? SOUND_LUIGI_YAWNING : SOUND_MARIO_YAWNING, MARIO_MARIO_SOUND_PLAYED);
play_sound_if_no_flag(m, get_character_sound(m)->soundYawning, MARIO_MARIO_SOUND_PLAYED);
}
#endif
@ -294,14 +291,12 @@ s32 act_sleeping(struct MarioState *m) {
}
if (sp24 == 2) {
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound((configLuigiSounds && isLuigi) ? SOUND_LUIGI_SNORING1 : SOUND_MARIO_SNORING1, m->marioObj->header.gfx.cameraToObject);
play_sound(get_character_sound(m)->soundSnoring1, m->marioObj->header.gfx.cameraToObject);
m->isSnoring = TRUE;
}
if (sp24 == 20) {
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound((configLuigiSounds && isLuigi) ? SOUND_LUIGI_SNORING2 : SOUND_MARIO_SNORING2, m->marioObj->header.gfx.cameraToObject);
play_sound(get_character_sound(m)->soundSnoring2, m->marioObj->header.gfx.cameraToObject);
m->isSnoring = TRUE;
}
@ -325,18 +320,17 @@ s32 act_sleeping(struct MarioState *m) {
}
case 2: {
sp24 = set_mario_animation(m, MARIO_ANIM_SLEEP_LYING);
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
#ifndef VERSION_JP
play_sound_if_no_flag(m, (configLuigiSounds && isLuigi) ? SOUND_LUIGI_SNORING3 : SOUND_MARIO_SNORING3, MARIO_ACTION_SOUND_PLAYED);
play_sound_if_no_flag(m, get_character_sound(m)->soundSnoring3, MARIO_ACTION_SOUND_PLAYED);
m->isSnoring = TRUE;
#else
if (sp24 == 2) {
play_sound((configLuigiSounds && isLuigi) ? SOUND_LUIGI_SNORING2 : SOUND_MARIO_SNORING2, m->marioObj->header.gfx.cameraToObject);
play_sound(get_character_sound(m)->soundSnoring2, m->marioObj->header.gfx.cameraToObject);
m->isSnoring = TRUE;
}
if (sp24 == 25) {
play_sound((configLuigiSounds && isLuigi) ? SOUND_LUIGI_SNORING1 : SOUND_MARIO_SNORING1, m->marioObj->header.gfx.cameraToObject);
play_sound(get_character_sound(m)->soundSnoring1, m->marioObj->header.gfx.cameraToObject);
m->isSnoring = TRUE;
}
#endif
@ -348,11 +342,10 @@ s32 act_sleeping(struct MarioState *m) {
s32 act_waking_up(struct MarioState *m) {
if (!m->actionTimer) {
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
func_803205E8((configLuigiSounds && isLuigi) ? SOUND_LUIGI_SNORING1 : SOUND_MARIO_SNORING1, m->marioObj->header.gfx.cameraToObject);
func_803205E8((configLuigiSounds && isLuigi) ? SOUND_LUIGI_SNORING2 : SOUND_MARIO_SNORING2, m->marioObj->header.gfx.cameraToObject);
func_803205E8(get_character_sound(m)->soundSnoring1, m->marioObj->header.gfx.cameraToObject);
func_803205E8(get_character_sound(m)->soundSnoring2, m->marioObj->header.gfx.cameraToObject);
#ifndef VERSION_JP
func_803205E8((configLuigiSounds && isLuigi) ? SOUND_LUIGI_SNORING3 : SOUND_MARIO_SNORING3, m->marioObj->header.gfx.cameraToObject);
func_803205E8(get_character_sound(m)->soundSnoring3, m->marioObj->header.gfx.cameraToObject);
#endif
if (m->playerIndex == 0) {
raise_background_noise(2);
@ -409,8 +402,7 @@ s32 act_shivering(struct MarioState *m) {
sp24 = set_mario_animation(m, MARIO_ANIM_SHIVERING_WARMING_HAND);
if (sp24 == 0x31) {
m->particleFlags |= PARTICLE_BREATH;
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound((configLuigiSounds && isLuigi) ? SOUND_LUIGI_PANTING_COLD : SOUND_MARIO_PANTING_COLD, m->marioObj->header.gfx.cameraToObject);
play_sound(get_character_sound(m)->soundPantingCold, m->marioObj->header.gfx.cameraToObject);
}
if (sp24 == 7 || sp24 == 0x51) {
play_sound(SOUND_ACTION_CLAP_HANDS_COLD, m->marioObj->header.gfx.cameraToObject);
@ -448,18 +440,15 @@ s32 act_coughing(struct MarioState *m) {
stationary_ground_step(m);
sp1C = set_mario_animation(m, MARIO_ANIM_COUGHING);
if (sp1C == 0x19 || sp1C == 0x23) {
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound((configLuigiSounds && isLuigi) ? SOUND_LUIGI_COUGHING3 : SOUND_MARIO_COUGHING3, m->marioObj->header.gfx.cameraToObject);
play_sound(get_character_sound(m)->soundCoughing3, m->marioObj->header.gfx.cameraToObject);
}
if (sp1C == 0x32 || sp1C == 0x3A) {
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound((configLuigiSounds && isLuigi) ? SOUND_LUIGI_COUGHING2 : SOUND_MARIO_COUGHING2, m->marioObj->header.gfx.cameraToObject);
play_sound(get_character_sound(m)->soundCoughing2, m->marioObj->header.gfx.cameraToObject);
}
if (sp1C == 0x47 || sp1C == 0x50) {
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound((configLuigiSounds && isLuigi) ? SOUND_LUIGI_COUGHING1 : SOUND_MARIO_COUGHING1, m->marioObj->header.gfx.cameraToObject);
play_sound(get_character_sound(m)->soundCoughing1, m->marioObj->header.gfx.cameraToObject);
}
return 0;
@ -606,8 +595,7 @@ s32 act_panting(struct MarioState *m) {
}
if (set_mario_animation(m, MARIO_ANIM_WALK_PANTING) == 1) {
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound((configLuigiSounds && isLuigi) ? SOUND_LUIGI_PANTING : SOUND_MARIO_PANTING + ((gAudioRandom % 3U) << 0x10),
play_sound(get_character_sound(m)->soundPanting + ((gAudioRandom % 3U) << 0x10),
m->marioObj->header.gfx.cameraToObject);
}

View file

@ -890,8 +890,7 @@ static s32 act_forward_water_kb(struct MarioState *m) {
}
static s32 act_water_shocked(struct MarioState *m) {
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound_if_no_flag(m, (configLuigiSounds && isLuigi) ? SOUND_LUIGI_WAAAOOOW : SOUND_MARIO_WAAAOOOW, MARIO_ACTION_SOUND_PLAYED);
play_sound_if_no_flag(m, get_character_sound(m)->soundWaaaooow, MARIO_ACTION_SOUND_PLAYED);
play_sound(SOUND_MOVING_SHOCKED, m->marioObj->header.gfx.cameraToObject);
if (m->playerIndex == 0) { set_camera_shake_from_hit(SHAKE_SHOCK); }
@ -931,8 +930,7 @@ static s32 act_drowning(struct MarioState *m) {
break;
}
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound_if_no_flag(m, (configLuigiSounds && isLuigi) ? SOUND_LUIGI_DROWNING : SOUND_MARIO_DROWNING, MARIO_ACTION_SOUND_PLAYED);
play_sound_if_no_flag(m, get_character_sound(m)->soundDrowning, MARIO_ACTION_SOUND_PLAYED);
stationary_slow_down(m);
perform_water_step(m);
@ -980,8 +978,7 @@ static s32 act_water_plunge(struct MarioState *m) {
if (m->actionState == 0) {
play_sound(SOUND_ACTION_UNKNOWN430, m->marioObj->header.gfx.cameraToObject);
if (m->peakHeight - m->pos[1] > 1150.0f) {
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound((configLuigiSounds && isLuigi) ? SOUND_LUIGI_HAHA_2 : SOUND_MARIO_HAHA_2, m->marioObj->header.gfx.cameraToObject);
play_sound(get_character_sound(m)->soundHaha_2, m->marioObj->header.gfx.cameraToObject);
}
m->particleFlags |= PARTICLE_WATER_SPLASH;

View file

@ -326,8 +326,7 @@ void network_receive_player(struct Packet* p) {
if ((m->action == ACT_PUNCHING || m->action == ACT_MOVE_PUNCHING)) {
// play first punching sound, otherwise it will be missed
if (m->action != oldData.action) {
u8 isLuigi = (gNetworkType == NT_SERVER) ? (m->playerIndex != 0) : (m->playerIndex == 0);
play_sound((configLuigiSounds && isLuigi) ? SOUND_LUIGI_PUNCH_YAH : SOUND_MARIO_PUNCH_YAH, m->marioObj->header.gfx.cameraToObject);
play_sound(get_character_sound(m)->soundPunchYah, m->marioObj->header.gfx.cameraToObject);
}
// make the first punch large, otherwise it will be missed
if (m->actionArg == 2 && oldData.actionArg == 1) {