1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-02-23 15:55:47 +00:00

rematch EnGo2_UpdateTalking a bit

This commit is contained in:
feacur 2024-11-13 12:25:22 +01:00
parent da79fb473f
commit 1c416becd6

View file

@ -843,12 +843,21 @@ s16 EnGo2_UpdateTalkState(PlayState* play, Actor* thisx) {
}
s32 EnGo2_UpdateTalking(EnGo2* this, PlayState* play) {
if (ENGO2_GET_TYPE(this) != GORON_DMT_BIGGORON && ENGO2_GET_TYPE(this) != GORON_CITY_ROLLING_BIG) {
return Npc_UpdateTalking(play, &this->actor, &this->interactInfo.talkState, this->interactRange,
EnGo2_GetTextId, EnGo2_UpdateTalkState);
} else if ((ENGO2_GET_TYPE(this) == GORON_DMT_BIGGORON) && !(this->collider.base.ocFlags2 & OC2_HIT_PLAYER)) {
// default:
if (ENGO2_GET_TYPE(this) != GORON_DMT_BIGGORON) {
if (ENGO2_GET_TYPE(this) != GORON_CITY_ROLLING_BIG) {
return Npc_UpdateTalking(play, &this->actor, &this->interactInfo.talkState, this->interactRange,
EnGo2_GetTextId, EnGo2_UpdateTalkState);
}
}
// `GORON_DMT_BIGGORON`, attention wasn't drawn
if ((ENGO2_GET_TYPE(this) == GORON_DMT_BIGGORON) && !(this->collider.base.ocFlags2 & OC2_HIT_PLAYER)) {
return false;
} else {
}
// `GORON_DMT_BIGGORON` || `GORON_CITY_ROLLING_BIG`
{
if (Actor_TalkOfferAccepted(&this->actor, play)) {
this->interactInfo.talkState = NPC_TALK_STATE_TALKING;
return true;
@ -1830,7 +1839,7 @@ void EnGo2_HandleOffer(EnGo2* this, PlayState* play) {
#endif
this->actionFunc = EnGo2_HandleOfferParented;
} else {
// @redundant: this action is always paired with `EnGo2_OfferItem`, which itself calls Actor_OfferGetItem
// @redundant: this action is always paired with `EnGo2_OfferItem`, which itself calls `Actor_OfferGetItem`
Actor_OfferGetItem(&this->actor, play, this->getItemId, this->actor.xzDistToPlayer + 1.0f,
fabsf(this->actor.yDistToPlayer) + 1.0f);
}