mirror of
https://github.com/zeldaret/oot.git
synced 2024-11-29 03:34:07 +00:00
Retail Player Matches part 1 (#1712)
* player matches part 1 * remove noclip if for now * remove direvtive
This commit is contained in:
parent
54ffd50fa2
commit
a46941a195
1 changed files with 100 additions and 120 deletions
|
@ -2247,9 +2247,9 @@ void Player_InitBoomerangIA(PlayState* play, Player* this) {
|
|||
}
|
||||
|
||||
void Player_InitItemAction(PlayState* play, Player* this, s8 itemAction) {
|
||||
this->unk_860 = 0;
|
||||
this->unk_85C = 0.0f;
|
||||
this->unk_858 = 0.0f;
|
||||
this->unk_860 = 0;
|
||||
|
||||
this->heldItemAction = this->itemAction = itemAction;
|
||||
this->modelGroup = this->nextModelGroup;
|
||||
|
@ -3414,10 +3414,12 @@ void func_808368EC(Player* this, PlayState* play) {
|
|||
s16 previousYaw = this->actor.shape.rot.y;
|
||||
|
||||
if (!(this->stateFlags2 & (PLAYER_STATE2_5 | PLAYER_STATE2_6))) {
|
||||
if ((this->unk_664 != NULL) &&
|
||||
Actor* unk_664 = this->unk_664;
|
||||
|
||||
if ((unk_664 != NULL) &&
|
||||
((play->actorCtx.targetCtx.unk_4B != 0) || (this->actor.category != ACTORCAT_PLAYER))) {
|
||||
Math_ScaledStepToS(&this->actor.shape.rot.y,
|
||||
Math_Vec3f_Yaw(&this->actor.world.pos, &this->unk_664->focus.pos), 4000);
|
||||
Math_ScaledStepToS(&this->actor.shape.rot.y, Math_Vec3f_Yaw(&this->actor.world.pos, &unk_664->focus.pos),
|
||||
4000);
|
||||
} else if ((this->stateFlags1 & PLAYER_STATE1_17) &&
|
||||
!(this->stateFlags2 & (PLAYER_STATE2_5 | PLAYER_STATE2_6))) {
|
||||
Math_ScaledStepToS(&this->actor.shape.rot.y, this->zTargetYaw, 4000);
|
||||
|
@ -6030,8 +6032,6 @@ static struct_80854554 D_80854554[] = {
|
|||
};
|
||||
|
||||
s32 func_8083C6B8(PlayState* play, Player* this) {
|
||||
Vec3f sp24;
|
||||
|
||||
if (sUseHeldItem) {
|
||||
if (Player_GetBottleHeld(this) >= 0) {
|
||||
Player_SetupAction(play, this, Player_Action_8084ECA4, 0);
|
||||
|
@ -6048,11 +6048,12 @@ s32 func_8083C6B8(PlayState* play, Player* this) {
|
|||
}
|
||||
|
||||
if (this->heldItemAction == PLAYER_IA_FISHING_POLE) {
|
||||
sp24 = this->actor.world.pos;
|
||||
sp24.y += 50.0f;
|
||||
Vec3f rodCheckPos = this->actor.world.pos;
|
||||
|
||||
rodCheckPos.y += 50.0f;
|
||||
|
||||
if (!(this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) || (this->actor.world.pos.z > 1300.0f) ||
|
||||
BgCheck_SphVsFirstPoly(&play->colCtx, &sp24, 20.0f)) {
|
||||
BgCheck_SphVsFirstPoly(&play->colCtx, &rodCheckPos, 20.0f)) {
|
||||
Sfx_PlaySfxCentered(NA_SE_SY_ERROR);
|
||||
return 0;
|
||||
}
|
||||
|
@ -6389,15 +6390,15 @@ void func_8083D53C(PlayState* play, Player* this) {
|
|||
|
||||
void func_8083D6EC(PlayState* play, Player* this) {
|
||||
Vec3f ripplePos;
|
||||
f32 temp1;
|
||||
f32 temp2;
|
||||
f32 temp3;
|
||||
f32 temp4;
|
||||
|
||||
this->actor.minVelocityY = -20.0f;
|
||||
this->actor.gravity = REG(68) / 100.0f;
|
||||
|
||||
if (func_8083816C(sFloorType)) {
|
||||
f32 temp1;
|
||||
f32 temp2;
|
||||
f32 temp3;
|
||||
|
||||
temp1 = fabsf(this->speedXZ) * 20.0f;
|
||||
temp3 = 0.0f;
|
||||
|
||||
|
@ -6439,6 +6440,8 @@ void func_8083D6EC(PlayState* play, Player* this) {
|
|||
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_WATER) {
|
||||
if (this->actor.yDistToWater < 50.0f) {
|
||||
f32 temp4;
|
||||
|
||||
temp4 = fabsf(this->bodyPartsPos[PLAYER_BODYPART_WAIST].x - this->unk_A88.x) +
|
||||
fabsf(this->bodyPartsPos[PLAYER_BODYPART_WAIST].y - this->unk_A88.y) +
|
||||
fabsf(this->bodyPartsPos[PLAYER_BODYPART_WAIST].z - this->unk_A88.z);
|
||||
|
@ -6535,18 +6538,22 @@ void func_8083DC54(Player* this, PlayState* play) {
|
|||
}
|
||||
|
||||
void func_8083DDC8(Player* this, PlayState* play) {
|
||||
s16 temp1;
|
||||
s16 temp2;
|
||||
|
||||
if (!func_8002DD78(this) && !func_808334B4(this) && (this->speedXZ > 5.0f)) {
|
||||
s16 temp1;
|
||||
s16 temp2;
|
||||
|
||||
temp1 = this->speedXZ * 200.0f;
|
||||
temp2 = (s16)(this->yaw - this->actor.shape.rot.y) * this->speedXZ * 0.1f;
|
||||
|
||||
temp1 = CLAMP(temp1, -4000, 4000);
|
||||
temp2 = CLAMP(-temp2, -4000, 4000);
|
||||
|
||||
Math_ScaledStepToS(&this->unk_6BC, temp1, 900);
|
||||
this->unk_6B6 = -(f32)this->unk_6BC * 0.5f;
|
||||
|
||||
Math_ScaledStepToS(&this->unk_6BA, temp2, 300);
|
||||
Math_ScaledStepToS(&this->unk_6C0, temp2, 200);
|
||||
|
||||
this->unk_6AE |= 0x168;
|
||||
} else {
|
||||
func_8083DC54(this, play);
|
||||
|
@ -6582,13 +6589,14 @@ static struct_80854578 D_80854578[] = {
|
|||
|
||||
s32 Player_ActionChange_3(Player* this, PlayState* play) {
|
||||
EnHorse* rideActor = (EnHorse*)this->rideActor;
|
||||
f32 unk_04;
|
||||
f32 unk_08;
|
||||
f32 sp38;
|
||||
f32 sp34;
|
||||
s32 temp;
|
||||
|
||||
if ((rideActor != NULL) && CHECK_BTN_ALL(sControlInput->press.button, BTN_A)) {
|
||||
f32 unk_04;
|
||||
f32 unk_08;
|
||||
f32 sp38;
|
||||
f32 sp34;
|
||||
s32 temp;
|
||||
|
||||
sp38 = Math_CosS(rideActor->actor.shape.rot.y);
|
||||
sp34 = Math_SinS(rideActor->actor.shape.rot.y);
|
||||
|
||||
|
@ -6605,6 +6613,7 @@ s32 Player_ActionChange_3(Player* this, PlayState* play) {
|
|||
|
||||
unk_04 = D_80854578[temp].unk_04;
|
||||
unk_08 = D_80854578[temp].unk_08;
|
||||
|
||||
this->actor.world.pos.x =
|
||||
rideActor->actor.world.pos.x + rideActor->riderPos.x + ((unk_04 * sp38) + (unk_08 * sp34));
|
||||
this->actor.world.pos.z =
|
||||
|
@ -6618,9 +6627,11 @@ s32 Player_ActionChange_3(Player* this, PlayState* play) {
|
|||
Player_AnimReplaceApplyFlags(play, this,
|
||||
ANIM_FLAG_0 | ANIM_FLAG_UPDATE_Y | ANIM_FLAG_PLAYER_SETMOVE | ANIM_FLAG_NO_MOVE |
|
||||
ANIM_FLAG_PLAYER_7);
|
||||
|
||||
this->actor.parent = this->rideActor;
|
||||
func_80832224(this);
|
||||
Actor_DisableLens(play);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -6973,15 +6984,15 @@ void func_8083F070(Player* this, LinkAnimationHeader* anim, PlayState* play) {
|
|||
* @return true if Player chooses to enter crawlspace
|
||||
*/
|
||||
s32 Player_TryEnteringCrawlspace(Player* this, PlayState* play, u32 interactWallFlags) {
|
||||
CollisionPoly* wallPoly;
|
||||
Vec3f wallVertices[3];
|
||||
f32 xVertex1;
|
||||
f32 xVertex2;
|
||||
f32 zVertex1;
|
||||
f32 zVertex2;
|
||||
s32 i;
|
||||
|
||||
if (!LINK_IS_ADULT && !(this->stateFlags1 & PLAYER_STATE1_27) && (interactWallFlags & WALL_FLAG_CRAWLSPACE)) {
|
||||
CollisionPoly* wallPoly;
|
||||
Vec3f wallVertices[3];
|
||||
f32 xVertex1;
|
||||
f32 xVertex2;
|
||||
f32 zVertex1;
|
||||
f32 zVertex2;
|
||||
s32 i;
|
||||
|
||||
wallPoly = this->actor.wallPoly;
|
||||
CollisionPoly_GetVerticesByBgId(wallPoly, this->actor.wallBgId, &play->colCtx, wallVertices);
|
||||
|
||||
|
@ -7342,14 +7353,14 @@ s32 func_80840058(Player* this, f32* arg1, s16* arg2, PlayState* play) {
|
|||
func_8083DC54(this, play);
|
||||
|
||||
if ((*arg1 != 0.0f) || (ABS(this->unk_87C) > 400)) {
|
||||
s16 temp1 = *arg2 - Camera_GetInputDirYaw(GET_ACTIVE_CAM(play));
|
||||
u16 temp2 = (ABS(temp1) - 0x2000) & 0xFFFF;
|
||||
s16 temp1 = *arg2 - (u16)Camera_GetInputDirYaw(GET_ACTIVE_CAM(play));
|
||||
u16 temp2 = (ABS(temp1) - 0x2000);
|
||||
|
||||
if ((temp2 < 0x4000) || (this->unk_87C != 0)) {
|
||||
return -1;
|
||||
} else {
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -9096,12 +9107,12 @@ void Player_Action_80844AF4(Player* this, PlayState* play) {
|
|||
}
|
||||
|
||||
s32 func_80844BE4(Player* this, PlayState* play) {
|
||||
s32 temp;
|
||||
|
||||
if (Player_StartCsAction(play, this)) {
|
||||
this->stateFlags2 |= PLAYER_STATE2_17;
|
||||
} else {
|
||||
if (!CHECK_BTN_ALL(sControlInput->cur.button, BTN_B)) {
|
||||
s32 temp;
|
||||
|
||||
if ((this->unk_858 >= 0.85f) || func_808375D8(this)) {
|
||||
temp = D_80854384[Player_HoldsTwoHandedWeapon(this)];
|
||||
} else {
|
||||
|
@ -9327,7 +9338,6 @@ void Player_Action_80845308(Player* this, PlayState* play) {
|
|||
|
||||
void Player_Action_80845668(Player* this, PlayState* play) {
|
||||
s32 sp3C;
|
||||
f32 temp1;
|
||||
s32 temp2;
|
||||
f32 temp3;
|
||||
|
||||
|
@ -9338,7 +9348,7 @@ void Player_Action_80845668(Player* this, PlayState* play) {
|
|||
this->speedXZ = 1.0f;
|
||||
|
||||
if (LinkAnimation_OnFrame(&this->skelAnime, 8.0f)) {
|
||||
temp1 = this->yDistToLedge;
|
||||
f32 temp1 = this->yDistToLedge;
|
||||
|
||||
if (temp1 > this->ageProperties->unk_0C) {
|
||||
temp1 = this->ageProperties->unk_0C;
|
||||
|
@ -9356,7 +9366,6 @@ void Player_Action_80845668(Player* this, PlayState* play) {
|
|||
|
||||
func_80838940(this, NULL, temp1, play, NA_SE_VO_LI_AUTO_JUMP);
|
||||
this->av2.actionVar2 = -1;
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
temp2 = func_808374A0(play, this, &this->skelAnime, 4.0f);
|
||||
|
@ -9478,12 +9487,6 @@ s32 func_80845C68(PlayState* play, s32 arg1) {
|
|||
}
|
||||
|
||||
void Player_Action_80845CA4(Player* this, PlayState* play) {
|
||||
f32 sp3C;
|
||||
s32 temp;
|
||||
f32 sp34;
|
||||
s32 sp30;
|
||||
s32 pad;
|
||||
|
||||
if (!Player_ActionChange_13(this, play)) {
|
||||
if (this->av2.actionVar2 == 0) {
|
||||
LinkAnimation_Update(play, &this->skelAnime);
|
||||
|
@ -9493,9 +9496,10 @@ void Player_Action_80845CA4(Player* this, PlayState* play) {
|
|||
this->av2.actionVar2 = 1;
|
||||
}
|
||||
} else if (this->av1.actionVar1 == 0) {
|
||||
sp3C = 5.0f * D_808535E8;
|
||||
f32 sp3C = 5.0f * D_808535E8;
|
||||
s32 temp = func_80845BA0(play, this, &sp3C, -1);
|
||||
|
||||
if (func_80845BA0(play, this, &sp3C, -1) < 30) {
|
||||
if (temp < 30) {
|
||||
this->av1.actionVar1 = 1;
|
||||
this->stateFlags1 |= PLAYER_STATE1_29;
|
||||
|
||||
|
@ -9503,8 +9507,9 @@ void Player_Action_80845CA4(Player* this, PlayState* play) {
|
|||
this->unk_450.z = this->unk_45C.z;
|
||||
}
|
||||
} else {
|
||||
sp34 = 5.0f;
|
||||
sp30 = 20;
|
||||
f32 sp34 = 5.0f;
|
||||
s32 sp30 = 20;
|
||||
s32 sp2C;
|
||||
|
||||
if (this->stateFlags1 & PLAYER_STATE1_0) {
|
||||
sp34 = gSaveContext.entranceSpeed;
|
||||
|
@ -9520,10 +9525,10 @@ void Player_Action_80845CA4(Player* this, PlayState* play) {
|
|||
sp30 = -1;
|
||||
}
|
||||
|
||||
temp = func_80845BA0(play, this, &sp34, sp30);
|
||||
sp2C = func_80845BA0(play, this, &sp34, sp30);
|
||||
|
||||
if ((this->av2.actionVar2 == 0) ||
|
||||
((temp == 0) && (this->speedXZ == 0.0f) &&
|
||||
((sp2C == 0) && (this->speedXZ == 0.0f) &&
|
||||
(Play_GetCamera(play, CAM_ID_MAIN)->stateFlags & CAM_STATE_CAM_FUNC_FINISH))) {
|
||||
|
||||
Camera_SetFinishedFlag(Play_GetCamera(play, CAM_ID_MAIN));
|
||||
|
@ -9577,10 +9582,7 @@ void Player_Action_80846050(Player* this, PlayState* play) {
|
|||
if (LinkAnimation_Update(play, &this->skelAnime)) {
|
||||
func_80839F90(this, play);
|
||||
func_80835688(this, play);
|
||||
return;
|
||||
}
|
||||
|
||||
if (LinkAnimation_OnFrame(&this->skelAnime, 4.0f)) {
|
||||
} else if (LinkAnimation_OnFrame(&this->skelAnime, 4.0f)) {
|
||||
Actor* interactRangeActor = this->interactRangeActor;
|
||||
|
||||
if (!func_80835644(play, this, interactRangeActor)) {
|
||||
|
@ -9592,10 +9594,9 @@ void Player_Action_80846050(Player* this, PlayState* play) {
|
|||
BGCHECKFLAG_CEILING | BGCHECKFLAG_WATER | BGCHECKFLAG_WATER_TOUCH | BGCHECKFLAG_GROUND_STRICT);
|
||||
this->unk_3BC.y = interactRangeActor->shape.rot.y - this->actor.shape.rot.y;
|
||||
}
|
||||
return;
|
||||
} else {
|
||||
Math_ScaledStepToS(&this->unk_3BC.y, 0, 4000);
|
||||
}
|
||||
|
||||
Math_ScaledStepToS(&this->unk_3BC.y, 0, 4000);
|
||||
}
|
||||
|
||||
static AnimSfxEntry D_8085461C[] = {
|
||||
|
@ -9608,20 +9609,14 @@ void Player_Action_80846120(Player* this, PlayState* play) {
|
|||
if (!Player_ActionChange_13(this, play)) {
|
||||
func_8083A098(this, &gPlayerAnim_link_normal_heavy_carry_end, play);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (LinkAnimation_OnFrame(&this->skelAnime, 41.0f)) {
|
||||
} else if (LinkAnimation_OnFrame(&this->skelAnime, 41.0f)) {
|
||||
BgHeavyBlock* heavyBlock = (BgHeavyBlock*)this->interactRangeActor;
|
||||
|
||||
this->heldActor = &heavyBlock->dyna.actor;
|
||||
this->actor.child = &heavyBlock->dyna.actor;
|
||||
heavyBlock->dyna.actor.parent = &this->actor;
|
||||
func_8002DBD0(&heavyBlock->dyna.actor, &heavyBlock->unk_164, &this->leftHandPos);
|
||||
return;
|
||||
}
|
||||
|
||||
if (LinkAnimation_OnFrame(&this->skelAnime, 229.0f)) {
|
||||
} else if (LinkAnimation_OnFrame(&this->skelAnime, 229.0f)) {
|
||||
Actor* heldActor = this->heldActor;
|
||||
|
||||
heldActor->speed = Math_SinS(heldActor->shape.rot.x) * 40.0f;
|
||||
|
@ -9629,10 +9624,9 @@ void Player_Action_80846120(Player* this, PlayState* play) {
|
|||
heldActor->gravity = -2.0f;
|
||||
heldActor->minVelocityY = -30.0f;
|
||||
Player_DetachHeldActor(play, this);
|
||||
return;
|
||||
} else {
|
||||
Player_ProcessAnimSfxList(this, D_8085461C);
|
||||
}
|
||||
|
||||
Player_ProcessAnimSfxList(this, D_8085461C);
|
||||
}
|
||||
|
||||
void Player_Action_80846260(Player* this, PlayState* play) {
|
||||
|
@ -9641,24 +9635,16 @@ void Player_Action_80846260(Player* this, PlayState* play) {
|
|||
if (LinkAnimation_Update(play, &this->skelAnime)) {
|
||||
Player_AnimPlayLoop(play, this, &gPlayerAnim_link_silver_wait);
|
||||
this->av2.actionVar2 = 1;
|
||||
return;
|
||||
}
|
||||
|
||||
if (this->av2.actionVar2 == 0) {
|
||||
} else if (this->av2.actionVar2 == 0) {
|
||||
if (LinkAnimation_OnFrame(&this->skelAnime, 27.0f)) {
|
||||
Actor* interactRangeActor = this->interactRangeActor;
|
||||
|
||||
this->heldActor = interactRangeActor;
|
||||
this->actor.child = interactRangeActor;
|
||||
interactRangeActor->parent = &this->actor;
|
||||
return;
|
||||
}
|
||||
|
||||
if (LinkAnimation_OnFrame(&this->skelAnime, 25.0f)) {
|
||||
} else if (LinkAnimation_OnFrame(&this->skelAnime, 25.0f)) {
|
||||
func_80832698(this, NA_SE_VO_LI_SWORD_L);
|
||||
return;
|
||||
}
|
||||
|
||||
} else if (CHECK_BTN_ANY(sControlInput->press.button, BTN_A | BTN_B | BTN_CLEFT | BTN_CRIGHT | BTN_CDOWN)) {
|
||||
Player_SetupAction(play, this, Player_Action_80846358, 1);
|
||||
Player_AnimPlayOnce(play, this, &gPlayerAnim_link_silver_throw);
|
||||
|
@ -10081,10 +10067,9 @@ void func_808471F4(s16* pValue) {
|
|||
}
|
||||
|
||||
void func_80847298(Player* this) {
|
||||
s16 sp26;
|
||||
|
||||
if (!(this->unk_6AE & 2)) {
|
||||
sp26 = this->actor.focus.rot.y - this->actor.shape.rot.y;
|
||||
s16 sp26 = this->actor.focus.rot.y - this->actor.shape.rot.y;
|
||||
|
||||
func_808471F4(&sp26);
|
||||
this->actor.focus.rot.y = this->actor.shape.rot.y + sp26;
|
||||
}
|
||||
|
@ -10130,9 +10115,6 @@ void func_80847298(Player* this) {
|
|||
|
||||
static f32 D_80854784[] = { 120.0f, 240.0f, 360.0f };
|
||||
|
||||
static u8 sDiveDoActions[] = { DO_ACTION_1, DO_ACTION_2, DO_ACTION_3, DO_ACTION_4,
|
||||
DO_ACTION_5, DO_ACTION_6, DO_ACTION_7, DO_ACTION_8 };
|
||||
|
||||
void func_808473D4(PlayState* play, Player* this) {
|
||||
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_NONE) && (this->actor.category == ACTORCAT_PLAYER)) {
|
||||
Actor* heldActor = this->heldActor;
|
||||
|
@ -10205,6 +10187,9 @@ void func_808473D4(PlayState* play, Player* this) {
|
|||
(this->getItemId < GI_MAX)) {
|
||||
doAction = DO_ACTION_GRAB;
|
||||
} else if (this->stateFlags2 & PLAYER_STATE2_11) {
|
||||
static u8 sDiveDoActions[] = { DO_ACTION_1, DO_ACTION_2, DO_ACTION_3, DO_ACTION_4,
|
||||
DO_ACTION_5, DO_ACTION_6, DO_ACTION_7, DO_ACTION_8 };
|
||||
|
||||
sp24 = (D_80854784[CUR_UPG_VALUE(UPG_SCALE)] - this->actor.yDistToWater) / 40.0f;
|
||||
sp24 = CLAMP(sp24, 0, 7);
|
||||
doAction = sDiveDoActions[sp24];
|
||||
|
@ -11854,10 +11839,6 @@ static AnimSfxEntry D_80854870[] = {
|
|||
};
|
||||
|
||||
void Player_Action_8084B898(Player* this, PlayState* play) {
|
||||
f32 speedTarget;
|
||||
s16 yawTarget;
|
||||
s32 temp;
|
||||
|
||||
this->stateFlags2 |= PLAYER_STATE2_0 | PLAYER_STATE2_6 | PLAYER_STATE2_8;
|
||||
|
||||
if (func_80832CB0(play, this, &gPlayerAnim_link_normal_pushing)) {
|
||||
|
@ -11872,6 +11853,10 @@ void Player_Action_8084B898(Player* this, PlayState* play) {
|
|||
func_8083F524(play, this);
|
||||
|
||||
if (!func_8083F9D0(play, this)) {
|
||||
f32 speedTarget;
|
||||
s16 yawTarget;
|
||||
s32 temp;
|
||||
|
||||
Player_GetMovementSpeedAndYaw(this, &speedTarget, &yawTarget, SPEED_MODE_LINEAR, play);
|
||||
temp = func_8083FFB8(this, &speedTarget, &yawTarget);
|
||||
if (temp < 0) {
|
||||
|
@ -11897,18 +11882,8 @@ static AnimSfxEntry D_80854878[] = {
|
|||
static Vec3f D_80854880 = { 0.0f, 26.0f, -40.0f };
|
||||
|
||||
void Player_Action_8084B9E4(Player* this, PlayState* play) {
|
||||
LinkAnimationHeader* anim;
|
||||
f32 speedTarget;
|
||||
s16 yawTarget;
|
||||
s32 temp1;
|
||||
Vec3f sp5C;
|
||||
f32 temp2;
|
||||
CollisionPoly* sp54;
|
||||
s32 sp50;
|
||||
Vec3f sp44;
|
||||
Vec3f sp38;
|
||||
LinkAnimationHeader* anim = GET_PLAYER_ANIM(PLAYER_ANIMGROUP_pulling, this->modelAnimType);
|
||||
|
||||
anim = GET_PLAYER_ANIM(PLAYER_ANIMGROUP_pulling, this->modelAnimType);
|
||||
this->stateFlags2 |= PLAYER_STATE2_0 | PLAYER_STATE2_6 | PLAYER_STATE2_8;
|
||||
|
||||
if (func_80832CB0(play, this, anim)) {
|
||||
|
@ -11918,6 +11893,7 @@ void Player_Action_8084B9E4(Player* this, PlayState* play) {
|
|||
if (LinkAnimation_OnFrame(&this->skelAnime, 11.0f)) {
|
||||
func_80832698(this, NA_SE_VO_LI_PUSH);
|
||||
}
|
||||
if (!OOT_DEBUG) {}
|
||||
} else {
|
||||
Player_ProcessAnimSfxList(this, D_80854878);
|
||||
}
|
||||
|
@ -11926,6 +11902,10 @@ void Player_Action_8084B9E4(Player* this, PlayState* play) {
|
|||
func_8083F524(play, this);
|
||||
|
||||
if (!func_8083F9D0(play, this)) {
|
||||
f32 speedTarget;
|
||||
s16 yawTarget;
|
||||
s32 temp1;
|
||||
|
||||
Player_GetMovementSpeedAndYaw(this, &speedTarget, &yawTarget, SPEED_MODE_LINEAR, play);
|
||||
temp1 = func_8083FFB8(this, &speedTarget, &yawTarget);
|
||||
if (temp1 > 0) {
|
||||
|
@ -11938,6 +11918,13 @@ void Player_Action_8084B9E4(Player* this, PlayState* play) {
|
|||
}
|
||||
|
||||
if (this->stateFlags2 & PLAYER_STATE2_4) {
|
||||
Vec3f sp5C;
|
||||
f32 temp2;
|
||||
CollisionPoly* sp54;
|
||||
s32 sp50;
|
||||
Vec3f sp44;
|
||||
Vec3f sp38;
|
||||
|
||||
temp2 = func_8083973C(play, this, &D_80854880, &sp5C) - this->actor.world.pos.y;
|
||||
if (fabsf(temp2) < 20.0f) {
|
||||
sp44.x = this->actor.world.pos.x;
|
||||
|
@ -12040,7 +12027,7 @@ void Player_Action_8084BF1C(Player* this, PlayState* play) {
|
|||
Vec3f sp6C;
|
||||
s32 sp68;
|
||||
Vec3f sp5C;
|
||||
f32 temp_f0;
|
||||
DynaPolyActor* wallPolyActor;
|
||||
LinkAnimationHeader* anim1;
|
||||
LinkAnimationHeader* anim2;
|
||||
|
||||
|
@ -12074,7 +12061,7 @@ void Player_Action_8084BF1C(Player* this, PlayState* play) {
|
|||
|
||||
if (this->av2.actionVar2 >= 0) {
|
||||
if ((this->actor.wallPoly != NULL) && (this->actor.wallBgId != BGCHECK_SCENE)) {
|
||||
DynaPolyActor* wallPolyActor = DynaPoly_GetActor(&play->colCtx, this->actor.wallBgId);
|
||||
wallPolyActor = DynaPoly_GetActor(&play->colCtx, this->actor.wallBgId);
|
||||
if (wallPolyActor != NULL) {
|
||||
Math_Vec3f_Diff(&wallPolyActor->actor.world.pos, &wallPolyActor->actor.prevPos, &sp6C);
|
||||
Math_Vec3f_Sum(&this->actor.world.pos, &sp6C, &this->actor.world.pos);
|
||||
|
@ -12094,6 +12081,8 @@ void Player_Action_8084BF1C(Player* this, PlayState* play) {
|
|||
}
|
||||
|
||||
if (sp84 != 0) {
|
||||
f32 temp_f0;
|
||||
|
||||
sp68 = this->av1.actionVar1 + this->av2.actionVar2;
|
||||
|
||||
if (sp84 > 0) {
|
||||
|
@ -12653,14 +12642,14 @@ void func_8084D5CC(PlayState* play, Player* this) {
|
|||
}
|
||||
|
||||
void Player_Action_8084D610(Player* this, PlayState* play) {
|
||||
f32 speedTarget;
|
||||
s16 yawTarget;
|
||||
|
||||
func_80832CB0(play, this, &gPlayerAnim_link_swimer_swim_wait);
|
||||
func_8084B000(this);
|
||||
|
||||
if (!func_8083224C(play) && !Player_TryActionChangeList(play, this, sActionChangeList11, true) &&
|
||||
!func_8083D12C(play, this, sControlInput)) {
|
||||
f32 speedTarget;
|
||||
s16 yawTarget;
|
||||
|
||||
if (this->unk_6AD != 1) {
|
||||
this->unk_6AD = 0;
|
||||
}
|
||||
|
@ -13332,10 +13321,7 @@ void Player_Action_8084EFC0(Player* this, PlayState* play) {
|
|||
if (LinkAnimation_Update(play, &this->skelAnime)) {
|
||||
func_8083C0E8(this, play);
|
||||
Camera_SetFinishedFlag(Play_GetCamera(play, CAM_ID_MAIN));
|
||||
return;
|
||||
}
|
||||
|
||||
if (LinkAnimation_OnFrame(&this->skelAnime, 76.0f)) {
|
||||
} else if (LinkAnimation_OnFrame(&this->skelAnime, 76.0f)) {
|
||||
BottleDropInfo* dropInfo = &D_80854A28[this->itemAction - PLAYER_IA_BOTTLE_FISH];
|
||||
|
||||
Actor_Spawn(&play->actorCtx, play, dropInfo->actorId,
|
||||
|
@ -13344,10 +13330,9 @@ void Player_Action_8084EFC0(Player* this, PlayState* play) {
|
|||
0, dropInfo->actorParams);
|
||||
|
||||
Player_UpdateBottleHeld(play, this, ITEM_BOTTLE_EMPTY, PLAYER_IA_BOTTLE);
|
||||
return;
|
||||
} else {
|
||||
Player_ProcessAnimSfxList(this, D_80854A34);
|
||||
}
|
||||
|
||||
Player_ProcessAnimSfxList(this, D_80854A34);
|
||||
}
|
||||
|
||||
static AnimSfxEntry D_80854A3C[] = {
|
||||
|
@ -14025,8 +14010,6 @@ void Player_Action_808507F4(Player* this, PlayState* play) {
|
|||
}
|
||||
|
||||
void Player_Action_80850AEC(Player* this, PlayState* play) {
|
||||
f32 temp;
|
||||
|
||||
this->stateFlags2 |= PLAYER_STATE2_5;
|
||||
|
||||
if (LinkAnimation_Update(play, &this->skelAnime)) {
|
||||
|
@ -14036,13 +14019,13 @@ void Player_Action_80850AEC(Player* this, PlayState* play) {
|
|||
Math_Vec3f_Sum(&this->actor.world.pos, &this->actor.velocity, &this->actor.world.pos);
|
||||
|
||||
if (func_80834FBC(this)) {
|
||||
f32 temp;
|
||||
|
||||
Math_Vec3f_Copy(&this->actor.prevPos, &this->actor.world.pos);
|
||||
Player_ProcessSceneCollision(play, this);
|
||||
|
||||
temp = this->actor.world.pos.y - this->actor.floorHeight;
|
||||
if (temp > 20.0f) {
|
||||
temp = 20.0f;
|
||||
}
|
||||
temp = CLAMP_MAX(temp, 20.0f);
|
||||
|
||||
this->actor.world.rot.x = this->actor.shape.rot.x = 0;
|
||||
this->actor.world.pos.y -= temp;
|
||||
|
@ -14052,10 +14035,7 @@ void Player_Action_80850AEC(Player* this, PlayState* play) {
|
|||
this->stateFlags2 &= ~PLAYER_STATE2_10;
|
||||
this->actor.bgCheckFlags |= BGCHECKFLAG_GROUND;
|
||||
this->stateFlags1 |= PLAYER_STATE1_2;
|
||||
return;
|
||||
}
|
||||
|
||||
if ((this->skelAnime.animation != &gPlayerAnim_link_hook_fly_start) || (4.0f <= this->skelAnime.curFrame)) {
|
||||
} else if ((this->skelAnime.animation != &gPlayerAnim_link_hook_fly_start) || (4.0f <= this->skelAnime.curFrame)) {
|
||||
this->actor.gravity = 0.0f;
|
||||
Math_ScaledStepToS(&this->actor.shape.rot.x, this->actor.world.rot.x, 0x800);
|
||||
Player_RequestRumble(this, 100, 2, 100, 0);
|
||||
|
|
Loading…
Reference in a new issue