mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-21 14:31:17 +00:00
Document Attention/Lock-on Related Actor Flags (#2161)
* document actor flags 0, 2, 3, and 27 * format * fly -> hover * wodring
This commit is contained in:
parent
a039aeffb7
commit
2056ae5f1a
181 changed files with 616 additions and 597 deletions
|
@ -7,7 +7,7 @@
|
|||
#include "z_en_test.h"
|
||||
#include "assets/objects/object_sk2/object_sk2.h"
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4)
|
||||
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4)
|
||||
|
||||
void EnTest_Init(Actor* thisx, PlayState* play);
|
||||
void EnTest_Destroy(Actor* thisx, PlayState* play);
|
||||
|
@ -429,7 +429,7 @@ void EnTest_SetupWaitGround(EnTest* this) {
|
|||
this->timer = 15;
|
||||
this->actor.scale.y = 0.0f;
|
||||
this->actor.world.pos.y = this->actor.home.pos.y - 3.5f;
|
||||
this->actor.flags &= ~ACTOR_FLAG_0;
|
||||
this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED;
|
||||
EnTest_SetupAction(this, EnTest_WaitGround);
|
||||
}
|
||||
|
||||
|
@ -459,7 +459,7 @@ void EnTest_SetupWaitAbove(EnTest* this) {
|
|||
this->unk_7C8 = 0;
|
||||
this->actor.world.pos.y = this->actor.home.pos.y + 150.0f;
|
||||
Actor_SetScale(&this->actor, 0.0f);
|
||||
this->actor.flags &= ~ACTOR_FLAG_0;
|
||||
this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED;
|
||||
EnTest_SetupAction(this, EnTest_WaitAbove);
|
||||
}
|
||||
|
||||
|
@ -469,7 +469,7 @@ void EnTest_WaitAbove(EnTest* this, PlayState* play) {
|
|||
|
||||
if ((this->actor.xzDistToPlayer < 200.0f) && (ABS(this->actor.yDistToPlayer) < 450.0f)) {
|
||||
EnTest_SetupAction(this, EnTest_Fall);
|
||||
this->actor.flags |= ACTOR_FLAG_0;
|
||||
this->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED;
|
||||
this->actor.shape.rot.y = this->actor.world.rot.y = this->actor.yawTowardsPlayer;
|
||||
Actor_SetScale(&this->actor, 0.015f);
|
||||
}
|
||||
|
@ -1067,7 +1067,7 @@ void EnTest_JumpBack(EnTest* this, PlayState* play) {
|
|||
this->timer = (Rand_ZeroOne() * 5.0f) + 5.0f;
|
||||
}
|
||||
}
|
||||
this->actor.flags |= ACTOR_FLAG_0;
|
||||
this->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED;
|
||||
}
|
||||
} else if (this->skelAnime.curFrame == (this->skelAnime.endFrame - 4.0f)) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_DODO_M_GND);
|
||||
|
@ -1489,7 +1489,7 @@ void func_80862DBC(EnTest* this, PlayState* play) {
|
|||
this->swordState = -1;
|
||||
}
|
||||
|
||||
this->actor.flags &= ~ACTOR_FLAG_0;
|
||||
this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED;
|
||||
|
||||
if (this->actor.params == STALFOS_TYPE_5) {
|
||||
Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_PROP);
|
||||
|
@ -1518,7 +1518,7 @@ void func_80862E6C(EnTest* this, PlayState* play) {
|
|||
}
|
||||
|
||||
this->actor.child = NULL;
|
||||
this->actor.flags |= ACTOR_FLAG_0;
|
||||
this->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED;
|
||||
EnTest_SetupJumpBack(this);
|
||||
} else if ((this->actor.params == STALFOS_TYPE_5) &&
|
||||
!Actor_FindNearby(play, &this->actor, ACTOR_EN_TEST, ACTORCAT_ENEMY, 8000.0f)) {
|
||||
|
@ -1537,7 +1537,7 @@ void func_80862FA8(EnTest* this, PlayState* play) {
|
|||
Animation_PlayOnce(&this->skelAnime, &gStalfosFallOverBackwardsAnim);
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_STAL_DEAD);
|
||||
this->unk_7DE = 0;
|
||||
this->actor.flags &= ~ACTOR_FLAG_0;
|
||||
this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED;
|
||||
this->actor.colorFilterTimer = 0;
|
||||
this->actor.speed = 0.0f;
|
||||
|
||||
|
@ -1571,7 +1571,7 @@ void func_808630F0(EnTest* this, PlayState* play) {
|
|||
this->actor.speed = 0.0f;
|
||||
|
||||
if (this->actor.params <= STALFOS_TYPE_CEILING) {
|
||||
this->actor.flags &= ~ACTOR_FLAG_0;
|
||||
this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED;
|
||||
EnTest_SetupAction(this, func_8086318C);
|
||||
} else {
|
||||
func_80862DBC(this, play);
|
||||
|
@ -1811,10 +1811,10 @@ void EnTest_Update(Actor* thisx, PlayState* play) {
|
|||
|
||||
if (this->actor.params == STALFOS_TYPE_INVISIBLE) {
|
||||
if (play->actorCtx.lensActive) {
|
||||
this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_REACT_TO_LENS;
|
||||
this->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_REACT_TO_LENS;
|
||||
this->actor.shape.shadowDraw = ActorShadow_DrawFeet;
|
||||
} else {
|
||||
this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_REACT_TO_LENS);
|
||||
this->actor.flags &= ~(ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_REACT_TO_LENS);
|
||||
this->actor.shape.shadowDraw = NULL;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue