diff options
| author | nachodiazr <nachodiazr@gmail.com> | 2026-10-15 00:34:09 -0300 |
|---|---|---|
| committer | nachodiazr <nachodiazr@gmail.com> | 2026-10-15 00:34:09 -0300 |
| commit | 8a7cef18828eb671ac280e88b7feee093a0e20ce (patch) | |
| tree | 16b156d1bce9207004c2a7171671dd6073a57c85 /src | |
| parent | a84c13a4bb5a6122c3e5caf0dcec850b72a9ef8a (diff) | |
Match d_t_beetle (100%)
Diffstat (limited to 'src')
| -rw-r--r-- | src/REL/d/t/d_t_beetle.cpp | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/src/REL/d/t/d_t_beetle.cpp b/src/REL/d/t/d_t_beetle.cpp index cc0c305c..9c7db784 100644 --- a/src/REL/d/t/d_t_beetle.cpp +++ b/src/REL/d/t/d_t_beetle.cpp @@ -10,6 +10,8 @@ SPECIAL_ACTOR_PROFILE(BEETLE_TAG, dTgBeetle_c, fProfile::BEETLE_TAG, 0x297, 0, 0); +extern "C" const f32 lbl_302_rodata_0 = 0.0f; + int dTgBeetle_c::create() { if (dScGame_c::currentSpawnInfo.stageName == "F103") { // flooded faron woods if (mActorSubtype) { @@ -37,7 +39,7 @@ int dTgBeetle_c::create() { mZoneShape = SphereShape; } } - matrixCreateFromPosRotYScale(mMatrix1, mPosition, mRotation.y, mScale, nullptr, 0); + matrixCreateFromPosRotYScale(mMatrix1, mPosition, mRotation.y, mScale, nullptr, 0.0f); return SUCCEEDED; } } @@ -48,7 +50,7 @@ int dTgBeetle_c::doDelete() { int dTgBeetle_c::actorExecute() { if (mPastOnly == 1 && !mActorSubtype) { - if (dTimeAreaMgr_c::GetInstance()->checkPositionIsInPastState(mRoomID, mPosition, nullptr, 1.0f) == 0) { + if (dTimeAreaMgr_c::GetInstance()->checkPositionIsInPastState(mRoomID, mPosition, nullptr, 1.0f) == 0.0f) { return SUCCEEDED; } } @@ -75,17 +77,8 @@ int dTgBeetle_c::actorExecute() { return SUCCEEDED; } -u32 dTgBeetle_c::isWithinSphere( - const mVec3_c &position -) const { // fn_302_520 is position within a sphere the size of the zone - - mVec3_c diff = position - (mPosition + mScale.y * mVec3_c::Ey * 1.0f); - - diff.x /= mScale.x; - diff.y /= mScale.y; - diff.z /= mScale.z; - - return diff.mag() <= 1.0f; // is beetle within a certain distance from center +int dTgBeetle_c::draw() { + return SUCCEEDED; } u32 dTgBeetle_c::isWithinCylinder( @@ -101,7 +94,7 @@ u32 dTgBeetle_c::isWithinCylinder( diff.y /= mScale.y; diff.z /= mScale.z; - if (diff.absXZ() <= 0.01f && diff.y <= 0.5f) { + if (diff.absXZ() <= 1.0f && diff.y <= 0.5f) { returnCheck = 1; } @@ -112,6 +105,19 @@ u32 dTgBeetle_c::isWithinCylinder( return returnValue; } +u32 dTgBeetle_c::isWithinSphere( + const mVec3_c &position +) const { // fn_302_520 is position within a sphere the size of the zone + + mVec3_c diff = position - (mPosition + mScale.y * mVec3_c::Ey * 1.0f); + + diff.x /= mScale.x; + diff.y /= mScale.y; + diff.z /= mScale.z; + + return diff.mag() <= 1.0f; // is beetle within a certain distance from center +} + void dTgBeetle_c::updateBeetle(dAcBoomerang_c &boomerang) { // fn_302_620 update beetle based on zone type if (mZoneType == LeafZone) { // leaf zone return boomerang.setField_0x8CC(0x20); @@ -123,7 +129,3 @@ void dTgBeetle_c::updateBeetle(dAcBoomerang_c &boomerang) { // fn_302_620 update return boomerang.setRemainingFlightTime(-1); } } - -int dTgBeetle_c::draw() { - return SUCCEEDED; -} |
