diff options
author | Treeki <treeki@gmail.com> | 2013-02-03 00:31:46 +0100 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2013-02-03 00:31:46 +0100 |
commit | 06828e3a02a0ca2eaf56d804bb6845659cfa59e7 (patch) | |
tree | bb28c665445fc622958b9614d014ba791cad2d0f /src/bossFuzzyBear.cpp | |
parent | 012efaa6343cd2bec2f728d0bec6243263712a45 (diff) | |
download | kamek-06828e3a02a0ca2eaf56d804bb6845659cfa59e7.tar.gz kamek-06828e3a02a0ca2eaf56d804bb6845659cfa59e7.zip |
fix a bug in the collision headers, and assorted collision bugs
Diffstat (limited to '')
-rw-r--r-- | src/bossFuzzyBear.cpp | 51 |
1 files changed, 31 insertions, 20 deletions
diff --git a/src/bossFuzzyBear.cpp b/src/bossFuzzyBear.cpp index d286b81..67fbd6e 100644 --- a/src/bossFuzzyBear.cpp +++ b/src/bossFuzzyBear.cpp @@ -43,14 +43,14 @@ class daFuzzyBear_c : public daBoss { void playerCollision(ActivePhysics *apThis, ActivePhysics *apOther); void yoshiCollision(ActivePhysics *apThis, ActivePhysics *apOther); - void collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther); + bool collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther); bool collisionCat2_IceBall_15_YoshiIce(ActivePhysics *apThis, ActivePhysics *apOther); - void collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther); - void collisionCat7_GroundPoundYoshi(ActivePhysics *apThis, ActivePhysics *apOther); - void collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther); - void collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther); - void collisionCat14_YoshiFire(ActivePhysics *apThis, ActivePhysics *apOther); - void collisionCatA_PenguinMario(ActivePhysics *apThis, ActivePhysics *apOther); + bool collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther); + bool collisionCat7_GroundPoundYoshi(ActivePhysics *apThis, ActivePhysics *apOther); + bool collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther); + bool collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther); + bool collisionCat14_YoshiFire(ActivePhysics *apThis, ActivePhysics *apOther); + bool collisionCatA_PenguinMario(ActivePhysics *apThis, ActivePhysics *apOther); USING_STATES(daFuzzyBear_c); DECLARE_STATE(Grow); @@ -81,10 +81,10 @@ CREATE_STATE(daFuzzyBear_c, Outro); void daFuzzyBear_c::playerCollision(ActivePhysics *apThis, ActivePhysics *apOther) { DamagePlayer(this, apThis, apOther); } void daFuzzyBear_c::yoshiCollision(ActivePhysics *apThis, ActivePhysics *apOther) { DamagePlayer(this, apThis, apOther); } -void daFuzzyBear_c::collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther) { - return; // added by skawo request +bool daFuzzyBear_c::collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther) { + return true; // added by skawo request - if (this->isInvulnerable == 1) { return; } + if (this->isInvulnerable == 1) { return true; } this->timer = 0; PlaySound(this, SE_BOSS_KOOPA_FIRE_DISAPP); @@ -92,8 +92,9 @@ void daFuzzyBear_c::collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, Ac SpawnEffect("Wm_mr_fireball_hit", 0, &apOther->owner->pos, &(S16Vec){0,0,0}, &(Vec){1.0, 1.0, 1.0}); this->damage++; if (this->damage > 14) { doStateChange(&StateID_Outro); } + return true; } -void daFuzzyBear_c::collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) { +bool daFuzzyBear_c::collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) { apOther->someFlagByte |= 2; dActor_c *block = apOther->owner; @@ -107,12 +108,13 @@ void daFuzzyBear_c::collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysi mario->doSpriteMovement(); mario->doSpriteMovement(); + return true; } -void daFuzzyBear_c::collisionCat7_GroundPoundYoshi(ActivePhysics *apThis, ActivePhysics *apOther) { +bool daFuzzyBear_c::collisionCat7_GroundPoundYoshi(ActivePhysics *apThis, ActivePhysics *apOther) { this->counter_504[apOther->owner->which_player] = 0; - this->collisionCat9_RollingObject(apThis, apOther); + return this->collisionCat9_RollingObject(apThis, apOther); } -void daFuzzyBear_c::collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther) { +bool daFuzzyBear_c::collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther) { dActor_c *block = apOther->owner; dEn_c *blah = (dEn_c*)block; @@ -134,7 +136,7 @@ void daFuzzyBear_c::collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhy if (blah->direction == 0) { blah->direction = 1; } else { blah->direction = 0; } - return; + return true; } this->pos.x += blah->speed.x; @@ -148,10 +150,11 @@ void daFuzzyBear_c::collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhy if (this->damage > 14) { doStateChange(&StateID_Outro); } else { doStateChange(&StateID_RolyPoly); } + return true; } -void daFuzzyBear_c::collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther) { +bool daFuzzyBear_c::collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther) { - if (this->isInvulnerable == 1) { return; } + if (this->isInvulnerable == 1) { return true; } dActor_c *block = apOther->owner; dEn_c *blah = (dEn_c*)block; @@ -167,11 +170,19 @@ void daFuzzyBear_c::collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics * if (this->damage > 14) { doStateChange(&StateID_Outro); } else { doStateChange(&StateID_RolyPoly); } + return true; } -bool daFuzzyBear_c::collisionCat2_IceBall_15_YoshiIce(ActivePhysics *apThis, ActivePhysics *apOther) { return false; } -void daFuzzyBear_c::collisionCat14_YoshiFire(ActivePhysics *apThis, ActivePhysics *apOther) { } -void daFuzzyBear_c::collisionCatA_PenguinMario(ActivePhysics *apThis, ActivePhysics *apOther) { DamagePlayer(this, apThis, apOther); } +bool daFuzzyBear_c::collisionCat2_IceBall_15_YoshiIce(ActivePhysics *apThis, ActivePhysics *apOther) { + return false; +} +bool daFuzzyBear_c::collisionCat14_YoshiFire(ActivePhysics *apThis, ActivePhysics *apOther) { + return true; +} +bool daFuzzyBear_c::collisionCatA_PenguinMario(ActivePhysics *apThis, ActivePhysics *apOther) { + DamagePlayer(this, apThis, apOther); + return true; +} |