summaryrefslogtreecommitdiff
path: root/src/shyguy.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-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;
}