diff options
Diffstat (limited to 'src/bossBridgeBowser.cpp')
-rw-r--r-- | src/bossBridgeBowser.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/bossBridgeBowser.cpp b/src/bossBridgeBowser.cpp index c507e6c..9663882 100644 --- a/src/bossBridgeBowser.cpp +++ b/src/bossBridgeBowser.cpp @@ -15,12 +15,15 @@ extern "C" void *BowserDamageKill(dEn_c *); extern "C" void *BowserDamageEnd(dEn_c *); int HP = 2; +int lastBomb = 0; void BowserDoomSpriteCollision(dEn_c *bowser, ActivePhysics *apThis, ActivePhysics *apOther) { // If you collide with something or other, call the fireball collision if (apOther->owner->name == 674) { + if (lastBomb == apOther->owner->id) { return; } + // void * bowserClass = (void*)(((u32)bowser) + 0x5F8); // int HP = *(int*)(((u32)bowserClass) + 4); @@ -42,7 +45,7 @@ void BowserDoomSpriteCollision(dEn_c *bowser, ActivePhysics *apThis, ActivePhysi BowserDamageEnd(bowser); // daBossKoopaDemo_c *BowserDemo = (daBossKoopaDemo_c*)FindActorByType(BOSS_KOOPA_DEMO, 0); - daBossKoopa_c *BowserDemo = (daBossKoopa_c*)bowser; + daBossKoopa_c *BowserClass = (daBossKoopa_c*)bowser; OSReport("Koopa Controller: %x", BowserClass); BowserClass->doStateChange(&daBossKoopa_c::StateID_Fall); dFlagMgr_c::instance->set(3, 0, true, false, false); @@ -59,6 +62,8 @@ void BowserDoomSpriteCollision(dEn_c *bowser, ActivePhysics *apThis, ActivePhysi HP -= 1; } + lastBomb = apOther->owner->id; + dEn_c * bomb = (dEn_c*)apOther->owner; bomb->kill(); } @@ -71,6 +76,7 @@ void BowserDoomStart(dStageActor_c *Controller) { dEn_c *Bowser = (dEn_c*)FindActorByType(EN_BOSS_KOOPA, 0); Bowser->Delete(1); + lastBomb = 0; } void BowserDoomExecute(dStageActor_c *Controller) { |