1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-02-21 14:25:22 +00:00

Document EnGo .unk_212 as .attentionCooldown

This commit is contained in:
feacur 2024-11-10 23:03:16 +01:00
parent 87097be9ab
commit 9de2038db8
2 changed files with 7 additions and 7 deletions

View file

@ -823,13 +823,13 @@ void EnGo_WakeUp(EnGo* this, PlayState* play) {
this->skelAnime.curFrame = 12.0f;
this->skelAnime.playSpeed = 0.0f;
if (ENGO_GET_TYPE(this) != ENGO_TYPE_DMT_BIGGORON) {
this->unk_212 = 30;
this->attentionCooldown = 30;
return;
}
}
}
if (DECR(this->unk_212) == 0) {
if (DECR(this->attentionCooldown) == 0) {
Audio_PlaySfxGeneral(NA_SE_EN_GOLON_SIT_DOWN, &this->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
EnGo_SetupAction(this, func_80A405CC);
@ -874,7 +874,7 @@ void func_80A405CC(EnGo* this, PlayState* play) {
if (!(frame < lastFrame)) {
this->skelAnime.curFrame = lastFrame;
this->skelAnime.playSpeed = 0.0f;
this->unk_212 = Rand_S16Offset(30, 30);
this->attentionCooldown = Rand_S16Offset(30, 30);
if ((ENGO_GET_TYPE(this) == ENGO_TYPE_DMT_BOMB_FLOWER) && !GET_INFTABLE(INFTABLE_EB)) {
EnGo_SetupAction(this, func_80A40B1C);
} else {
@ -909,7 +909,7 @@ void EnGo_BiggoronActionFunc(EnGo* this, PlayState* play) {
play->msgCtx.stateTimer = 4;
play->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
} else {
if ((DECR(this->unk_212) == 0) && !EnGo_IsCameraModified(this, play)) {
if ((DECR(this->attentionCooldown) == 0) && !EnGo_IsCameraModified(this, play)) {
EnGo_ReverseAnimation(this);
this->skelAnime.playSpeed = -0.1f;
this->skelAnime.playSpeed *= ENGO_GET_TYPE(this) == ENGO_TYPE_DMT_BIGGORON ? 0.5f : 1.0f;
@ -932,13 +932,13 @@ void func_80A408D8(EnGo* this, PlayState* play) {
this->skelAnime.curFrame = 12.0f;
this->skelAnime.playSpeed = 0.0f;
if (ENGO_GET_TYPE(this) != ENGO_TYPE_DMT_BIGGORON) {
this->unk_212 = 30;
this->attentionCooldown = 30;
return;
}
}
}
if (DECR(this->unk_212) == 0) {
if (DECR(this->attentionCooldown) == 0) {
EnGo_SetupAction(this, func_80A40494);
} else if (EnGo_IsCameraModified(this, play)) {
EnGo_ReverseAnimation(this);

View file

@ -55,7 +55,7 @@ typedef struct EnGo {
/* 0x020C */ s16 unk_20C;
/* 0x020E */ s16 knockbackCooldown;
/* 0x0210 */ s16 unk_210;
/* 0x0212 */ s16 unk_212;
/* 0x0212 */ s16 attentionCooldown;
/* 0x0214 */ s16 blinkTimer; // unused
/* 0x0216 */ s16 eyeTexIndex; // unused
/* 0x0218 */ s16 waypoint;