diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/shyguy.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/shyguy.cpp b/src/shyguy.cpp index 27c0d70..192ac7d 100644 --- a/src/shyguy.cpp +++ b/src/shyguy.cpp @@ -178,13 +178,20 @@ daShyGuy *daShyGuy::build() { // Collision Functions //////////////////////// +bool actorCanPopBalloon(dStageActor_c *ac) { + int n = ac->name; + return n == PLAYER || n == YOSHI || + n == PL_FIREBALL || n == ICEBALL || + n == YOSHI_FIRE || n == HAMMER; +} // Collision callback to help shy guy not die at inappropriate times and ruin the dinner void shyCollisionCallback(ActivePhysics *apThis, ActivePhysics *apOther) { int t = ((daShyGuy*)apThis->owner)->type; if (t == 6 || t == 7 || t == 8) { // Should I do something about ice blocks here? - ((daShyGuy*)apThis->owner)->popBalloon(); + if (actorCanPopBalloon(apOther->owner)) + ((daShyGuy*)apThis->owner)->popBalloon(); } if ((apOther->owner->name == 89) && (t == 5)) { return; } @@ -199,7 +206,8 @@ daShyGuy *daShyGuy::build() { void balloonSmack(ActivePhysics *apThis, ActivePhysics *apOther) { if (((daShyGuy*)apThis->owner)->frzMgr._mstate == 0) { - ((daShyGuy*)apThis->owner)->popBalloon(); + if (actorCanPopBalloon(apOther->owner)) + ((daShyGuy*)apThis->owner)->popBalloon(); } } |