diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/boss.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/boss.cpp b/src/boss.cpp index d34ae9b..bf5e4c1 100644 --- a/src/boss.cpp +++ b/src/boss.cpp @@ -143,12 +143,17 @@ void BossExplode(daBoss *actor, Vec *pos) { void PlayerVictoryCries(daBoss *actor) { UpdateGameMgr(); nw4r::snd::SoundHandle handle1, handle2, handle3, handle4; - if (GetSpecificPlayerActor(0) != 0) + + dAcPy_c *players[4]; + for (int i = 0; i < 4; i++) + players[i] = (dAcPy_c *)GetSpecificPlayerActor(i); + + if (players[0] && strcmp(players[0]->states2.getCurrentState()->getName(), "dAcPy_c::StateID_Balloon")) PlaySoundWithFunctionB4(SoundRelatedClass, &handle1, SE_VOC_MA_CLEAR_BOSS, 1); - if (GetSpecificPlayerActor(1) != 0) + if (players[1] && strcmp(players[1]->states2.getCurrentState()->getName(), "dAcPy_c::StateID_Balloon")) PlaySoundWithFunctionB4(SoundRelatedClass, &handle2, SE_VOC_LU_CLEAR_BOSS, 1); - if (GetSpecificPlayerActor(2) != 0) + if (players[2] && strcmp(players[2]->states2.getCurrentState()->getName(), "dAcPy_c::StateID_Balloon")) PlaySoundWithFunctionB4(SoundRelatedClass, &handle3, SE_VOC_KO_CLEAR_BOSS, 1); - if (GetSpecificPlayerActor(3) != 0) + if (players[3] && strcmp(players[3]->states2.getCurrentState()->getName(), "dAcPy_c::StateID_Balloon")) PlaySoundWithFunctionB4(SoundRelatedClass, &handle4, SE_VOC_KO2_CLEAR_BOSS, 1); } |