diff options
author | Stephen Simpson <megazig@gmail.com> | 2011-10-21 19:19:33 -0500 |
---|---|---|
committer | Stephen Simpson <megazig@gmail.com> | 2011-10-21 19:19:33 -0500 |
commit | 525bae5bd538b29466fe4ad68bf5a125581a9f3b (patch) | |
tree | d1003337d5029bac034164b7332eca54c9c48c07 | |
parent | faf27aeb8423c2567f27bb6d86328d677ad317ab (diff) | |
download | kamek-525bae5bd538b29466fe4ad68bf5a125581a9f3b.tar.gz kamek-525bae5bd538b29466fe4ad68bf5a125581a9f3b.zip |
Cleaned up wall detection
Diffstat (limited to '')
-rw-r--r-- | src/bossMegaGoomba.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/bossMegaGoomba.cpp b/src/bossMegaGoomba.cpp index 00a8119..d70f6cd 100644 --- a/src/bossMegaGoomba.cpp +++ b/src/bossMegaGoomba.cpp @@ -625,6 +625,7 @@ void daMegaGoomba_c::endState_Turn() { void daMegaGoomba_c::beginState_Walk() { //inline this piece of code this->direction = dSprite_c__getXDirectionOfFurthestPlayerRelativeToVEC3(this, this->pos); + OSReport("Direction: %d\n", this->direction); this->speed.x = this->speed.z = 0.0; this->max_speed.x = (this->direction) ? -this->XSpeed : this->XSpeed; this->speed.y = -4.0; @@ -650,6 +651,11 @@ void daMegaGoomba_c::executeState_Walk() { this->doStateChange(&StateID_Turn); //this->acState.setField10ToOne(); } + u32 bitfield2 = *(u32*)(this->classAt1EC+0xb0+(4-(this->direction*4))); + if(bitfield2) { + OSReport("Found wall: %08x\n", bitfield2); + this->doStateChange(&StateID_Turn); + } DoStuffAndMarkDead(this, this->pos, 1.0); if(this->animationChr.isAnimationDone()) { |