summaryrefslogtreecommitdiff
path: root/src/shyguy.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/shyguy.cpp')
-rw-r--r--src/shyguy.cpp30
1 files changed, 7 insertions, 23 deletions
diff --git a/src/shyguy.cpp b/src/shyguy.cpp
index 36072b8..d09edb2 100644
--- a/src/shyguy.cpp
+++ b/src/shyguy.cpp
@@ -226,6 +226,7 @@ daShyGuy *daShyGuy::build() {
if(hitType == 1) { // regular jump
apOther->someFlagByte |= 2;
if (this->isDown == 0) {
+ this->playEnemyDownSound1();
doStateChange(stateVar);
}
else { // Shy Guy is in throwy mode - kill it with fire
@@ -235,6 +236,7 @@ daShyGuy *daShyGuy::build() {
else if(hitType == 3) { // spinning jump or whatever?
apOther->someFlagByte |= 2;
if (this->isDown == 0) {
+ this->playEnemyDownSound1();
doStateChange(stateVar);
}
else { // Shy Guy is in throwy mode - kill it with fire
@@ -614,6 +616,7 @@ int daShyGuy::onCreate() {
// State Changers
if (type == 0) {
+ bindAnimChr_and_setUpdateRate("c18_EV_WIN_2_R", 1, 0.0, 1.5);
doStateChange(&StateID_RealWalk);
}
else if (type == 1) {
@@ -666,6 +669,7 @@ int daShyGuy::onCreate() {
doStateChange(&StateID_Balloon_C);
}
else if (type == 9) {
+ bindAnimChr_and_setUpdateRate("c18_EV_WIN_2_R", 1, 0.0, 1.5);
doStateChange(&StateID_RealWalk);
}
else if (type == 10) {
@@ -1174,7 +1178,6 @@ void daShyGuy::updateModelMatrices() {
///////////////
void daShyGuy::beginState_RealWalk() {
//inline this piece of code
- bindAnimChr_and_setUpdateRate("c18_EV_WIN_2_R", 1, 0.0, 1.5);
this->max_speed.x = (this->direction) ? -this->XSpeed : this->XSpeed;
this->speed.x = (direction) ? -0.8f : 0.8f;
@@ -1199,7 +1202,6 @@ void daShyGuy::updateModelMatrices() {
// Real Turn State
///////////////
void daShyGuy::beginState_RealTurn() {
- bindAnimChr_and_setUpdateRate("c18_IDLE_R", 1, 0.0, 1.0);
this->direction ^= 1;
this->speed.x = 0.0;
@@ -1341,27 +1343,8 @@ void daShyGuy::updateModelMatrices() {
// move backwards here
if(this->chrAnimation.isAnimationDone()) {
- if (type == 0) {
- doStateChange(&StateID_RealWalk);
- }
- else if (type == 1) {
- doStateChange(&StateID_Walk);
- }
- else if (type == 2) {
- doStateChange(&StateID_RealWalk);
- }
- else if (type == 3) {
- doStateChange(&StateID_Jump);
- }
- else if (type == 4) {
- doStateChange(&StateID_Judo);
- }
- else if (type == 5) {
- doStateChange(&StateID_Spike);
- }
- else {
- doStateChange(&StateID_RealWalk);
- }
+ bindAnimChr_and_setUpdateRate("c18_EV_WIN_2_R", 1, 0.0, 1.5);
+ doStateChange(&StateID_RealWalk);
}
}
void daShyGuy::endState_FireKnockBack() {
@@ -1403,6 +1386,7 @@ void daShyGuy::updateModelMatrices() {
calculateTileCollisions();
if(this->chrAnimation.isAnimationDone()) {
+ bindAnimChr_and_setUpdateRate("c18_EV_WIN_2_R", 1, 0.0, 1.5);
doStateChange(&StateID_RealWalk);
}
}