diff --git a/include/d/t/d_t_insect.h b/include/d/t/d_t_insect.h index 57660447..664478d2 100644 --- a/include/d/t/d_t_insect.h +++ b/include/d/t/d_t_insect.h @@ -87,31 +87,13 @@ private: return isSubtype(10); } bool isTrialGateType() const { - if (getSubtype() != SUBTYPE_BUTTERFLY) { - return false; - } - if (getSpawnSubtype() != SPAWN_TRIAL_GATE) { - return false; - } - return true; + return getSubtype() != SUBTYPE_BUTTERFLY ? false : getSpawnSubtype() == SPAWN_TRIAL_GATE; } bool isGossipStoneType() const { - if (!isButterfly()) { - return false; - } - if (!isSpawnSubtype(SPAWN_GOSSIP_STONE)) { - return false; - } - return true; + return getSubtype() != SUBTYPE_BUTTERFLY ? false : getSpawnSubtype() == SPAWN_GOSSIP_STONE; } bool isGoddessWallType() const { - if (!isButterfly()) { - return false; - } - if (!isSpawnSubtype(SPAWN_GODDESS_WALL)) { - return false; - } - return true; + return getSubtype() != SUBTYPE_BUTTERFLY ? false : getSpawnSubtype() == SPAWN_GODDESS_WALL; } f32 getOriginalScaleX() const { return 100 * mScale.x; diff --git a/src/REL/d/t/d_t_insect.cpp b/src/REL/d/t/d_t_insect.cpp index 5976220f..9b29bd9e 100644 --- a/src/REL/d/t/d_t_insect.cpp +++ b/src/REL/d/t/d_t_insect.cpp @@ -45,7 +45,6 @@ const s32 *useUnused() { return unused; } -// non matching int dTgInsect_c::actorCreate() { if (getSubtype() == 0) { return FAILED; @@ -67,8 +66,6 @@ int dTgInsect_c::actorCreate() { mScale *= 0.01f; mRevealed = 0; mRevealedSpawnPos = mPosition; - // non matching: load of 0 in r0 - // that is already 0 if (isTrialGateType() || isGossipStoneType() || isGoddessWallType() || isSpawnSubtype(SPAWN_BUG_MINIGAME)) { unk24E = 1; }