Skip to content

Commit

Permalink
Document Update Actor Flags (#1762)
Browse files Browse the repository at this point in the history
* name flags, TODO: comments

* comments

* improve comments

* small cleanup

* cleanup comment
  • Loading branch information
engineer124 authored Dec 17, 2024
1 parent 971d95b commit a6675d7
Show file tree
Hide file tree
Showing 39 changed files with 119 additions and 107 deletions.
13 changes: 9 additions & 4 deletions include/z64actor.h
Original file line number Diff line number Diff line change
Expand Up @@ -553,10 +553,15 @@ typedef enum DoorLockType {
// When chosen as the next lock-on actor, this flag is unset.
#define ACTOR_FLAG_FOCUS_ACTOR_REFINDABLE (1 << 19)

//
#define ACTOR_FLAG_100000 (1 << 20)
//
#define ACTOR_FLAG_200000 (1 << 21)
// Actor can update even if Player is currently in one of the `sCategoryFreezeMasks` states.
// Typically an actor will halt while the player is in one of the `sCategoryFreezeMasks` states (depending on category).
// This flag allows a given actor to be an exception.
#define ACTOR_FLAG_FREEZE_EXCEPTION (1 << 20)

// Actor can update even if the Song of Soaring Cutscene or the Song of Time Cutscene is playing.
// Typically an actor will halt while the Song of Soaring Cutscene or the Song of Time Cutscene is playing.
// This flag allows a given actor to be an exception.
#define ACTOR_FLAG_UPDATE_DURING_SOARING_AND_SOT_CS (1 << 21)

// Specifies whether the actor can (not) use fake point lights, in the event that ucode point lights are not compatible with its display lists.
// In F3DZEX2 versions that predate MM, microcode point lights didn't exist so `PointLight_t` could not be used.
Expand Down
2 changes: 1 addition & 1 deletion include/z64play.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ typedef struct PlayState {
/* 0x187FC */ MtxF billboardMtxF;
/* 0x1883C */ Mtx* billboardMtx;
/* 0x18840 */ u32 gameplayFrames;
/* 0x18844 */ u8 unk_18844; // bool
/* 0x18844 */ u8 soaringCsOrSoTCsPlaying; // Either the Song of Soaring Cutscene or the Song of Time Cutscene is playing.
/* 0x18845 */ u8 haltAllActors;
/* 0x18846 */ s16 numSetupActors;
/* 0x18848 */ RoomList roomList;
Expand Down
29 changes: 15 additions & 14 deletions src/code/z_actor.c
Original file line number Diff line number Diff line change
Expand Up @@ -2556,9 +2556,8 @@ typedef struct {
/* 0x0C */ u32 canFreezeCategory;
/* 0x10 */ Actor* talkActor;
/* 0x14 */ Player* player;
/* 0x18 */ u32 unk_18; // Bitmask of actor flags. The actor will only have main called if it has at least 1
// flag set that matches this bitmask
} UpdateActor_Params; // size = 0x1C
/* 0x18 */ u32 updateActorFlagsMask; // Actor will update only if at least 1 actor flag is set in this bitmask
} UpdateActor_Params; // size = 0x1C

Actor* Actor_UpdateActor(UpdateActor_Params* params) {
PlayState* play = params->play;
Expand Down Expand Up @@ -2591,7 +2590,7 @@ Actor* Actor_UpdateActor(UpdateActor_Params* params) {
Actor_Kill(actor);
} else if (((params->freezeExceptionFlag != 0) && !(actor->flags & params->freezeExceptionFlag)) ||
(((!params->freezeExceptionFlag) != 0) &&
(!(actor->flags & ACTOR_FLAG_100000) ||
(!(actor->flags & ACTOR_FLAG_FREEZE_EXCEPTION) ||
((actor->category == ACTORCAT_EXPLOSIVES) && (params->player->stateFlags1 & PLAYER_STATE1_200))) &&
params->canFreezeCategory && (actor != params->talkActor) && (actor != params->player->heldActor) &&
(actor->parent != &params->player->actor))) {
Expand All @@ -2605,7 +2604,7 @@ Actor* Actor_UpdateActor(UpdateActor_Params* params) {
actor->yawTowardsPlayer = Actor_WorldYawTowardActor(actor, &params->player->actor);
actor->flags &= ~ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;

if ((DECR(actor->freezeTimer) == 0) && (actor->flags & params->unk_18)) {
if ((DECR(actor->freezeTimer) == 0) && (actor->flags & params->updateActorFlagsMask)) {
if (actor == params->player->focusActor) {
actor->isLockedOn = true;
} else {
Expand Down Expand Up @@ -2677,10 +2676,11 @@ void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx) {
params.player = player;
params.play = play;

if (play->unk_18844) {
params.unk_18 = ACTOR_FLAG_200000;
if (play->soaringCsOrSoTCsPlaying) {
params.updateActorFlagsMask = ACTOR_FLAG_UPDATE_DURING_SOARING_AND_SOT_CS;
} else {
params.unk_18 = ACTOR_FLAG_200000 | ACTOR_FLAG_INSIDE_CULLING_VOLUME | ACTOR_FLAG_UPDATE_CULLING_DISABLED;
params.updateActorFlagsMask = ACTOR_FLAG_UPDATE_DURING_SOARING_AND_SOT_CS | ACTOR_FLAG_INSIDE_CULLING_VOLUME |
ACTOR_FLAG_UPDATE_CULLING_DISABLED;
}

Actor_SpawnSetupActors(play, actorCtx);
Expand Down Expand Up @@ -3136,13 +3136,14 @@ void Actor_DrawAll(PlayState* play, ActorContext* actorCtx) {
Gfx* sp58;
ActorListEntry* actorEntry;
Actor* actor;
s32 actorFlags;
s32 drawActorFlagsMask;
s32 category;

if (play->unk_18844) {
actorFlags = ACTOR_FLAG_200000;
if (play->soaringCsOrSoTCsPlaying) {
drawActorFlagsMask = ACTOR_FLAG_UPDATE_DURING_SOARING_AND_SOT_CS;
} else {
actorFlags = ACTOR_FLAG_200000 | ACTOR_FLAG_INSIDE_CULLING_VOLUME | ACTOR_FLAG_DRAW_CULLING_DISABLED;
drawActorFlagsMask = ACTOR_FLAG_UPDATE_DURING_SOARING_AND_SOT_CS | ACTOR_FLAG_INSIDE_CULLING_VOLUME |
ACTOR_FLAG_DRAW_CULLING_DISABLED;
}

OPEN_DISPS(play->state.gfxCtx);
Expand Down Expand Up @@ -3170,7 +3171,7 @@ void Actor_DrawAll(PlayState* play, ActorContext* actorCtx) {
}

actor->isDrawn = false;
if ((actor->init == NULL) && (actor->draw != NULL) && (actor->flags & actorFlags)) {
if ((actor->init == NULL) && (actor->draw != NULL) && (actor->flags & drawActorFlagsMask)) {
if ((actor->flags & ACTOR_FLAG_REACT_TO_LENS) &&
((play->roomCtx.curRoom.lensMode == LENS_MODE_SHOW_ACTORS) ||
(play->actorCtx.lensMaskSize == LENS_MASK_ACTIVE_SIZE) ||
Expand Down Expand Up @@ -3212,7 +3213,7 @@ void Actor_DrawAll(PlayState* play, ActorContext* actorCtx) {
gSPBranchList(ref2, &tmp2[1]);
POLY_XLU_DISP = &tmp2[1];

if (!play->unk_18844) {
if (!play->soaringCsOrSoTCsPlaying) {
Lights_DrawGlow(play);
}

Expand Down
6 changes: 3 additions & 3 deletions src/code/z_eventmgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ void CutsceneManager_End(void) {

switch (sCutsceneMgr.startMethod) {
case CS_START_2:
sCutsceneMgr.targetActor->flags &= ~ACTOR_FLAG_100000;
sCutsceneMgr.targetActor->flags &= ~ACTOR_FLAG_FREEZE_EXCEPTION;
FALLTHROUGH;
case CS_START_1:
Player_SetCsActionWithHaltedActors(sCutsceneMgr.play, NULL, PLAYER_CSACTION_END);
Expand Down Expand Up @@ -359,7 +359,7 @@ s16 CutsceneManager_StartWithPlayerCs(s16 csId, Actor* actor) {
}

/**
* Start an actor cutscene, activate Player Cutscene Action "Wait", turn on ACTOR_FLAG_100000
* Start an actor cutscene, activate Player Cutscene Action "Wait", turn on ACTOR_FLAG_FREEZE_EXCEPTION
*/
s16 CutsceneManager_StartWithPlayerCsAndSetFlag(s16 csId, Actor* actor) {
s16 startCsId = CutsceneManager_Start(csId, actor);
Expand All @@ -370,7 +370,7 @@ s16 CutsceneManager_StartWithPlayerCsAndSetFlag(s16 csId, Actor* actor) {
CutsceneManager_Stop(sCutsceneMgr.csId);
}
if (actor != NULL) {
actor->flags |= ACTOR_FLAG_100000;
actor->flags |= ACTOR_FLAG_FREEZE_EXCEPTION;
sCutsceneMgr.startMethod = CS_START_2;
} else {
sCutsceneMgr.startMethod = CS_START_1;
Expand Down
4 changes: 2 additions & 2 deletions src/code/z_play.c
Original file line number Diff line number Diff line change
Expand Up @@ -1277,7 +1277,7 @@ void Play_DrawMain(PlayState* this) {
goto PostWorldDraw;
}

if (!this->unk_18844) {
if (!this->soaringCsOrSoTCsPlaying) {
if (1) {
if (((u32)this->skyboxId != SKYBOX_NONE) && !this->envCtx.skyboxDisabled) {
if ((this->skyboxId == SKYBOX_NORMAL_SKY) || (this->skyboxId == SKYBOX_3)) {
Expand Down Expand Up @@ -2270,7 +2270,7 @@ void Play_Init(GameState* thisx) {
this->worldCoverAlpha = 0;
this->bgCoverAlpha = 0;
this->haltAllActors = false;
this->unk_18844 = false;
this->soaringCsOrSoTCsPlaying = false;

if (gSaveContext.gameMode != GAMEMODE_TITLE_SCREEN) {
if (gSaveContext.nextTransitionType == TRANS_NEXT_TYPE_DEFAULT) {
Expand Down
4 changes: 2 additions & 2 deletions src/code/z_player_call.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

#define FLAGS \
(ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \
ACTOR_FLAG_DRAW_CULLING_DISABLED | ACTOR_FLAG_200000 | ACTOR_FLAG_UPDATE_DURING_OCARINA | \
ACTOR_FLAG_CAN_PRESS_SWITCHES | ACTOR_FLAG_MINIMAP_ICON_ENABLED)
ACTOR_FLAG_DRAW_CULLING_DISABLED | ACTOR_FLAG_UPDATE_DURING_SOARING_AND_SOT_CS | \
ACTOR_FLAG_UPDATE_DURING_OCARINA | ACTOR_FLAG_CAN_PRESS_SWITCHES | ACTOR_FLAG_MINIMAP_ICON_ENABLED)

ActorFunc sPlayerCallInitFunc;
ActorFunc sPlayerCallDestroyFunc;
Expand Down
2 changes: 1 addition & 1 deletion src/code/z_player_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -1961,7 +1961,7 @@ void Player_AdjustSingleLeg(PlayState* play, Player* player, SkelAnime* skelAnim
f32 sp7C;

if ((player->stateFlags3 & PLAYER_STATE3_1) || !(player->actor.scale.y >= 0.0f) ||
(player->stateFlags1 & PLAYER_STATE1_DEAD) || play->unk_18844) {
(player->stateFlags1 & PLAYER_STATE1_DEAD) || play->soaringCsOrSoTCsPlaying) {
return;
}

Expand Down
2 changes: 1 addition & 1 deletion src/overlays/actors/ovl_Bg_Iknv_Obj/z_bg_iknv_obj.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ void BgIknvObj_Init(Actor* thisx, PlayState* play) {
case IKNV_OBJ_WATERWHEEL:
this->dList = object_iknv_obj_DL_013058;
this->actionFunc = BgIknvObj_UpdateWaterwheel;
this->dyna.actor.flags |= ACTOR_FLAG_100000;
this->dyna.actor.flags |= ACTOR_FLAG_FREEZE_EXCEPTION;
this->dyna.actor.flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED;
break;

Expand Down
8 changes: 4 additions & 4 deletions src/overlays/actors/ovl_En_Bom/z_en_bom.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ void EnBom_Init(Actor* thisx, PlayState* play) {
this->collider2.elements[0].dim.worldSphere.center.y = this->actor.world.pos.y;
this->collider2.elements[0].dim.worldSphere.center.z = this->actor.world.pos.z;

this->actor.flags |= ACTOR_FLAG_100000;
this->actor.flags |= ACTOR_FLAG_FREEZE_EXCEPTION;

if (Actor_HasParent(&this->actor, play)) {
this->actionFunc = EnBom_WaitForRelease;
Expand Down Expand Up @@ -301,11 +301,11 @@ void EnBom_Move(EnBom* this, PlayState* play) {
}

void EnBom_WaitForRelease(EnBom* this, PlayState* play) {
// if parent is NULL bomb has been released
// if parent pointer is NULL, the bomb has been released
if (Actor_HasNoParent(&this->actor, play)) {
this->actionFunc = EnBom_Move;
this->actor.room = play->roomCtx.curRoom.num;
this->actor.flags &= ~ACTOR_FLAG_100000;
this->actor.flags &= ~ACTOR_FLAG_FREEZE_EXCEPTION;
this->actor.bgCheckFlags &= ~BGCHECKFLAG_GROUND;
Math_Vec3s_ToVec3f(&this->actor.prevPos, &this->actor.home.rot);
if (this->isPowderKeg) {
Expand Down Expand Up @@ -555,7 +555,7 @@ void EnBom_Update(Actor* thisx, PlayState* play) {
Camera_AddQuake(&play->mainCamera, 2, 11, 8);
thisx->params = BOMB_TYPE_EXPLOSION;
this->timer = 10;
thisx->flags |= (ACTOR_FLAG_DRAW_CULLING_DISABLED | ACTOR_FLAG_100000);
thisx->flags |= (ACTOR_FLAG_DRAW_CULLING_DISABLED | ACTOR_FLAG_FREEZE_EXCEPTION);
this->actionFunc = EnBom_Explode;
if (this->isPowderKeg) {
gSaveContext.powderKegTimer = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/overlays/actors/ovl_En_Bombal/z_en_bombal.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ void func_80C05B3C(EnBombal* this, PlayState* play) {
if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_75_40) && !CHECK_WEEKEVENTREG(WEEKEVENTREG_73_10) &&
!CHECK_WEEKEVENTREG(WEEKEVENTREG_85_02)) {
player->stateFlags1 |= ACTOR_FLAG_DRAW_CULLING_DISABLED;
this->actor.flags |= ACTOR_FLAG_100000;
this->actor.flags |= ACTOR_FLAG_FREEZE_EXCEPTION;
}
this->actionFunc = func_80C05C44;
}
Expand Down
2 changes: 1 addition & 1 deletion src/overlays/actors/ovl_En_Col_Man/z_en_col_man.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.h"
#include "assets/objects/gameplay_keep/gameplay_keep.h"

#define FLAGS (ACTOR_FLAG_100000)
#define FLAGS (ACTOR_FLAG_FREEZE_EXCEPTION)

void EnColMan_Init(Actor* thisx, PlayState* play);
void EnColMan_Destroy(Actor* thisx, PlayState* play);
Expand Down
4 changes: 2 additions & 2 deletions src/overlays/actors/ovl_En_Dinofos/z_en_dinofos.c
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ void EnDinofos_Init(Actor* thisx, PlayState* play) {
if (this->actor.csId == CS_ID_NONE) {
EnDinofos_SetupIdle(this);
} else {
this->actor.flags |= ACTOR_FLAG_100000;
this->actor.flags |= ACTOR_FLAG_FREEZE_EXCEPTION;
this->actor.gravity = 0.0f;
this->actor.velocity.y = 0.0f;
sCsId = thisx->csId;
Expand Down Expand Up @@ -613,7 +613,7 @@ void EnDinofos_IntroCutsceneYell(EnDinofos* this, PlayState* play) {

if (SkelAnime_Update(&this->skelAnime)) {
EnDinofos_EndCutscene(this, play);
this->actor.flags &= ~ACTOR_FLAG_100000;
this->actor.flags &= ~ACTOR_FLAG_FREEZE_EXCEPTION;
this->actor.csId = CS_ID_NONE;
EnDinofos_SetupIdle(this);
}
Expand Down
6 changes: 3 additions & 3 deletions src/overlays/actors/ovl_En_Dragon/z_en_dragon.c
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ void EnDragon_Attack(EnDragon* this, PlayState* play) {
player->av2.actionVar2 = 100;
}

this->actor.flags &= ~ACTOR_FLAG_100000;
this->actor.flags &= ~ACTOR_FLAG_FREEZE_EXCEPTION;

if ((this->state != DEEP_PYTHON_ATTACK_STATE_START) && (curFrame >= this->animEndFrame)) {
this->timer = 3;
Expand Down Expand Up @@ -752,7 +752,7 @@ void EnDragon_UpdateDamage(EnDragon* this, PlayState* play) {
Actor_PlaySfx(&this->actor, NA_SE_EN_UTSUBO_DEAD);
this->actor.flags |= ACTOR_FLAG_LOCK_ON_DISABLED;
this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED;
this->actor.flags |= ACTOR_FLAG_100000;
this->actor.flags |= ACTOR_FLAG_FREEZE_EXCEPTION;
this->action = DEEP_PYTHON_ACTION_SETUP_DEAD;
this->actionFunc = EnDragon_SetupDead;
}
Expand All @@ -765,7 +765,7 @@ void EnDragon_UpdateDamage(EnDragon* this, PlayState* play) {
(playerImpactType == PLAYER_IMPACT_ZORA_BARRIER))) {
this->actor.speed = 0.0f;
this->action = DEEP_PYTHON_ACTION_GRAB;
this->actor.flags |= ACTOR_FLAG_100000;
this->actor.flags |= ACTOR_FLAG_FREEZE_EXCEPTION;
this->actionFunc = EnDragon_SetupGrab;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/overlays/actors/ovl_En_Egol/z_en_egol.c
Original file line number Diff line number Diff line change
Expand Up @@ -1063,7 +1063,7 @@ void EnEgol_Damaged(EnEgol* this, PlayState* play) {
Actor_PlaySfx(&this->actor, NA_SE_EN_EYEGOLE_DEAD);
this->actor.flags |= ACTOR_FLAG_LOCK_ON_DISABLED;
this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED;
this->actor.flags |= ACTOR_FLAG_100000;
this->actor.flags |= ACTOR_FLAG_FREEZE_EXCEPTION;
this->actionFunc = EnEgol_StartDeathCutscene;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/overlays/actors/ovl_En_Encount1/z_en_encount1.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "overlays/actors/ovl_En_Wallmas/z_en_wallmas.h"
#include "overlays/actors/ovl_En_Pr2/z_en_pr2.h"

#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_100000 | ACTOR_FLAG_LOCK_ON_DISABLED)
#define FLAGS (ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_FREEZE_EXCEPTION | ACTOR_FLAG_LOCK_ON_DISABLED)

void EnEncount1_Init(Actor* thisx, PlayState* play);
void EnEncount1_Update(Actor* thisx, PlayState* play);
Expand Down
3 changes: 2 additions & 1 deletion src/overlays/actors/ovl_En_Guard_Nuts/z_en_guard_nuts.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
#include "z_en_guard_nuts.h"
#include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h"

#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_100000 | ACTOR_FLAG_MINIMAP_ICON_ENABLED)
#define FLAGS \
(ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_FREEZE_EXCEPTION | ACTOR_FLAG_MINIMAP_ICON_ENABLED)

void EnGuardNuts_Init(Actor* thisx, PlayState* play);
void EnGuardNuts_Destroy(Actor* thisx, PlayState* play);
Expand Down
6 changes: 3 additions & 3 deletions src/overlays/actors/ovl_En_Hg/z_en_hg.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

#include "z_en_hg.h"

#define FLAGS \
(ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED | ACTOR_FLAG_100000 | \
ACTOR_FLAG_UPDATE_DURING_OCARINA)
#define FLAGS \
(ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \
ACTOR_FLAG_FREEZE_EXCEPTION | ACTOR_FLAG_UPDATE_DURING_OCARINA)

void EnHg_Init(Actor* thisx, PlayState* play);
void EnHg_Destroy(Actor* thisx, PlayState* play);
Expand Down
6 changes: 3 additions & 3 deletions src/overlays/actors/ovl_En_Jso/z_en_jso.c
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ void EnJso_SetupIntroCutscene(EnJso* this) {
this->csId = parent->csId;
this->swordState = EN_JSO_SWORD_STATE_NONE_DRAWN;
this->action = EN_JSO_ACTION_INTRO_CUTSCENE;
this->actor.flags |= ACTOR_FLAG_100000;
this->actor.flags |= ACTOR_FLAG_FREEZE_EXCEPTION;
this->actionFunc = EnJso_IntroCutscene;
}

Expand Down Expand Up @@ -582,7 +582,7 @@ void EnJso_IntroCutscene(EnJso* this, PlayState* play) {
this->robeRightRot.y = this->robeRightRot.z = 0;
this->cutsceneState = EN_JSO_INTRO_CS_STATE_DONE_OR_STARTED;
this->subCamId = SUB_CAM_ID_DONE;
this->actor.flags &= ~ACTOR_FLAG_100000;
this->actor.flags &= ~ACTOR_FLAG_FREEZE_EXCEPTION;
this->actor.flags &= ~ACTOR_FLAG_LOCK_ON_DISABLED;
this->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED;
this->actor.world.rot.y = this->actor.yawTowardsPlayer;
Expand Down Expand Up @@ -1166,7 +1166,7 @@ void EnJso_SetupFallDownAndTalk(EnJso* this, PlayState* play) {
this->actor.flags |= (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_FRIENDLY);
Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_NPC);
this->actor.flags &= ~ACTOR_FLAG_LOCK_ON_DISABLED;
this->actor.flags &= ~ACTOR_FLAG_100000;
this->actor.flags &= ~ACTOR_FLAG_FREEZE_EXCEPTION;
this->action = EN_JSO_ACTION_FALL_DOWN_AND_TALK;
this->actionFunc = EnJso_FallDownAndTalk;
}
Expand Down
8 changes: 4 additions & 4 deletions src/overlays/actors/ovl_En_Jso2/z_en_jso2.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

#define FLAGS \
(ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \
ACTOR_FLAG_DRAW_CULLING_DISABLED | ACTOR_FLAG_100000 | ACTOR_FLAG_MINIMAP_ICON_ENABLED)
ACTOR_FLAG_DRAW_CULLING_DISABLED | ACTOR_FLAG_FREEZE_EXCEPTION | ACTOR_FLAG_MINIMAP_ICON_ENABLED)

void EnJso2_Init(Actor* thisx, PlayState* play);
void EnJso2_Destroy(Actor* thisx, PlayState* play);
Expand Down Expand Up @@ -732,7 +732,7 @@ void EnJso2_IntroCutscene(EnJso2* this, PlayState* play) {
if (curFrame >= this->animEndFrame) {
CutsceneManager_Stop(this->actor.csId);
this->subCamId = SUB_CAM_ID_DONE;
this->actor.flags &= ~ACTOR_FLAG_100000;
this->actor.flags &= ~ACTOR_FLAG_FREEZE_EXCEPTION;
this->actor.gravity = -3.0f;
this->actor.flags &= ~ACTOR_FLAG_LOCK_ON_DISABLED;
this->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED;
Expand All @@ -751,7 +751,7 @@ void EnJso2_IntroCutscene(EnJso2* this, PlayState* play) {
void EnJso2_SetupAppear(EnJso2* this) {
this->swordState = EN_JSO2_SWORD_STATE_NONE_DRAWN;
this->bodyCollider.base.acFlags |= AC_HARD;
this->actor.flags &= ~ACTOR_FLAG_100000;
this->actor.flags &= ~ACTOR_FLAG_FREEZE_EXCEPTION;
EnJso2_ChangeAnim(this, EN_JSO2_ANIM_APPEAR_AND_DRAW_SWORDS);
this->actionFunc = EnJso2_Appear;
}
Expand Down Expand Up @@ -1333,7 +1333,7 @@ void EnJso2_SetupDeathCutscene(EnJso2* this) {
this->cutsceneState = EN_JSO2_DEATH_CS_STATE_STARTED;
this->cutsceneTimer = 0;
this->subCamId = SUB_CAM_ID_DONE;
this->actor.flags |= ACTOR_FLAG_100000;
this->actor.flags |= ACTOR_FLAG_FREEZE_EXCEPTION;
this->timer = 30;
this->action = EN_JSO2_ACTION_BLOW_UP;
this->actionFunc = EnJso2_DeathCutscene;
Expand Down
Loading

0 comments on commit a6675d7

Please sign in to comment.