diff --git a/include/d/actor/d_a_obj_stone.h b/include/d/actor/d_a_obj_stone.h index bad3bb5d611..b5f4da8c391 100644 --- a/include/d/actor/d_a_obj_stone.h +++ b/include/d/actor/d_a_obj_stone.h @@ -81,7 +81,7 @@ private: /* 0x094E */ bool mIsInWater; /* 0x094F */ u8 field_0x094f; /* 0x0950 */ u8 field_0x0950; - /* 0x0951 */ u8 field_0x0951; + /* 0x0951 */ bool field_0x0951; /* 0x0954 */ u32 field_0x0954; /* 0x0954 */ u32 field_0x0958; /* 0x0954 */ u32 field_0x095c; diff --git a/src/d/actor/d_a_mg_fish.cpp b/src/d/actor/d_a_mg_fish.cpp index c5ed70b7402..b23eeba7096 100644 --- a/src/d/actor/d_a_mg_fish.cpp +++ b/src/d/actor/d_a_mg_fish.cpp @@ -1039,7 +1039,7 @@ static void mf_away(mg_fish_class* i_this) { break; case 5: if (i_this->mGedouKind < GEDOU_KIND_BG) { - if ((i_this->mAcch.m_flags & (1 << 4)) != 0) { + if (i_this->mAcch.ChkWallHit()) { if (i_this->field_0x624[1] == 0) { i_this->mActionPhase = 0; i_this->field_0x624[1] = 40; @@ -1982,7 +1982,7 @@ static void mf_jump(mg_fish_class* i_this) { i_this->mMaxStep = 0x600; i_this->actor.current.pos += i_this->field_0x5e0; i_this->field_0x5e0.y = i_this->field_0x5e0.y - 2.0f; - if ((i_this->mAcch.m_flags & 0x20) != 0) { + if (i_this->mAcch.ChkGroundHit()) { i_this->actor.current.pos.x = i_this->actor.old.pos.x; i_this->actor.current.pos.y = i_this->actor.old.pos.y; i_this->actor.current.pos.z = i_this->actor.old.pos.z; diff --git a/src/d/actor/d_a_obj_lbox.cpp b/src/d/actor/d_a_obj_lbox.cpp index 8f23621e2cb..7f6b5e44a15 100644 --- a/src/d/actor/d_a_obj_lbox.cpp +++ b/src/d/actor/d_a_obj_lbox.cpp @@ -52,7 +52,7 @@ static void action(obj_lbox_class* i_this) { i_this->speed.y -= 0.1f; } i_this->current.pos.y += i_this->speed.y; - if (i_this->mObjAcch.m_flags & 0x20) { + if (i_this->mObjAcch.ChkGroundHit()) { dComIfGp_getVibration().StartShock(5, 15, cXyz(0.0f, 1.0f, 0.0f)); fopAcM_seStart(i_this, Z2SE_EN_FM_FOOTNOTE, 0); i_this->field_0x57a = 2; diff --git a/src/d/actor/d_a_obj_stone.cpp b/src/d/actor/d_a_obj_stone.cpp index 36ff9973b66..62a384c52dd 100644 --- a/src/d/actor/d_a_obj_stone.cpp +++ b/src/d/actor/d_a_obj_stone.cpp @@ -318,11 +318,11 @@ void daObjStone_c::mode_proc_call() { if (mCollider.ChkAtHit()) { init_modeBreak(); } - bool isGroundLanding = mChkObj.ChkGroundLanding() != 0; - u32 isWallhit = mChkObj.m_flags & dBgS_Acch::WALL_HIT; - bool isGroundHit = mChkObj.ChkGroundHit() != 0; - bool isWaterHit = mChkObj.ChkWaterHit() != 0; - bool isWaterIn = mChkObj.ChkWaterIn() != 0; + bool isGroundLanding = mChkObj.ChkGroundLanding(); + u32 isWallhit = mChkObj.ChkWallHit(); + bool isGroundHit = mChkObj.ChkGroundHit(); + bool isWaterHit = mChkObj.ChkWaterHit(); + bool isWaterIn = mChkObj.ChkWaterIn(); if (field_0x0907 == 1) { if (isGroundLanding && !isWaterIn) { speed.x = speedF * cM_ssin(current.angle.y); @@ -336,7 +336,7 @@ void daObjStone_c::mode_proc_call() { speedF = speed.absXZ(); current.angle.y = cM_atan2s(speed.x, speed.z); } else { - if (isWallhit && field_0x0951 == 0 && isWaterIn) { + if (isWallhit && !field_0x0951 && isWaterIn) { speed.x = speedF * cM_ssin(current.angle.y); speed.z = speedF * cM_scos(current.angle.y); speed.y = mLastSpeedY; @@ -489,7 +489,7 @@ void daObjStone_c::mode_proc_call() { } (this->*(l_func[field_0x0907]))(); CrrPos(); - field_0x0951 = isWallhit != 0; + field_0x0951 = isWallhit; } void daObjStone_c::init_modePutWait() { diff --git a/src/d/actor/d_a_obj_zrTuraraRock.cpp b/src/d/actor/d_a_obj_zrTuraraRock.cpp index 538227d5395..98eb4d4ace4 100644 --- a/src/d/actor/d_a_obj_zrTuraraRock.cpp +++ b/src/d/actor/d_a_obj_zrTuraraRock.cpp @@ -125,8 +125,8 @@ void daZrTuraRc_c::modeDrop() { } void daZrTuraRc_c::bgCheck() { - // this should be ChkGroundHit but that doesn't match - if (mAcch.m_flags >> 5 & 1) { + bool r31 = mAcch.ChkGroundHit(); + if (r31) { init_modeDropEnd(); } }