From d3c6836df7c37cab0451dc51f6e0124a1df6c94b Mon Sep 17 00:00:00 2001 From: adaliaramon <70635214+adaliaramon@users.noreply.github.com> Date: Tue, 4 Jul 2023 01:26:32 +0200 Subject: [PATCH] Removed unnecessarily duplicated variable (#1508) --- .../actors/ovl_Boss_Dodongo/z_boss_dodongo.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c b/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c index e22de53ac7..2cffd30c8e 100644 --- a/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c +++ b/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c @@ -1225,10 +1225,9 @@ void BossDodongo_SpawnFire(BossDodongo* this, PlayState* play, s16 params) { void BossDodongo_UpdateDamage(BossDodongo* this, PlayState* play) { s32 pad; - ColliderInfo* item1; + ColliderInfo* item; u8 swordDamage; s32 damage; - ColliderInfo* item2; s16 i; if ((this->health <= 0) && (this->actionFunc != BossDodongo_DeathCutscene)) { @@ -1241,10 +1240,9 @@ void BossDodongo_UpdateDamage(BossDodongo* this, PlayState* play) { if (this->actionFunc == BossDodongo_Inhale) { for (i = 0; i < 19; i++) { if (this->collider.elements[i].info.bumperFlags & BUMP_HIT) { - item1 = this->collider.elements[i].info.acHitInfo; - item2 = item1; + item = this->collider.elements[i].info.acHitInfo; - if ((item2->toucher.dmgFlags & DMG_BOOMERANG) || (item2->toucher.dmgFlags & DMG_SLINGSHOT)) { + if ((item->toucher.dmgFlags & DMG_BOOMERANG) || (item->toucher.dmgFlags & DMG_SLINGSHOT)) { this->collider.elements[i].info.bumperFlags &= ~BUMP_HIT; this->unk_1C0 = 2; BossDodongo_SetupWalk(this); @@ -1257,9 +1255,9 @@ void BossDodongo_UpdateDamage(BossDodongo* this, PlayState* play) { if (this->collider.elements->info.bumperFlags & BUMP_HIT) { this->collider.elements->info.bumperFlags &= ~BUMP_HIT; - item1 = this->collider.elements[0].info.acHitInfo; + item = this->collider.elements[0].info.acHitInfo; if ((this->actionFunc == BossDodongo_Vulnerable) || (this->actionFunc == BossDodongo_LayDown)) { - swordDamage = damage = CollisionCheck_GetSwordDamage(item1->toucher.dmgFlags); + swordDamage = damage = CollisionCheck_GetSwordDamage(item->toucher.dmgFlags); if (damage != 0) { Actor_PlaySfx(&this->actor, NA_SE_EN_DODO_K_DAMAGE);