From 06828e3a02a0ca2eaf56d804bb6845659cfa59e7 Mon Sep 17 00:00:00 2001 From: Treeki Date: Sun, 3 Feb 2013 00:31:46 +0100 Subject: fix a bug in the collision headers, and assorted collision bugs --- src/topman.cpp | 49 +++++++++++++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 20 deletions(-) (limited to 'src/topman.cpp') diff --git a/src/topman.cpp b/src/topman.cpp index 66b4454..7a345d3 100644 --- a/src/topman.cpp +++ b/src/topman.cpp @@ -43,16 +43,16 @@ class daTopman : public dEn_c { 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); void _vf148(); void _vf14C(); @@ -136,49 +136,58 @@ daTopman *daTopman::build() { this->playerCollision(apThis, apOther); } - void daTopman::collisionCatD_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) { + bool daTopman::collisionCatD_Drill(ActivePhysics *apThis, ActivePhysics *apOther) { this->dEn_c::playerCollision(apThis, apOther); this->_vf220(apOther->owner); deathInfo.isDead = 0; this->flags_4FC |= (1<<(31-7)); this->counter_504[apOther->owner->which_player] = 0; + return true; } - void daTopman::collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) { - this->collisionCatD_GroundPound(apThis, apOther); + bool daTopman::collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) { + this->collisionCatD_Drill(apThis, apOther); + return true; } - void daTopman::collisionCat7_GroundPoundYoshi(ActivePhysics *apThis, ActivePhysics *apOther) { - this->collisionCatD_GroundPound(apThis, apOther); + bool daTopman::collisionCat7_GroundPoundYoshi(ActivePhysics *apThis, ActivePhysics *apOther) { + this->collisionCatD_Drill(apThis, apOther); + return true; } - void daTopman::collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther) { + bool daTopman::collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther) { backFire = apOther->owner->direction ^ 1; doStateChange(&StateID_KnockBack); + return true; } - void daTopman::collisionCat3_StarPower(ActivePhysics *apThis, ActivePhysics *apOther){ + bool daTopman::collisionCat3_StarPower(ActivePhysics *apThis, ActivePhysics *apOther){ doStateChange(&StateID_Die); + return true; } - void daTopman::collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther) { + bool daTopman::collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther) { doStateChange(&StateID_Die); + return true; } - void daTopman::collisionCatA_PenguinMario(ActivePhysics *apThis, ActivePhysics *apOther){ + bool daTopman::collisionCatA_PenguinMario(ActivePhysics *apThis, ActivePhysics *apOther){ backFire = apOther->owner->direction ^ 1; doStateChange(&StateID_KnockBack); + return true; } - void daTopman::collisionCat14_YoshiFire(ActivePhysics *apThis, ActivePhysics *apOther){ + bool daTopman::collisionCat14_YoshiFire(ActivePhysics *apThis, ActivePhysics *apOther){ backFire = apOther->owner->direction ^ 1; doStateChange(&StateID_KnockBack); + return true; } - void daTopman::collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther) { + bool daTopman::collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther) { backFire = apOther->owner->direction ^ 1; doStateChange(&StateID_KnockBack); + return true; } // void daTopman::collisionCat2_IceBall_15_YoshiIce(ActivePhysics *apThis, ActivePhysics *apOther) { -- cgit v1.2.3