From 1fa1922a9baf4899391b21bfa632709a42f2fc0c Mon Sep 17 00:00:00 2001 From: feacur Date: Thu, 14 Nov 2024 01:10:38 +0100 Subject: [PATCH] tweak `EnGo2_UpdateTalking` code and comments https://github.com/zeldaret/oot/pull/2295#discussion_r1841205108 https://github.com/zeldaret/oot/pull/2295#discussion_r1841210644 https://github.com/zeldaret/oot/pull/2295#discussion_r1841256344 https://github.com/zeldaret/oot/pull/2295#discussion_r1841268480 --- src/overlays/actors/ovl_En_Go2/z_en_go2.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/src/overlays/actors/ovl_En_Go2/z_en_go2.c b/src/overlays/actors/ovl_En_Go2/z_en_go2.c index 1397ccd2b8..22c1df61b1 100644 --- a/src/overlays/actors/ovl_En_Go2/z_en_go2.c +++ b/src/overlays/actors/ovl_En_Go2/z_en_go2.c @@ -843,22 +843,17 @@ s16 EnGo2_UpdateTalkState(PlayState* play, Actor* thisx) { } s32 EnGo2_UpdateTalking(EnGo2* this, PlayState* play) { - // default: - if (ENGO2_GET_TYPE(this) != GORON_DMT_BIGGORON) { - if (ENGO2_GET_TYPE(this) != GORON_CITY_HOT_RODDER) { - return Npc_UpdateTalking(play, &this->actor, &this->interactInfo.talkState, this->interactRange, - EnGo2_GetTextId, EnGo2_UpdateTalkState); - } + if (ENGO2_GET_TYPE(this) != GORON_DMT_BIGGORON && ENGO2_GET_TYPE(this) != GORON_CITY_HOT_RODDER) { + return Npc_UpdateTalking(play, &this->actor, &this->interactInfo.talkState, this->interactRange, + EnGo2_GetTextId, EnGo2_UpdateTalkState); } - // `GORON_DMT_BIGGORON`, close enough; see `EnGo2_IsInRange` - if (ENGO2_GET_TYPE(this) == GORON_DMT_BIGGORON) { - if (!(this->collider.base.ocFlags2 & OC2_HIT_PLAYER)) { - return false; - } + // Biggoron is close enough; see `EnGo2_IsInRange` + if (ENGO2_GET_TYPE(this) == GORON_DMT_BIGGORON && !(this->collider.base.ocFlags2 & OC2_HIT_PLAYER)) { + return false; } - // `GORON_DMT_BIGGORON` || `GORON_CITY_HOT_RODDER` + // dialog with Biggoron or Hot Rodder { if (Actor_TalkOfferAccepted(&this->actor, play)) { this->interactInfo.talkState = NPC_TALK_STATE_TALKING;