1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-19 13:35:18 +00:00

Document Actor "OfferTalk" (#1567)

* OfferTalk

* rm comment

* exch to offer in comment

* reword again

* Partial PR Review

* Actor_AcknowledgeTalking

* Actor_TalkOfferAccepted

* PR Review

* rm part of comment

* rm comment
This commit is contained in:
engineer124 2023-11-20 03:11:59 +11:00 committed by GitHub
parent c11ce9c994
commit 3d1ee33d7b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
74 changed files with 297 additions and 266 deletions

View file

@ -812,7 +812,7 @@ s16 EnGo2_UpdateTalkState(PlayState* play, Actor* thisx) {
return EnGo2_UpdateTalkStateGoronMarketBazaar(play, this);
}
#ifdef AVOID_UB
// The v0 register isn't set in this function, the last value in v0 is the return value of Actor_ProcessTalkRequest
// The v0 register isn't set in this function, the last value in v0 is the return value of Actor_TalkOfferAccepted
// called in the function below, which must be false for this function to be called
return false;
#endif
@ -826,13 +826,13 @@ s32 func_80A44790(EnGo2* this, PlayState* play) {
!(this->collider.base.ocFlags2 & OC2_HIT_PLAYER)) {
return false;
} else {
if (Actor_ProcessTalkRequest(&this->actor, play)) {
if (Actor_TalkOfferAccepted(&this->actor, play)) {
this->interactInfo.talkState = NPC_TALK_STATE_TALKING;
return true;
} else if (this->interactInfo.talkState != NPC_TALK_STATE_IDLE) {
this->interactInfo.talkState = EnGo2_UpdateTalkState(play, &this->actor);
return false;
} else if (func_8002F2CC(&this->actor, play, this->interactRange)) {
} else if (Actor_OfferTalk(&this->actor, play, this->interactRange)) {
this->actor.textId = EnGo2_GetTextId(play, &this->actor);
}
return false;