mirror of
https://github.com/zeldaret/oot.git
synced 2024-11-25 01:34:18 +00:00
Document ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT
(#2276)
* name ACTOR_FLAG_HIT_PLAYER_THUMP_SFX * ACTOR_FLAG_HIT_PLAYER_THUMP_SFX -> ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT
This commit is contained in:
parent
e55e909477
commit
f4210323a2
25 changed files with 32 additions and 32 deletions
|
@ -188,8 +188,8 @@ typedef struct ActorShape {
|
||||||
// Typically an actor can only be thrown when moving, but this allows an actor to be thrown when standing still.
|
// 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_THROW_ONLY (1 << 23)
|
||||||
|
|
||||||
//
|
// When colliding with Player's body AC collider, a "thump" sound will play indicating his body has been hit
|
||||||
#define ACTOR_FLAG_24 (1 << 24)
|
#define ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT (1 << 24)
|
||||||
|
|
||||||
// Actor can update even if Player is currently using the ocarina.
|
// Actor can update even if Player is currently using the ocarina.
|
||||||
// Typically an actor will halt while the ocarina is active (depending on category).
|
// Typically an actor will halt while the ocarina is active (depending on category).
|
||||||
|
|
|
@ -2426,7 +2426,7 @@ void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx) {
|
||||||
actor->xyzDistToPlayerSq = SQ(actor->xzDistToPlayer) + SQ(actor->yDistToPlayer);
|
actor->xyzDistToPlayerSq = SQ(actor->xzDistToPlayer) + SQ(actor->yDistToPlayer);
|
||||||
|
|
||||||
actor->yawTowardsPlayer = Actor_WorldYawTowardActor(actor, &player->actor);
|
actor->yawTowardsPlayer = Actor_WorldYawTowardActor(actor, &player->actor);
|
||||||
actor->flags &= ~ACTOR_FLAG_24;
|
actor->flags &= ~ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
|
||||||
|
|
||||||
if ((DECR(actor->freezeTimer) == 0) && (actor->flags & (ACTOR_FLAG_4 | ACTOR_FLAG_6))) {
|
if ((DECR(actor->freezeTimer) == 0) && (actor->flags & (ACTOR_FLAG_4 | ACTOR_FLAG_6))) {
|
||||||
if (actor == player->focusActor) {
|
if (actor == player->focusActor) {
|
||||||
|
|
|
@ -730,7 +730,7 @@ void BossDodongo_Roll(BossDodongo* this, PlayState* play) {
|
||||||
f32 sp4C;
|
f32 sp4C;
|
||||||
f32 sp48;
|
f32 sp48;
|
||||||
|
|
||||||
this->actor.flags |= ACTOR_FLAG_24;
|
this->actor.flags |= ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
|
||||||
SkelAnime_Update(&this->skelAnime);
|
SkelAnime_Update(&this->skelAnime);
|
||||||
|
|
||||||
if (this->unk_1DA == 10) {
|
if (this->unk_1DA == 10) {
|
||||||
|
|
|
@ -687,7 +687,7 @@ void BossFd_Fly(BossFd* this, PlayState* play) {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case BOSSFD_FLY_CHASE:
|
case BOSSFD_FLY_CHASE:
|
||||||
this->actor.flags |= ACTOR_FLAG_24;
|
this->actor.flags |= ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
|
||||||
temp_y = Math_SinS(this->work[BFD_MOVE_TIMER] * 2396.0f) * 30.0f + this->fwork[BFD_TARGET_Y_OFFSET];
|
temp_y = Math_SinS(this->work[BFD_MOVE_TIMER] * 2396.0f) * 30.0f + this->fwork[BFD_TARGET_Y_OFFSET];
|
||||||
this->targetPosition.x = player->actor.world.pos.x;
|
this->targetPosition.x = player->actor.world.pos.x;
|
||||||
this->targetPosition.y = player->actor.world.pos.y + temp_y + 30.0f;
|
this->targetPosition.y = player->actor.world.pos.y + temp_y + 30.0f;
|
||||||
|
|
|
@ -1296,7 +1296,7 @@ void BossGoma_FloorPrepareAttack(BossGoma* this, PlayState* play) {
|
||||||
void BossGoma_FloorAttack(BossGoma* this, PlayState* play) {
|
void BossGoma_FloorAttack(BossGoma* this, PlayState* play) {
|
||||||
s16 i;
|
s16 i;
|
||||||
|
|
||||||
this->actor.flags |= ACTOR_FLAG_24;
|
this->actor.flags |= ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
|
||||||
SkelAnime_Update(&this->skelanime);
|
SkelAnime_Update(&this->skelanime);
|
||||||
|
|
||||||
switch (this->actionState) {
|
switch (this->actionState) {
|
||||||
|
|
|
@ -630,7 +630,7 @@ void BossMo_Tentacle(BossMo* this, PlayState* play) {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MO_TENT_ATTACK:
|
case MO_TENT_ATTACK:
|
||||||
this->actor.flags |= ACTOR_FLAG_24;
|
this->actor.flags |= ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
|
||||||
Sfx_PlaySfxAtPos(&this->tentTipPos, NA_SE_EN_MOFER_ATTACK - SFX_FLAG);
|
Sfx_PlaySfxAtPos(&this->tentTipPos, NA_SE_EN_MOFER_ATTACK - SFX_FLAG);
|
||||||
Math_ApproachF(&this->waterLevelMod, -5.0f, 0.1f, 0.4f);
|
Math_ApproachF(&this->waterLevelMod, -5.0f, 0.1f, 0.4f);
|
||||||
for (indS1 = 0; indS1 < 41; indS1++) {
|
for (indS1 = 0; indS1 < 41; indS1++) {
|
||||||
|
|
|
@ -590,7 +590,7 @@ void BossVa_Init(Actor* thisx, PlayState* play2) {
|
||||||
switch (this->actor.params) {
|
switch (this->actor.params) {
|
||||||
case BOSSVA_BODY:
|
case BOSSVA_BODY:
|
||||||
SkelAnime_Init(play, &this->skelAnime, &gBarinadeBodySkel, &gBarinadeBodyAnim, NULL, NULL, 0);
|
SkelAnime_Init(play, &this->skelAnime, &gBarinadeBodySkel, &gBarinadeBodyAnim, NULL, NULL, 0);
|
||||||
this->actor.flags |= ACTOR_FLAG_24;
|
this->actor.flags |= ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
|
||||||
break;
|
break;
|
||||||
case BOSSVA_SUPPORT_1:
|
case BOSSVA_SUPPORT_1:
|
||||||
case BOSSVA_SUPPORT_2:
|
case BOSSVA_SUPPORT_2:
|
||||||
|
@ -609,7 +609,7 @@ void BossVa_Init(Actor* thisx, PlayState* play2) {
|
||||||
SkelAnime_InitFlex(play, &this->skelAnime, &gBarinadeStumpSkel, &gBarinadeStumpAnim, NULL, NULL, 0);
|
SkelAnime_InitFlex(play, &this->skelAnime, &gBarinadeStumpSkel, &gBarinadeStumpAnim, NULL, NULL, 0);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
this->actor.flags |= ACTOR_FLAG_24;
|
this->actor.flags |= ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
|
||||||
SkelAnime_Init(play, &this->skelAnime, &gBarinadeBariSkel, &gBarinadeBariAnim, NULL, NULL, 0);
|
SkelAnime_Init(play, &this->skelAnime, &gBarinadeBariSkel, &gBarinadeBariAnim, NULL, NULL, 0);
|
||||||
this->actor.shape.yOffset = 400.0f;
|
this->actor.shape.yOffset = 400.0f;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
#include "assets/objects/gameplay_keep/gameplay_keep.h"
|
#include "assets/objects/gameplay_keep/gameplay_keep.h"
|
||||||
#include "assets/objects/object_Bb/object_Bb.h"
|
#include "assets/objects/object_Bb/object_Bb.h"
|
||||||
|
|
||||||
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4 | ACTOR_FLAG_24)
|
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4 | ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT)
|
||||||
|
|
||||||
#define vBombHopPhase actionVar1
|
#define vBombHopPhase actionVar1
|
||||||
#define vTrailIdx actionVar1
|
#define vTrailIdx actionVar1
|
||||||
|
|
|
@ -785,7 +785,7 @@ void EnBigokuta_Update(Actor* thisx, PlayState* play2) {
|
||||||
for (i = 0; i < ARRAY_COUNT(this->cylinder); i++) {
|
for (i = 0; i < ARRAY_COUNT(this->cylinder); i++) {
|
||||||
CollisionCheck_SetAT(play, &play->colChkCtx, &this->cylinder[i].base);
|
CollisionCheck_SetAT(play, &play->colChkCtx, &this->cylinder[i].base);
|
||||||
}
|
}
|
||||||
this->actor.flags |= ACTOR_FLAG_24;
|
this->actor.flags |= ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
|
||||||
} else {
|
} else {
|
||||||
for (i = 0; i < ARRAY_COUNT(this->cylinder); i++) {
|
for (i = 0; i < ARRAY_COUNT(this->cylinder); i++) {
|
||||||
CollisionCheck_SetOC(play, &play->colChkCtx, &this->cylinder[i].base);
|
CollisionCheck_SetOC(play, &play->colChkCtx, &this->cylinder[i].base);
|
||||||
|
|
|
@ -435,7 +435,7 @@ void func_809CF8F0(EnBw* this) {
|
||||||
this->unk_222 = 1000;
|
this->unk_222 = 1000;
|
||||||
this->actor.velocity.y = 11.0f;
|
this->actor.velocity.y = 11.0f;
|
||||||
Actor_PlaySfx(&this->actor, NA_SE_EN_STAL_JUMP);
|
Actor_PlaySfx(&this->actor, NA_SE_EN_STAL_JUMP);
|
||||||
this->actor.flags |= ACTOR_FLAG_24;
|
this->actor.flags |= ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
|
||||||
EnBw_SetupAction(this, func_809CF984);
|
EnBw_SetupAction(this, func_809CF984);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -465,7 +465,7 @@ void func_809CF984(EnBw* this, PlayState* play) {
|
||||||
}
|
}
|
||||||
Actor_SpawnFloorDustRing(play, &this->actor, &this->actor.world.pos, 30.0f, 11, 4.0f, 0, 0, false);
|
Actor_SpawnFloorDustRing(play, &this->actor, &this->actor.world.pos, 30.0f, 11, 4.0f, 0, 0, false);
|
||||||
this->unk_222 = 3000;
|
this->unk_222 = 3000;
|
||||||
this->actor.flags &= ~ACTOR_FLAG_24;
|
this->actor.flags &= ~ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
|
||||||
this->actor.speed = 0.0f;
|
this->actor.speed = 0.0f;
|
||||||
Actor_PlaySfx(&this->actor, NA_SE_EN_DODO_M_GND);
|
Actor_PlaySfx(&this->actor, NA_SE_EN_DODO_M_GND);
|
||||||
EnBw_SetupAction(this, func_809CE884);
|
EnBw_SetupAction(this, func_809CE884);
|
||||||
|
|
|
@ -1132,7 +1132,7 @@ void EnDekubaba_Update(Actor* thisx, PlayState* play) {
|
||||||
}
|
}
|
||||||
if (this->actionFunc == EnDekubaba_Lunge) {
|
if (this->actionFunc == EnDekubaba_Lunge) {
|
||||||
CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base);
|
CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base);
|
||||||
this->actor.flags |= ACTOR_FLAG_24;
|
this->actor.flags |= ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this->collider.base.acFlags & AC_ON) {
|
if (this->collider.base.acFlags & AC_ON) {
|
||||||
|
|
|
@ -535,7 +535,7 @@ void EnDodojr_Stunned(EnDodojr* this, PlayState* play) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnDodojr_JumpAttackBounce(EnDodojr* this, PlayState* play) {
|
void EnDodojr_JumpAttackBounce(EnDodojr* this, PlayState* play) {
|
||||||
this->actor.flags |= ACTOR_FLAG_24;
|
this->actor.flags |= ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
|
||||||
Actor_UpdateVelocityXZGravity(&this->actor);
|
Actor_UpdateVelocityXZGravity(&this->actor);
|
||||||
|
|
||||||
if (EnDodojr_UpdateBounces(this, play)) {
|
if (EnDodojr_UpdateBounces(this, play)) {
|
||||||
|
|
|
@ -461,7 +461,7 @@ void EnFd_Init(Actor* thisx, PlayState* play) {
|
||||||
Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colSphs);
|
Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colSphs);
|
||||||
CollisionCheck_SetInfo2(&this->actor.colChkInfo, DamageTable_Get(0xF), &sColChkInit);
|
CollisionCheck_SetInfo2(&this->actor.colChkInfo, DamageTable_Get(0xF), &sColChkInit);
|
||||||
this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED;
|
this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED;
|
||||||
this->actor.flags |= ACTOR_FLAG_24;
|
this->actor.flags |= ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
|
||||||
Actor_SetScale(&this->actor, 0.01f);
|
Actor_SetScale(&this->actor, 0.01f);
|
||||||
this->firstUpdateFlag = true;
|
this->firstUpdateFlag = true;
|
||||||
this->actor.gravity = -1.0f;
|
this->actor.gravity = -1.0f;
|
||||||
|
|
|
@ -1047,7 +1047,7 @@ void EnFloormas_Update(Actor* thisx, PlayState* play) {
|
||||||
UPDBGCHECKINFO_FLAG_4);
|
UPDBGCHECKINFO_FLAG_4);
|
||||||
Collider_UpdateCylinder(&this->actor, &this->collider);
|
Collider_UpdateCylinder(&this->actor, &this->collider);
|
||||||
if (this->actionFunc == EnFloormas_Charge) {
|
if (this->actionFunc == EnFloormas_Charge) {
|
||||||
this->actor.flags |= ACTOR_FLAG_24;
|
this->actor.flags |= ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
|
||||||
CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base);
|
CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base);
|
||||||
}
|
}
|
||||||
if (this->actionFunc != EnFloormas_GrabLink) {
|
if (this->actionFunc != EnFloormas_GrabLink) {
|
||||||
|
|
|
@ -888,7 +888,7 @@ s32 func_80A44AB0(EnGo2* this, PlayState* play) {
|
||||||
if (this->collider.base.acFlags & AC_HIT) {
|
if (this->collider.base.acFlags & AC_HIT) {
|
||||||
Audio_PlaySfxGeneral(NA_SE_SY_CORRECT_CHIME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
Audio_PlaySfxGeneral(NA_SE_SY_CORRECT_CHIME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||||
this->actor.flags &= ~ACTOR_FLAG_24;
|
this->actor.flags &= ~ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
|
||||||
this->collider.base.acFlags &= ~AC_HIT;
|
this->collider.base.acFlags &= ~AC_HIT;
|
||||||
EnGo2_StopRolling(this, play);
|
EnGo2_StopRolling(this, play);
|
||||||
return true;
|
return true;
|
||||||
|
@ -1349,7 +1349,7 @@ void EnGo2_SetupRolling(EnGo2* this, PlayState* play) {
|
||||||
} else {
|
} else {
|
||||||
this->actor.speed = 6.0f;
|
this->actor.speed = 6.0f;
|
||||||
}
|
}
|
||||||
this->actor.flags |= ACTOR_FLAG_24;
|
this->actor.flags |= ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
|
||||||
this->animTimer = 10;
|
this->animTimer = 10;
|
||||||
this->actor.shape.yOffset = 1800.0f;
|
this->actor.shape.yOffset = 1800.0f;
|
||||||
this->actor.speed *= 2.0f; // Speeding up
|
this->actor.speed *= 2.0f; // Speeding up
|
||||||
|
|
|
@ -498,7 +498,7 @@ void EnGoma_SetupJump(EnGoma* this) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnGoma_Jump(EnGoma* this, PlayState* play) {
|
void EnGoma_Jump(EnGoma* this, PlayState* play) {
|
||||||
this->actor.flags |= ACTOR_FLAG_24;
|
this->actor.flags |= ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
|
||||||
SkelAnime_Update(&this->skelanime);
|
SkelAnime_Update(&this->skelanime);
|
||||||
Math_ApproachF(&this->actor.speed, 10.0f, 0.5f, 5.0f);
|
Math_ApproachF(&this->actor.speed, 10.0f, 0.5f, 5.0f);
|
||||||
|
|
||||||
|
|
|
@ -156,7 +156,7 @@ void EnNutsball_Update(Actor* thisx, PlayState* play) {
|
||||||
UPDBGCHECKINFO_FLAG_0 | UPDBGCHECKINFO_FLAG_2);
|
UPDBGCHECKINFO_FLAG_0 | UPDBGCHECKINFO_FLAG_2);
|
||||||
Collider_UpdateCylinder(&this->actor, &this->collider);
|
Collider_UpdateCylinder(&this->actor, &this->collider);
|
||||||
|
|
||||||
this->actor.flags |= ACTOR_FLAG_24;
|
this->actor.flags |= ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
|
||||||
|
|
||||||
CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base);
|
CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base);
|
||||||
CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base);
|
CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base);
|
||||||
|
|
|
@ -624,7 +624,7 @@ void EnOkuta_Update(Actor* thisx, PlayState* play2) {
|
||||||
this->collider.dim.radius = sOctorockColliderInit.dim.radius * this->actor.scale.x * 100.0f;
|
this->collider.dim.radius = sOctorockColliderInit.dim.radius * this->actor.scale.x * 100.0f;
|
||||||
}
|
}
|
||||||
if (this->actor.params == 0x10) {
|
if (this->actor.params == 0x10) {
|
||||||
this->actor.flags |= ACTOR_FLAG_24;
|
this->actor.flags |= ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
|
||||||
CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base);
|
CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base);
|
||||||
}
|
}
|
||||||
if (this->actionFunc != EnOkuta_WaitToAppear) {
|
if (this->actionFunc != EnOkuta_WaitToAppear) {
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#include "overlays/actors/ovl_En_Bom/z_en_bom.h"
|
#include "overlays/actors/ovl_En_Bom/z_en_bom.h"
|
||||||
#include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h"
|
#include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h"
|
||||||
|
|
||||||
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4 | ACTOR_FLAG_24)
|
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4 | ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT)
|
||||||
|
|
||||||
#define GROUND_HOVER_HEIGHT 75.0f
|
#define GROUND_HOVER_HEIGHT 75.0f
|
||||||
#define MAX_LARVA 3
|
#define MAX_LARVA 3
|
||||||
|
|
|
@ -1216,7 +1216,7 @@ void EnPoSisters_Update(Actor* thisx, PlayState* play) {
|
||||||
this->unk_198 = CLAMP_MIN(temp, 1);
|
this->unk_198 = CLAMP_MIN(temp, 1);
|
||||||
}
|
}
|
||||||
if (this->actionFunc == func_80ADA8C0) {
|
if (this->actionFunc == func_80ADA8C0) {
|
||||||
this->actor.flags |= ACTOR_FLAG_24;
|
this->actor.flags |= ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
|
||||||
CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base);
|
CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base);
|
||||||
}
|
}
|
||||||
if (this->unk_199 & 1) {
|
if (this->unk_199 & 1) {
|
||||||
|
|
|
@ -996,7 +996,7 @@ void EnPoh_UpdateLiving(Actor* thisx, PlayState* play) {
|
||||||
this->actionFunc(this, play);
|
this->actionFunc(this, play);
|
||||||
Actor_MoveXZGravity(&this->actor);
|
Actor_MoveXZGravity(&this->actor);
|
||||||
if (this->actionFunc == EnPoh_Attack && this->unk_198 < 10) {
|
if (this->actionFunc == EnPoh_Attack && this->unk_198 < 10) {
|
||||||
this->actor.flags |= ACTOR_FLAG_24;
|
this->actor.flags |= ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
|
||||||
CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderSph.base);
|
CollisionCheck_SetAT(play, &play->colChkCtx, &this->colliderSph.base);
|
||||||
}
|
}
|
||||||
Collider_UpdateCylinder(&this->actor, &this->colliderCyl);
|
Collider_UpdateCylinder(&this->actor, &this->colliderCyl);
|
||||||
|
|
|
@ -799,7 +799,7 @@ void EnSt_Init(Actor* thisx, PlayState* play) {
|
||||||
}
|
}
|
||||||
EnSt_CheckCeilingPos(this, play);
|
EnSt_CheckCeilingPos(this, play);
|
||||||
this->actor.flags |= ACTOR_FLAG_14;
|
this->actor.flags |= ACTOR_FLAG_14;
|
||||||
this->actor.flags |= ACTOR_FLAG_24;
|
this->actor.flags |= ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
|
||||||
EnSt_SetColliderScale(this);
|
EnSt_SetColliderScale(this);
|
||||||
this->actor.gravity = 0.0f;
|
this->actor.gravity = 0.0f;
|
||||||
this->initialYaw = this->actor.world.rot.y;
|
this->initialYaw = this->actor.world.rot.y;
|
||||||
|
|
|
@ -288,7 +288,7 @@ void EnTite_Attack(EnTite* this, PlayState* play) {
|
||||||
case TEKTITE_MID_LUNGE:
|
case TEKTITE_MID_LUNGE:
|
||||||
// Continue trajectory until tektite has negative velocity and has landed on ground/water surface
|
// Continue trajectory until tektite has negative velocity and has landed on ground/water surface
|
||||||
// Snap to ground/water surface, or if falling fast dip into the water and slow fall speed
|
// Snap to ground/water surface, or if falling fast dip into the water and slow fall speed
|
||||||
this->actor.flags |= ACTOR_FLAG_24;
|
this->actor.flags |= ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
|
||||||
if ((this->actor.bgCheckFlags & (BGCHECKFLAG_GROUND | BGCHECKFLAG_GROUND_TOUCH)) ||
|
if ((this->actor.bgCheckFlags & (BGCHECKFLAG_GROUND | BGCHECKFLAG_GROUND_TOUCH)) ||
|
||||||
((this->actor.params == TEKTITE_BLUE) && (this->actor.bgCheckFlags & BGCHECKFLAG_WATER))) {
|
((this->actor.params == TEKTITE_BLUE) && (this->actor.bgCheckFlags & BGCHECKFLAG_WATER))) {
|
||||||
if (this->actor.velocity.y <= 0.0f) {
|
if (this->actor.velocity.y <= 0.0f) {
|
||||||
|
@ -571,7 +571,7 @@ void EnTite_MoveTowardPlayer(EnTite* this, PlayState* play) {
|
||||||
} else {
|
} else {
|
||||||
this->actor.velocity.y = 10.0f;
|
this->actor.velocity.y = 10.0f;
|
||||||
this->actor.speed = 4.0f;
|
this->actor.speed = 4.0f;
|
||||||
this->actor.flags |= ACTOR_FLAG_24;
|
this->actor.flags |= ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
|
||||||
this->actor.gravity = -1.0f;
|
this->actor.gravity = -1.0f;
|
||||||
if ((this->actor.params == TEKTITE_BLUE) && (this->actor.bgCheckFlags & BGCHECKFLAG_WATER)) {
|
if ((this->actor.params == TEKTITE_BLUE) && (this->actor.bgCheckFlags & BGCHECKFLAG_WATER)) {
|
||||||
Actor_PlaySfx(&this->actor, NA_SE_EN_TEKU_JUMP_WATER);
|
Actor_PlaySfx(&this->actor, NA_SE_EN_TEKU_JUMP_WATER);
|
||||||
|
@ -582,7 +582,7 @@ void EnTite_MoveTowardPlayer(EnTite* this, PlayState* play) {
|
||||||
} else {
|
} else {
|
||||||
this->actor.velocity.y = 10.0f;
|
this->actor.velocity.y = 10.0f;
|
||||||
this->actor.speed = 4.0f;
|
this->actor.speed = 4.0f;
|
||||||
this->actor.flags |= ACTOR_FLAG_24;
|
this->actor.flags |= ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
|
||||||
this->actor.gravity = -1.0f;
|
this->actor.gravity = -1.0f;
|
||||||
if ((this->actor.params == TEKTITE_BLUE) && (this->actor.bgCheckFlags & BGCHECKFLAG_WATER)) {
|
if ((this->actor.params == TEKTITE_BLUE) && (this->actor.bgCheckFlags & BGCHECKFLAG_WATER)) {
|
||||||
Actor_PlaySfx(&this->actor, NA_SE_EN_TEKU_JUMP_WATER);
|
Actor_PlaySfx(&this->actor, NA_SE_EN_TEKU_JUMP_WATER);
|
||||||
|
@ -593,7 +593,7 @@ void EnTite_MoveTowardPlayer(EnTite* this, PlayState* play) {
|
||||||
// If in midair:
|
// If in midair:
|
||||||
} else {
|
} else {
|
||||||
// Turn slowly toward player
|
// Turn slowly toward player
|
||||||
this->actor.flags |= ACTOR_FLAG_24;
|
this->actor.flags |= ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
|
||||||
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 1, 1000, 0);
|
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 1, 1000, 0);
|
||||||
if (this->actor.velocity.y >= 6.0f) {
|
if (this->actor.velocity.y >= 6.0f) {
|
||||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||||
|
|
|
@ -134,7 +134,7 @@ void EnYukabyun_Update(Actor* thisx, PlayState* play) {
|
||||||
Actor_UpdateBgCheckInfo(play, &this->actor, 5.0f, 20.0f, 8.0f, UPDBGCHECKINFO_FLAG_0 | UPDBGCHECKINFO_FLAG_2);
|
Actor_UpdateBgCheckInfo(play, &this->actor, 5.0f, 20.0f, 8.0f, UPDBGCHECKINFO_FLAG_0 | UPDBGCHECKINFO_FLAG_2);
|
||||||
Collider_UpdateCylinder(&this->actor, &this->collider);
|
Collider_UpdateCylinder(&this->actor, &this->collider);
|
||||||
|
|
||||||
this->actor.flags |= ACTOR_FLAG_24;
|
this->actor.flags |= ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT;
|
||||||
|
|
||||||
CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base);
|
CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base);
|
||||||
CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base);
|
CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base);
|
||||||
|
|
|
@ -4911,7 +4911,7 @@ s32 func_808382DC(Player* this, PlayState* play) {
|
||||||
Actor* ac = this->cylinder.base.ac;
|
Actor* ac = this->cylinder.base.ac;
|
||||||
s32 sp4C;
|
s32 sp4C;
|
||||||
|
|
||||||
if (ac->flags & ACTOR_FLAG_24) {
|
if (ac->flags & ACTOR_FLAG_SFX_FOR_PLAYER_BODY_HIT) {
|
||||||
Player_PlaySfx(this, NA_SE_PL_BODY_HIT);
|
Player_PlaySfx(this, NA_SE_PL_BODY_HIT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue