diff options
author | Treeki <treeki@gmail.com> | 2013-02-12 02:16:32 +0100 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2013-02-12 02:16:32 +0100 |
commit | 6fd613a998948f94f4b29ad05198149cb22f65b8 (patch) | |
tree | d8a79ff4d23601a0120b951a0dd4ede9459126b1 /src/boss.cpp | |
parent | 1fe7dd1023fb9b7680caee4ba12ad860941053aa (diff) | |
download | kamek-6fd613a998948f94f4b29ad05198149cb22f65b8.tar.gz kamek-6fd613a998948f94f4b29ad05198149cb22f65b8.zip |
don't play boss victory cries for bubbled players
Diffstat (limited to 'src/boss.cpp')
-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); } |