diff options
author | Colin Noga <Tempus@chronometry.ca> | 2012-03-14 20:47:56 -0500 |
---|---|---|
committer | Colin Noga <Tempus@chronometry.ca> | 2012-03-14 20:47:56 -0500 |
commit | 18a6c3dbe01f484b346923ebc53f674c1e4a5101 (patch) | |
tree | da4b51a8a35de418128adb6c1c775dea4f6b6367 | |
parent | c50be3fc02212aab84a9687f05b1ed5aa5695c78 (diff) | |
download | kamek-18a6c3dbe01f484b346923ebc53f674c1e4a5101.tar.gz kamek-18a6c3dbe01f484b346923ebc53f674c1e4a5101.zip |
commit junk
-rw-r--r-- | NewerProject.yaml | 1 | ||||
-rw-r--r-- | src/shyguy.cpp | 20 |
2 files changed, 19 insertions, 2 deletions
diff --git a/NewerProject.yaml b/NewerProject.yaml index d92577c..c8b836a 100644 --- a/NewerProject.yaml +++ b/NewerProject.yaml @@ -40,6 +40,7 @@ modules: - processed/bossWrenchThrow.yaml - processed/bossPodouble.yaml - processed/bossTopman.yaml + - processed/bossCaptainBowser.yaml - processed/effectVideo.yaml - processed/fakeStarCoin.yaml - processed/shyguy.yaml diff --git a/src/shyguy.cpp b/src/shyguy.cpp index ef807f0..34de1d9 100644 --- a/src/shyguy.cpp +++ b/src/shyguy.cpp @@ -65,6 +65,7 @@ class daShyGuy : public dEn_c { u32 cmgr_returnValue; bool isBouncing; float balloonSize; + char backFire; char spikeTurn; dStageActor_c *spikeA; dStageActor_c *spikeB; @@ -292,7 +293,19 @@ daShyGuy *daShyGuy::build() { dStateBase_c *stateVar; if (this->type < 6) { // Regular Shy Guys Except Jumper - stateVar = &StateID_FireKnockBack; + char FirePos; + + if (this->pos.x < apOther->owner->pos.x) { FirePos = 0; } // Fire is to the right + else { FirePos = 1; } // Fire is to the left + + + if (this->direction != FirePos) { // Fire is from behind + this->backFire = 1; + stateVar = &StateID_FireKnockBack; + } + else { + stateVar = &StateID_FireKnockBack; + } } else if (this->type > 8) { // Giants return; @@ -1328,7 +1341,10 @@ void daShyGuy::updateModelMatrices() { /////////////// void daShyGuy::beginState_FireKnockBack() { bindAnimChr_and_setUpdateRate("c18_C_BLOCK_BREAK_R", 1, 0.0, 1.0); - this->direction ^= 1; + + if (this->backFire == 0) { this->direction ^= 1; } + else { this->backFire = 0; } + this->speed.x = (this->direction) ? -this->XSpeed / 6.0f : this->XSpeed / 6.0f; } void daShyGuy::executeState_FireKnockBack() { |