summaryrefslogtreecommitdiff
path: root/src/shyguy.cpp
diff options
context:
space:
mode:
authorColin Noga <Tempus@chronometry.ca>2012-03-21 13:12:22 -0500
committerColin Noga <Tempus@chronometry.ca>2012-03-21 13:12:22 -0500
commit0dc4aae6128eb16acef1b6faeabcb546762ebe36 (patch)
tree6754bbf4c92ffc315d4978b95519492484c62963 /src/shyguy.cpp
parent800f3920d31c2562cc2f0af112c9efa5d5343d6e (diff)
downloadkamek-0dc4aae6128eb16acef1b6faeabcb546762ebe36.tar.gz
kamek-0dc4aae6128eb16acef1b6faeabcb546762ebe36.zip
more fixes
Diffstat (limited to 'src/shyguy.cpp')
-rw-r--r--src/shyguy.cpp22
1 files changed, 7 insertions, 15 deletions
diff --git a/src/shyguy.cpp b/src/shyguy.cpp
index 5679e49..f65ed17 100644
--- a/src/shyguy.cpp
+++ b/src/shyguy.cpp
@@ -295,19 +295,11 @@ daShyGuy *daShyGuy::build() {
dStateBase_c *stateVar;
if (this->type < 6) { // Regular Shy Guys Except Jumper
- 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->pos.x < apOther->owner->pos.x) { this->backFire = 0; } // Fire is to the right
+ else { this->backFire = 1; } // Fire is to the left
-
- if (this->direction != FirePos) { // Fire is from behind
- this->backFire = 1;
- stateVar = &StateID_FireKnockBack;
- }
- else {
- stateVar = &StateID_FireKnockBack;
- }
+ stateVar = &StateID_FireKnockBack;
}
else if (this->type > 8) { // Giants
return;
@@ -1338,10 +1330,10 @@ void daShyGuy::updateModelMatrices() {
void daShyGuy::beginState_FireKnockBack() {
bindAnimChr_and_setUpdateRate("c18_C_BLOCK_BREAK_R", 1, 0.0, 1.0);
- if (this->backFire == 0) { this->direction ^= 1; }
- else { this->backFire = 0; }
+ // if (this->backFire == 0) { this->direction ^= 1; }
+ // else { this->backFire = 0; }
- this->speed.x = (this->direction) ? -this->XSpeed / 6.0f : this->XSpeed / 6.0f;
+ this->speed.x = (this->backFire) ? this->XSpeed / 6.0f : -this->XSpeed / 6.0f;
}
void daShyGuy::executeState_FireKnockBack() {
@@ -1354,7 +1346,7 @@ void daShyGuy::updateModelMatrices() {
}
}
void daShyGuy::endState_FireKnockBack() {
- this->direction ^= 1;
+ // this->direction ^= 1;
speed.x = (direction) ? -1.0f : 1.0f;
this->max_speed.x = (direction) ? -this->XSpeed : this->XSpeed;
}