From 8ae0dde480433a9c1a01935a3a64fd6e8fff2f99 Mon Sep 17 00:00:00 2001 From: Treeki Date: Fri, 8 Feb 2013 23:19:12 +0100 Subject: fuzzy fuzzed up a bit --- src/bossFuzzyBear.cpp | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/src/bossFuzzyBear.cpp b/src/bossFuzzyBear.cpp index 67fbd6e..3f66c41 100644 --- a/src/bossFuzzyBear.cpp +++ b/src/bossFuzzyBear.cpp @@ -56,7 +56,7 @@ class daFuzzyBear_c : public daBoss { DECLARE_STATE(Grow); DECLARE_STATE(Bounce); // DECLARE_STATE(Needles); - DECLARE_STATE(Spray); + //DECLARE_STATE(Spray); DECLARE_STATE(RolyPoly); DECLARE_STATE(Wait); DECLARE_STATE(Outro); @@ -72,7 +72,7 @@ daFuzzyBear_c *daFuzzyBear_c::build() { CREATE_STATE(daFuzzyBear_c, Grow); CREATE_STATE(daFuzzyBear_c, Bounce); // CREATE_STATE(daFuzzyBear_c, Needles); -CREATE_STATE(daFuzzyBear_c, Spray); +//CREATE_STATE(daFuzzyBear_c, Spray); CREATE_STATE(daFuzzyBear_c, RolyPoly); CREATE_STATE(daFuzzyBear_c, Wait); CREATE_STATE(daFuzzyBear_c, Outro); @@ -119,6 +119,15 @@ bool daFuzzyBear_c::collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhy dActor_c *block = apOther->owner; dEn_c *blah = (dEn_c*)block; + //OSReport("Fuzzy was hit by an actor %d (%p); its field 12C is %x\n", block->name, block, blah->_12C); + if (block->name == AC_LIGHT_BLOCK) { + //OSReport("It's a light block, and its state is %s\n", blah->acState.getCurrentState()->getName()); + if (blah->_12C & 3 || strcmp(blah->acState.getCurrentState()->getName(), "daLightBlock_c::StateID_Throw")) { + //OSReport("Ignoring this!\n"); + return true; + } + } + if (blah->direction == 0) { blah->direction = 1; this->roly = 1; } else { blah->direction = 0; this->roly = 0; } @@ -526,7 +535,7 @@ void daFuzzyBear_c::endState_Bounce() { } // Spray State - jumps in the air and shakes out some small fuzzies -void daFuzzyBear_c::beginState_Spray() { +/*void daFuzzyBear_c::beginState_Spray() { this->timer = 0; this->speed.y = 7.0; this->speed.x = 0.0; @@ -577,7 +586,7 @@ void daFuzzyBear_c::endState_Spray() { this->rot.y = 0; this->timer = 20; this->falldown = 1; -} +}*/ // Roly Poly State - Rolls from left to right, bounces off both walls, and returns to original position. @@ -623,9 +632,9 @@ void daFuzzyBear_c::executeState_RolyPoly() { } if (this->direction == 0) { // is even - this->pos.x = this->pos.x - 4.0; } + this->pos.x = this->pos.x - 3.0; } else { // is odd - this->pos.x = this->pos.x + 4.0; } + this->pos.x = this->pos.x + 3.0; } if (BigBossFuzzyBear == 0) { wallDistance = 38.0; @@ -685,10 +694,11 @@ void daFuzzyBear_c::executeState_Wait() { this->timer = this->timer + 1; if (this->timer > 60) { - int randChoice; + doStateChange(&StateID_Bounce); + //int randChoice; - if (BigBossFuzzyBear == 1) { doStateChange(&StateID_Spray); } - else { doStateChange(&StateID_Bounce); } + //if (BigBossFuzzyBear == 1) { doStateChange(&StateID_Spray); } + //else { doStateChange(&StateID_Bounce); } } } void daFuzzyBear_c::endState_Wait() { } -- cgit v1.2.3