mirror of https://github.com/zeldaret/mm.git
actor flag thump (#1730)
This commit is contained in:
parent
ec9b5839ad
commit
e3a535d3d0
|
|
@ -506,8 +506,8 @@ typedef enum DoorLockType {
|
|||
// When Player is carrying this actor, it can only be thrown, not dropped/placed.
|
||||
// Typically an actor can only be thrown when moving, but this allows an actor to be thrown when standing still.
|
||||
#define ACTOR_FLAG_THROW_ONLY (1 << 23)
|
||||
//
|
||||
#define ACTOR_FLAG_1000000 (1 << 24)
|
||||
// When colliding with Player's body AC collider, a "thump" sound will play indicating his body has been hit
|
||||
#define ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT (1 << 24)
|
||||
// Actor can update even if Player is currently using the ocarina.
|
||||
// Typically an actor will halt while the ocarina is active (depending on category).
|
||||
// This flag allows a given actor to be an exception.
|
||||
|
|
|
|||
|
|
@ -2557,7 +2557,7 @@ Actor* Actor_UpdateActor(UpdateActor_Params* params) {
|
|||
actor->xyzDistToPlayerSq = SQ(actor->xzDistToPlayer) + SQ(actor->playerHeightRel);
|
||||
|
||||
actor->yawTowardsPlayer = Actor_WorldYawTowardActor(actor, ¶ms->player->actor);
|
||||
actor->flags &= ~ACTOR_FLAG_1000000;
|
||||
actor->flags &= ~ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
|
||||
|
||||
if ((DECR(actor->freezeTimer) == 0) && (actor->flags & params->unk_18)) {
|
||||
if (actor == params->player->focusActor) {
|
||||
|
|
|
|||
|
|
@ -499,7 +499,7 @@ void EnAm_Update(Actor* thisx, PlayState* play) {
|
|||
}
|
||||
CollisionCheck_SetAC(play, &play->colChkCtx, &this->interactCollider.base);
|
||||
if (this->enemyCollider.base.atFlags & AT_ON) {
|
||||
this->actor.flags |= ACTOR_FLAG_1000000;
|
||||
this->actor.flags |= ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
|
||||
CollisionCheck_SetAT(play, &play->colChkCtx, &this->enemyCollider.base);
|
||||
}
|
||||
Math_StepToF(&this->drawDmgEffAlpha, 0.0f, 0.05f);
|
||||
|
|
|
|||
|
|
@ -580,7 +580,7 @@ void EnBb_Update(Actor* thisx, PlayState* play) {
|
|||
Math_Vec3s_ToVec3f(&this->actor.focus.pos, &this->collider.dim.worldSphere.center);
|
||||
|
||||
if (this->collider.base.atFlags & AT_ON) {
|
||||
this->actor.flags |= ACTOR_FLAG_1000000;
|
||||
this->actor.flags |= ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
|
||||
CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -617,7 +617,7 @@ void EnBbfall_Update(Actor* thisx, PlayState* play) {
|
|||
Math_Vec3s_ToVec3f(&this->actor.focus.pos, &this->collider.elements[0].dim.worldSphere.center);
|
||||
|
||||
if (this->collider.base.atFlags & AT_ON) {
|
||||
this->actor.flags |= ACTOR_FLAG_1000000;
|
||||
this->actor.flags |= ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
|
||||
CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1199,7 +1199,7 @@ void EnDekubaba_Update(Actor* thisx, PlayState* play) {
|
|||
|
||||
if (this->actionFunc == EnDekubaba_Lunge) {
|
||||
CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base);
|
||||
this->actor.flags |= ACTOR_FLAG_1000000;
|
||||
this->actor.flags |= ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
|
||||
}
|
||||
|
||||
if (this->collider.base.acFlags & AC_ON) {
|
||||
|
|
|
|||
|
|
@ -860,7 +860,7 @@ void func_80878424(EnDodongo* this, PlayState* play) {
|
|||
sp20.z = this->collider1Elements[2].dim.worldSphere.center.z;
|
||||
func_80876930(this, play, &sp20);
|
||||
CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider1.base);
|
||||
this->actor.flags |= ACTOR_FLAG_1000000;
|
||||
this->actor.flags |= ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
|
||||
}
|
||||
|
||||
void func_80878594(EnDodongo* this) {
|
||||
|
|
|
|||
|
|
@ -1107,7 +1107,7 @@ void EnFloormas_Update(Actor* thisx, PlayState* play) {
|
|||
UPDBGCHECKINFO_FLAG_10);
|
||||
Collider_UpdateCylinder(&this->actor, &this->collider);
|
||||
if (this->actionFunc == func_808D1650) {
|
||||
this->actor.flags |= ACTOR_FLAG_1000000;
|
||||
this->actor.flags |= ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
|
||||
CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@ void EnNutsball_Update(Actor* thisx, PlayState* play2) {
|
|||
}
|
||||
Collider_UpdateCylinder(&this->actor, &this->collider);
|
||||
|
||||
this->actor.flags |= ACTOR_FLAG_1000000;
|
||||
this->actor.flags |= ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
|
||||
|
||||
CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base);
|
||||
CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base);
|
||||
|
|
|
|||
|
|
@ -971,7 +971,7 @@ void EnOkuta_Projectile_Update(Actor* thisx, PlayState* play) {
|
|||
}
|
||||
|
||||
Collider_UpdateCylinder(&this->actor, &this->collider);
|
||||
this->actor.flags |= ACTOR_FLAG_1000000;
|
||||
this->actor.flags |= ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
|
||||
CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base);
|
||||
CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base);
|
||||
CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base);
|
||||
|
|
|
|||
|
|
@ -793,7 +793,7 @@ void EnPeehat_Update(Actor* thisx, PlayState* play2) {
|
|||
}
|
||||
|
||||
if (this->colliderTris.base.atFlags & AT_ON) {
|
||||
thisx->flags |= ACTOR_FLAG_1000000;
|
||||
thisx->flags |= ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
|
||||
CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderTris.base);
|
||||
if (thisx->params == 0) {
|
||||
Vec3f sp74;
|
||||
|
|
|
|||
|
|
@ -1016,7 +1016,7 @@ void EnPoSisters_Update(Actor* thisx, PlayState* play) {
|
|||
}
|
||||
|
||||
if (this->actionFunc == EnPoSisters_SpinAttack) {
|
||||
this->actor.flags |= ACTOR_FLAG_1000000;
|
||||
this->actor.flags |= ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
|
||||
CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -810,7 +810,7 @@ void EnPoh_Update(Actor* thisx, PlayState* play2) {
|
|||
this->actionFunc(this, play);
|
||||
Actor_MoveWithGravity(&this->actor);
|
||||
if ((this->actionFunc == func_80B2CF28) && (this->unk_18E < 10)) {
|
||||
this->actor.flags |= ACTOR_FLAG_1000000;
|
||||
this->actor.flags |= ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
|
||||
CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderSph.base);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
#define FLAGS \
|
||||
(ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_10 | ACTOR_FLAG_20 | ACTOR_FLAG_4000 | \
|
||||
ACTOR_FLAG_1000000)
|
||||
ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT)
|
||||
|
||||
#define THIS ((EnSt*)thisx)
|
||||
|
||||
|
|
|
|||
|
|
@ -385,7 +385,7 @@ void func_808942B4(EnTite* this, PlayState* play) {
|
|||
}
|
||||
}
|
||||
} else if (!(this->collider.base.atFlags & AT_HIT)) {
|
||||
this->actor.flags |= ACTOR_FLAG_1000000;
|
||||
this->actor.flags |= ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
|
||||
CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base);
|
||||
} else {
|
||||
this->collider.base.atFlags &= ~AT_HIT;
|
||||
|
|
@ -784,7 +784,7 @@ void func_80895738(EnTite* this, PlayState* play) {
|
|||
} else if (this->unk_2BC > 0) {
|
||||
this->unk_2BC--;
|
||||
Math_StepToF(&this->actor.speed, 10.0f, 0.3f);
|
||||
this->actor.flags |= ACTOR_FLAG_1000000;
|
||||
this->actor.flags |= ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
|
||||
CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base);
|
||||
if (!func_80893A34(this, play)) {
|
||||
this->unk_2BC = 0;
|
||||
|
|
|
|||
|
|
@ -6031,7 +6031,7 @@ s32 func_80834600(Player* this, PlayState* play) {
|
|||
Actor* sp60 = this->cylinder.base.ac;
|
||||
s32 var_a2_2;
|
||||
|
||||
if (sp60->flags & ACTOR_FLAG_1000000) {
|
||||
if (sp60->flags & ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT) {
|
||||
Player_PlaySfx(this, NA_SE_PL_BODY_HIT);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue