summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2012-02-23 05:43:09 +0100
committerTreeki <treeki@gmail.com>2012-02-23 05:43:09 +0100
commitfc6395da2787175e1daf55771975ac0af9d2bd9e (patch)
tree740fb848cc80afbee1aec918999b009da6bd3be9 /src
parent01abdde918a73b95409b2cae4a5492b9ffc9134f (diff)
downloadkamek-fc6395da2787175e1daf55771975ac0af9d2bd9e.tar.gz
kamek-fc6395da2787175e1daf55771975ac0af9d2bd9e.zip
a fix for one Shyguy bug
Diffstat (limited to 'src')
-rw-r--r--src/shyguy.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/shyguy.cpp b/src/shyguy.cpp
index f524cb9..89f92d0 100644
--- a/src/shyguy.cpp
+++ b/src/shyguy.cpp
@@ -43,6 +43,8 @@
// I_kinoko, I_fireflower, I_propeller_model, I_iceflower, I_star, I_penguin - model names
// anmChr - wait2
+void shyCollisionCallback(ActivePhysics *apThis, ActivePhysics *apOther);
+
class daShyGuy : public dEn_c {
int onCreate();
int onDelete();
@@ -78,7 +80,6 @@ class daShyGuy : public dEn_c {
void bindAnimChr_and_setUpdateRate(const char* name, int unk, float unk2, float rate);
void updateModelMatrices();
- void shyCollisionCallback(ActivePhysics *apThis, ActivePhysics *apOther);
// void spriteCollision(ActivePhysics *apThis, ActivePhysics *apOther);
@@ -158,9 +159,9 @@ daShyGuy *daShyGuy::build() {
// Collision callback to help shy guy not die at inappropriate times and ruin the dinner
- void daShyGuy::shyCollisionCallback(ActivePhysics *apThis, ActivePhysics *apOther) {
+ void shyCollisionCallback(ActivePhysics *apThis, ActivePhysics *apOther) {
if (apOther->owner->name != 89) {
- this->collisionCallback(apThis, apOther);
+ apThis->owner->collisionCallback(apThis, apOther);
}
}
@@ -362,7 +363,7 @@ int daShyGuy::onCreate() {
HitMeBaby.bitfield1 = 0x4F;
HitMeBaby.bitfield2 = 0x8828E;
HitMeBaby.unkShort1C = 0;
- HitMeBaby.callback = shyCollisionCallback;
+ HitMeBaby.callback = &shyCollisionCallback;
OSReport("Making the Physics Class and adding to the list\n");
this->aPhysics.initWithStruct(this, &HitMeBaby);
@@ -1001,7 +1002,7 @@ void daShyGuy::updateModelMatrices() {
}
if (this->timer > 600) {
- doStateChange(&StateID_Recover)
+ doStateChange(&StateID_Recover);
}
this->timer += 1;