1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-06 07:56:32 +00:00
This commit is contained in:
Sirius902 2020-10-18 21:48:43 -07:00
parent f8f3899938
commit dad313a14c

View file

@ -670,15 +670,18 @@ void func_80A75A38(EnIk* this, GlobalContext* globalCtx) {
}
}
#ifdef NON_EQUIVALENT
#ifdef NON_MATCHING
void func_80A75C38(EnIk* this, GlobalContext* globalCtx) {
Vec3f sp38;
f32 temp_f0;
s32 temp_v0_3;
u8 temp_t7;
u8 pad;
u8 prevHealth;
s32 temp_v0_3;
Vec3f sp38;
if ((this->unk_2F8 != 3) && (this->unk_2F8 != 2)) {
if ((this->unk_2F8 == 3) || (this->unk_2F8 == 2)) {
return;
}
if (this->unk_3EC.base.acFlags & 0x80) {
temp_f0 = SkelAnime_GetFrameCount(&D_0600485C.genericHeader) - 2.0f;
if (this->skelAnime.animCurrentFrame < temp_f0) {
@ -688,7 +691,9 @@ void func_80A75C38(EnIk* this, GlobalContext* globalCtx) {
this->unk_320.base.acFlags &= ~0x2;
return;
}
if (this->unk_320.base.acFlags & 2) {
if (!(this->unk_320.base.acFlags & 2)) {
return;
}
sp38 = this->actor.posRot.pos;
sp38.y += 50.0f;
func_80035650(&this->actor, &this->unk_320.body, 1);
@ -697,7 +702,7 @@ void func_80A75C38(EnIk* this, GlobalContext* globalCtx) {
this->unk_320.base.acFlags &= ~0x2;
this->unk_2FD = temp_t7;
if (((temp_v0_3 == 0) || (temp_v0_3 == 0xD)) || ((this->unk_2FB == 0) && (temp_v0_3 == 0xE))) {
if ((temp_v0_3 == 0) || (temp_v0_3 == 0xD) || ((this->unk_2FB == 0) && (temp_v0_3 == 0xE))) {
if (temp_v0_3 != 0) {
func_80062D60(globalCtx, &sp38);
}
@ -711,7 +716,17 @@ void func_80A75C38(EnIk* this, GlobalContext* globalCtx) {
this->unk_2FB = 1;
func_80032E24(&this->unk_308, 3, globalCtx);
}
block_23:
} else if (this->actor.colChkInfo.health < 11) {
Actor_ChangeType(globalCtx, &globalCtx->actorCtx, &this->actor, ACTORTYPE_BOSS);
Audio_PlaySoundAtPosition(globalCtx, &this->actor.posRot.pos, 20, NA_SE_EN_LAST_DAMAGE);
if (this->switchFlags != 0xFF) {
Flags_SetSwitch(globalCtx, this->switchFlags);
}
return;
} else if (prevHealth == 50) {
Actor_ChangeType(globalCtx, &globalCtx->actorCtx, &this->actor, ACTORTYPE_ENEMY);
}
if (this->actor.colChkInfo.health == 0) {
func_80A7598C(this);
func_80032C7C(globalCtx, &this->actor);
@ -736,21 +751,6 @@ void func_80A75C38(EnIk* this, GlobalContext* globalCtx) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_IRONNACK_ARMOR_HIT);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_IRONNACK_DAMAGE);
func_80062CD4(globalCtx, &sp38);
} else if (this->actor.colChkInfo.health < 11) {
Actor_ChangeType(globalCtx, &globalCtx->actorCtx, &this->actor, ACTORTYPE_BOSS);
Audio_PlaySoundAtPosition(globalCtx, &this->actor.posRot.pos, 20, NA_SE_EN_LAST_DAMAGE);
if (this->switchFlags != 0xFF) {
Flags_SetSwitch(globalCtx, this->switchFlags);
return;
}
} else {
if (prevHealth == 50) {
Actor_ChangeType(globalCtx, &globalCtx->actorCtx, &this->actor, ACTORTYPE_ENEMY);
}
goto block_23;
}
}
}
}
#else
void func_80A75C38(EnIk* this, GlobalContext* globalCtx);