From 525bae5bd538b29466fe4ad68bf5a125581a9f3b Mon Sep 17 00:00:00 2001 From: Stephen Simpson Date: Fri, 21 Oct 2011 19:19:33 -0500 Subject: Cleaned up wall detection --- src/bossMegaGoomba.cpp | 6 ++++++ 1 file changed, 6 insertions(+) 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()) { -- cgit v1.2.3