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/bossPodouble.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 'src/bossPodouble.cpp')
-rw-r--r-- | src/bossPodouble.cpp | 58 |
1 files changed, 35 insertions, 23 deletions
diff --git a/src/bossPodouble.cpp b/src/bossPodouble.cpp index 57c87a8..dd47463 100644 --- a/src/bossPodouble.cpp +++ b/src/bossPodouble.cpp @@ -50,16 +50,16 @@ class daPodouble : public daBoss { void playerCollision(ActivePhysics *apThis, ActivePhysics *apOther); void yoshiCollision(ActivePhysics *apThis, ActivePhysics *apOther); - void collisionCat3_StarPower(ActivePhysics *apThis, ActivePhysics *apOther); - void collisionCat14_YoshiFire(ActivePhysics *apThis, ActivePhysics *apOther); - void collisionCatD_GroundPound(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 collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther); + bool collisionCat3_StarPower(ActivePhysics *apThis, ActivePhysics *apOther); + bool collisionCat14_YoshiFire(ActivePhysics *apThis, ActivePhysics *apOther); + bool collisionCatD_Drill(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 collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther); bool collisionCat2_IceBall_15_YoshiIce(ActivePhysics *apThis, ActivePhysics *apOther); - void collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther); - void collisionCatA_PenguinMario(ActivePhysics *apThis, ActivePhysics *apOther); + bool collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther); + bool collisionCatA_PenguinMario(ActivePhysics *apThis, ActivePhysics *apOther); USING_STATES(daPodouble); @@ -99,45 +99,57 @@ daPodouble *daPodouble::build() { void daPodouble::playerCollision(ActivePhysics *apThis, ActivePhysics *apOther) { DamagePlayer(this, apThis, apOther); } void daPodouble::yoshiCollision(ActivePhysics *apThis, ActivePhysics *apOther) { this->playerCollision(apThis, apOther); } - void daPodouble::collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) { this->playerCollision(apThis, apOther); } - void daPodouble::collisionCat7_GroundPoundYoshi(ActivePhysics *apThis, ActivePhysics *apOther) { this->playerCollision(apThis, apOther); } - void daPodouble::collisionCatA_PenguinMario(ActivePhysics *apThis, ActivePhysics *apOther) { this->playerCollision(apThis, apOther); } + bool daPodouble::collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) { + this->playerCollision(apThis, apOther); + return true; + } + bool daPodouble::collisionCat7_GroundPoundYoshi(ActivePhysics *apThis, ActivePhysics *apOther) { + this->playerCollision(apThis, apOther); + return true; + } + bool daPodouble::collisionCatA_PenguinMario(ActivePhysics *apThis, ActivePhysics *apOther) { + this->playerCollision(apThis, apOther); + return true; + } - void daPodouble::collisionCatD_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) { return; } - void daPodouble::collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther) { return; } - void daPodouble::collisionCat3_StarPower(ActivePhysics *apThis, ActivePhysics *apOther) { return; } + bool daPodouble::collisionCatD_Drill(ActivePhysics *apThis, ActivePhysics *apOther) { return true; } + bool daPodouble::collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther) { return true; } + bool daPodouble::collisionCat3_StarPower(ActivePhysics *apThis, ActivePhysics *apOther) { return true; } - void daPodouble::collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther) { + bool daPodouble::collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther) { apOther->owner->kill(); - if (this->isInvulnerable) { return; } + if (this->isInvulnerable) { return true; } this->damage += 2; if (this->damage < 12) { doStateChange(&StateID_Damage); } else { doStateChange(&StateID_Outro); } + return true; } - void daPodouble::collisionCat14_YoshiFire(ActivePhysics *apThis, ActivePhysics *apOther){ + bool daPodouble::collisionCat14_YoshiFire(ActivePhysics *apThis, ActivePhysics *apOther){ apOther->owner->Delete(1); - if (this->isInvulnerable) { return; } + if (this->isInvulnerable) { return true; } if (this->isFire == 0) { this->damage += 3; if (this->damage < 12) { doStateChange(&StateID_Damage); } else { doStateChange(&StateID_Outro); } - } + return true; + } else return false; } - void daPodouble::collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther) { - if (this->isInvulnerable) { return; } + bool daPodouble::collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther) { + if (this->isInvulnerable) { return true; } if (this->isFire == 0) { this->damage += 2; if (this->damage < 12) { doStateChange(&StateID_Damage); } else { doStateChange(&StateID_Outro); } - } + return true; + } else return false; } bool daPodouble::collisionCat2_IceBall_15_YoshiIce(ActivePhysics *apThis, ActivePhysics *apOther) { |