summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2013-01-13 22:09:05 +0100
committerTreeki <treeki@gmail.com>2013-01-13 22:09:05 +0100
commit9a2d38b4a90ad6cba22a48b8b79e308fb3531b20 (patch)
tree5d190e46d8fffd5508f9c8afa21088f8f191f492
parentd580364e7354d2c8c19d66d08515c905aac9581e (diff)
downloadkamek-9a2d38b4a90ad6cba22a48b8b79e308fb3531b20.tar.gz
kamek-9a2d38b4a90ad6cba22a48b8b79e308fb3531b20.zip
various shyguy fixes
-rw-r--r--src/shyguy.cpp44
1 files changed, 33 insertions, 11 deletions
diff --git a/src/shyguy.cpp b/src/shyguy.cpp
index 67662fa..8981d60 100644
--- a/src/shyguy.cpp
+++ b/src/shyguy.cpp
@@ -240,6 +240,7 @@ daShyGuy *daShyGuy::build() {
if (this->isDown == 0) {
this->playEnemyDownSound1();
doStateChange(stateVar);
+ damage++;
}
else { // Shy Guy is in throwy mode - kill it with fire
this->playEnemyDownSound1();
@@ -251,6 +252,7 @@ daShyGuy *daShyGuy::build() {
if (this->isDown == 0) {
this->playEnemyDownSound1();
doStateChange(stateVar);
+ damage++;
}
else { // Shy Guy is in throwy mode - kill it with fire
this->playEnemyDownSound1();
@@ -264,7 +266,9 @@ daShyGuy *daShyGuy::build() {
// else if(hitType == 2) { \\ Minimario? }
}
- void daShyGuy::yoshiCollision(ActivePhysics *apThis, ActivePhysics *apOther) { this->playerCollision(apThis, apOther); }
+ void daShyGuy::yoshiCollision(ActivePhysics *apThis, ActivePhysics *apOther) {
+ this->playerCollision(apThis, apOther);
+ }
void daShyGuy::collisionCatD_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) {
PlaySound(this, SE_EMY_DOWN);
SpawnEffect("Wm_mr_hardhit", 0, &pos, &(S16Vec){0,0,0}, &(Vec){1.0, 1.0, 1.0});
@@ -273,22 +277,36 @@ daShyGuy *daShyGuy::build() {
// this->addScoreWhenHit(this);
doStateChange(&StateID_Die);
}
- void daShyGuy::collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) { this->collisionCatD_GroundPound(apThis, apOther); }
- void daShyGuy::collisionCat7_GroundPoundYoshi(ActivePhysics *apThis, ActivePhysics *apOther) { this->collisionCatD_GroundPound(apThis, apOther); }
+ void daShyGuy::collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) {
+ this->collisionCatD_GroundPound(apThis, apOther);
+ }
+ void daShyGuy::collisionCat7_GroundPoundYoshi(ActivePhysics *apThis, ActivePhysics *apOther) {
+ this->collisionCatD_GroundPound(apThis, apOther);
+ }
void daShyGuy::collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther) {
this->collisionCatD_GroundPound(apThis, apOther);
}
- void daShyGuy::collisionCatA_PenguinMario(ActivePhysics *apThis, ActivePhysics *apOther){ this->collisionCatD_GroundPound(apThis, apOther); }
- void daShyGuy::collisionCat5_Mario(ActivePhysics *apThis, ActivePhysics *apOther){ this->collisionCatD_GroundPound(apThis, apOther); }
- void daShyGuy::collisionCat11_PipeCannon(ActivePhysics *apThis, ActivePhysics *apOther){ this->collisionCatD_GroundPound(apThis, apOther); }
- void daShyGuy::collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther) { this->collisionCatD_GroundPound(apThis, apOther); }
+ void daShyGuy::collisionCatA_PenguinMario(ActivePhysics *apThis, ActivePhysics *apOther){
+ this->collisionCatD_GroundPound(apThis, apOther);
+ }
+ void daShyGuy::collisionCat5_Mario(ActivePhysics *apThis, ActivePhysics *apOther){
+ this->collisionCatD_GroundPound(apThis, apOther);
+ }
+ void daShyGuy::collisionCat11_PipeCannon(ActivePhysics *apThis, ActivePhysics *apOther){
+ this->collisionCatD_GroundPound(apThis, apOther);
+ }
+ void daShyGuy::collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther) {
+ this->collisionCatD_GroundPound(apThis, apOther);
+ }
void daShyGuy::collisionCat3_StarPower(ActivePhysics *apThis, ActivePhysics *apOther){
dEn_c::collisionCat3_StarPower(apThis, apOther);
doStateChange(&StateID_Die);
}
- void daShyGuy::collisionCat14_YoshiFire(ActivePhysics *apThis, ActivePhysics *apOther){ doStateChange(&StateID_DieSmoke); }
+ void daShyGuy::collisionCat14_YoshiFire(ActivePhysics *apThis, ActivePhysics *apOther){
+ doStateChange(&StateID_DieSmoke);
+ }
void daShyGuy::collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther) {
this->damage += 1;
@@ -297,7 +315,7 @@ daShyGuy *daShyGuy::build() {
if (this->type < 6) { // Regular Shy Guys Except Jumper
- backFire = apOther->owner->direction;
+ backFire = apOther->owner->direction ^ 1;
if (this->isDown == 0) {
stateVar = &StateID_FireKnockBack;
@@ -311,7 +329,7 @@ daShyGuy *daShyGuy::build() {
stateVar = &StateID_FlameHit;
}
- if (this->damage > 2) {
+ if (this->damage > 1) {
doStateChange(&StateID_DieSmoke);
this->_vf14C();
}
@@ -1232,6 +1250,7 @@ void daShyGuy::updateModelMatrices() {
if (this->timer > 600) {
doStateChange(&StateID_Recover);
+ damage = 0;
}
this->timer += 1;
@@ -1311,7 +1330,10 @@ void daShyGuy::updateModelMatrices() {
// Backfire 1 == Fireball to the left
directionStore = this->direction;
- this->speed.x = (this->backFire) ? this->XSpeed : -this->XSpeed;
+ speed.x = (this->backFire) ? this->XSpeed : -this->XSpeed;
+ speed.x *= 1.2f;
+ max_speed.x = speed.x;
+ x_speed_inc = 0.0f;
}
void daShyGuy::executeState_FireKnockBack() {