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/mrsun.cpp | 51 ++++++++++++++++++++++++++++++++++----------------- 1 file changed, 34 insertions(+), 17 deletions(-) (limited to 'src/mrsun.cpp') diff --git a/src/mrsun.cpp b/src/mrsun.cpp index 267456a..8f8b811 100755 --- a/src/mrsun.cpp +++ b/src/mrsun.cpp @@ -51,14 +51,14 @@ class daMrSun_c : public dEn_c { void updateModelMatrices(); void playerCollision(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 collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther); - void collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther); - void collisionCat3_StarPower(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); + bool collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther); + bool collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther); + bool collisionCat3_StarPower(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); USING_STATES(daMrSun_c); DECLARE_STATE(Follow); @@ -90,7 +90,9 @@ CREATE_STATE(daMrSun_c, Wait); void daMrSun_c::playerCollision(ActivePhysics *apThis, ActivePhysics *apOther) { DamagePlayer(this, apThis, apOther); } -void daMrSun_c::collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther) { } +bool daMrSun_c::collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther) { + return true; +} bool daMrSun_c::collisionCat2_IceBall_15_YoshiIce(ActivePhysics *apThis, ActivePhysics *apOther) { if (this->settings == 1) { // It's a moon @@ -100,21 +102,36 @@ bool daMrSun_c::collisionCat2_IceBall_15_YoshiIce(ActivePhysics *apThis, ActiveP } return false; } -void daMrSun_c::collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther) { +bool daMrSun_c::collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther) { this->timer = 0; PlaySound(this, SE_EMY_DOWN); - doStateChange(&StateID_DieFall); } -void daMrSun_c::collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther) { + doStateChange(&StateID_DieFall); + return true; +} +bool daMrSun_c::collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther) { this->timer = 0; PlaySound(this, SE_EMY_DOWN); - doStateChange(&StateID_DieFall); } -void daMrSun_c::collisionCat3_StarPower(ActivePhysics *apThis, ActivePhysics *apOther) { + doStateChange(&StateID_DieFall); + return true; +} +bool daMrSun_c::collisionCat3_StarPower(ActivePhysics *apThis, ActivePhysics *apOther) { this->timer = 0; PlaySound(this, SE_EMY_DOWN); - doStateChange(&StateID_DieFall); } -void daMrSun_c::collisionCatD_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) { DamagePlayer(this, apThis, apOther); } -void daMrSun_c::collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) { DamagePlayer(this, apThis, apOther); } -void daMrSun_c::collisionCat7_GroundPoundYoshi(ActivePhysics *apThis, ActivePhysics *apOther) { DamagePlayer(this, apThis, apOther); } + doStateChange(&StateID_DieFall); + return true; +} +bool daMrSun_c::collisionCatD_Drill(ActivePhysics *apThis, ActivePhysics *apOther) { + DamagePlayer(this, apThis, apOther); + return true; +} +bool daMrSun_c::collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) { + DamagePlayer(this, apThis, apOther); + return true; +} +bool daMrSun_c::collisionCat7_GroundPoundYoshi(ActivePhysics *apThis, ActivePhysics *apOther) { + DamagePlayer(this, apThis, apOther); + return true; +} -- cgit v1.2.3