summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2013-02-12 02:16:32 +0100
committerTreeki <treeki@gmail.com>2013-02-12 02:16:32 +0100
commit6fd613a998948f94f4b29ad05198149cb22f65b8 (patch)
treed8a79ff4d23601a0120b951a0dd4ede9459126b1
parent1fe7dd1023fb9b7680caee4ba12ad860941053aa (diff)
downloadkamek-6fd613a998948f94f4b29ad05198149cb22f65b8.tar.gz
kamek-6fd613a998948f94f4b29ad05198149cb22f65b8.zip
don't play boss victory cries for bubbled players
Diffstat (limited to '')
-rwxr-xr-xinclude/game.h3
-rw-r--r--src/boss.cpp13
2 files changed, 12 insertions, 4 deletions
diff --git a/include/game.h b/include/game.h
index 9e119d5..b7ef64d 100755
--- a/include/game.h
+++ b/include/game.h
@@ -2352,6 +2352,9 @@ class daPlBase_c : public dStageActor_c {
// Can't be assed to build full headers right now
u8 data[0xEA4 - 0x394];
dPlayerInput_c input;
+ // We're at 0x1008 now
+ u8 data2[0x1464 - 0x1008];
+ dStateWrapper_c<daPlBase_c> states2;
};
class dAcPy_c : public daPlBase_c {
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);
}