From 6fd613a998948f94f4b29ad05198149cb22f65b8 Mon Sep 17 00:00:00 2001 From: Treeki Date: Tue, 12 Feb 2013 02:16:32 +0100 Subject: don't play boss victory cries for bubbled players --- src/boss.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src') 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); } -- cgit v1.2.3