summaryrefslogtreecommitdiff
path: root/src/mrsun.cpp
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2013-02-03 00:31:46 +0100
committerTreeki <treeki@gmail.com>2013-02-03 00:31:46 +0100
commit06828e3a02a0ca2eaf56d804bb6845659cfa59e7 (patch)
treebb28c665445fc622958b9614d014ba791cad2d0f /src/mrsun.cpp
parent012efaa6343cd2bec2f728d0bec6243263712a45 (diff)
downloadkamek-06828e3a02a0ca2eaf56d804bb6845659cfa59e7.tar.gz
kamek-06828e3a02a0ca2eaf56d804bb6845659cfa59e7.zip
fix a bug in the collision headers, and assorted collision bugs
Diffstat (limited to '')
-rwxr-xr-xsrc/mrsun.cpp51
1 files changed, 34 insertions, 17 deletions
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;
+}