mirror of
https://github.com/zeldaret/oot.git
synced 2024-12-27 07:07:09 +00:00
Doc Actor Rotation Functions (last 4 funcs in actor.c) (#1249)
* Cleanup functions * Rename functions * functions comments * fix apostrophes * Renames TurnTo -> Track, other review comments
This commit is contained in:
parent
451b24f79b
commit
b2752a6a2e
23 changed files with 97 additions and 73 deletions
|
@ -532,7 +532,7 @@ s32 Flags_GetInfTable(s32 flag);
|
|||
void Flags_SetInfTable(s32 flag);
|
||||
u16 func_80037C30(PlayState* play, s16 arg1);
|
||||
s32 func_80037D98(PlayState* play, Actor* actor, s16 arg2, s32* arg3);
|
||||
s32 func_80038290(PlayState* play, Actor* actor, Vec3s* arg2, Vec3s* arg3, Vec3f arg4);
|
||||
s32 Actor_TrackPlayer(PlayState* play, Actor* actor, Vec3s* headRot, Vec3s* torsoRot, Vec3f focusPos);
|
||||
void ActorOverlayTable_LogPrint(void);
|
||||
void ActorOverlayTable_Init(void);
|
||||
void ActorOverlayTable_Cleanup(void);
|
||||
|
|
|
@ -5506,93 +5506,117 @@ s32 func_80037D98(PlayState* play, Actor* actor, s16 arg2, s32* arg3) {
|
|||
return false;
|
||||
}
|
||||
|
||||
s32 func_80037F30(Vec3s* arg0, Vec3s* arg1) {
|
||||
Math_SmoothStepToS(&arg0->y, 0, 6, 6200, 100);
|
||||
Math_SmoothStepToS(&arg0->x, 0, 6, 6200, 100);
|
||||
Math_SmoothStepToS(&arg1->y, 0, 6, 6200, 100);
|
||||
Math_SmoothStepToS(&arg1->x, 0, 6, 6200, 100);
|
||||
s32 Actor_TrackNone(Vec3s* headRot, Vec3s* torsoRot) {
|
||||
Math_SmoothStepToS(&headRot->y, 0, 6, 6200, 100);
|
||||
Math_SmoothStepToS(&headRot->x, 0, 6, 6200, 100);
|
||||
Math_SmoothStepToS(&torsoRot->y, 0, 6, 6200, 100);
|
||||
Math_SmoothStepToS(&torsoRot->x, 0, 6, 6200, 100);
|
||||
return true;
|
||||
}
|
||||
|
||||
s32 func_80037FC8(Actor* actor, Vec3f* arg1, Vec3s* arg2, Vec3s* arg3) {
|
||||
s16 sp36;
|
||||
s16 sp34;
|
||||
s16 var;
|
||||
s32 Actor_TrackPoint(Actor* actor, Vec3f* target, Vec3s* headRot, Vec3s* torsoRot) {
|
||||
s16 pitch;
|
||||
s16 yaw;
|
||||
s16 yawDiff;
|
||||
|
||||
sp36 = Math_Vec3f_Pitch(&actor->focus.pos, arg1);
|
||||
sp34 = Math_Vec3f_Yaw(&actor->focus.pos, arg1) - actor->world.rot.y;
|
||||
pitch = Math_Vec3f_Pitch(&actor->focus.pos, target);
|
||||
yaw = Math_Vec3f_Yaw(&actor->focus.pos, target) - actor->world.rot.y;
|
||||
|
||||
Math_SmoothStepToS(&arg2->x, sp36, 6, 2000, 1);
|
||||
arg2->x = (arg2->x < -6000) ? -6000 : ((arg2->x > 6000) ? 6000 : arg2->x);
|
||||
Math_SmoothStepToS(&headRot->x, pitch, 6, 2000, 1);
|
||||
headRot->x = CLAMP(headRot->x, -6000, 6000);
|
||||
|
||||
var = Math_SmoothStepToS(&arg2->y, sp34, 6, 2000, 1);
|
||||
arg2->y = (arg2->y < -8000) ? -8000 : ((arg2->y > 8000) ? 8000 : arg2->y);
|
||||
yawDiff = Math_SmoothStepToS(&headRot->y, yaw, 6, 2000, 1);
|
||||
headRot->y = CLAMP(headRot->y, -8000, 8000);
|
||||
|
||||
if (var && (ABS(arg2->y) < 8000)) {
|
||||
if ((yawDiff != 0) && (ABS(headRot->y) < 8000)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Math_SmoothStepToS(&arg3->y, sp34 - arg2->y, 4, 2000, 1);
|
||||
arg3->y = (arg3->y < -12000) ? -12000 : ((arg3->y > 12000) ? 12000 : arg3->y);
|
||||
Math_SmoothStepToS(&torsoRot->y, yaw - headRot->y, 4, 2000, 1);
|
||||
torsoRot->y = CLAMP(torsoRot->y, -12000, 12000);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
s32 func_80038154(PlayState* play, Actor* actor, Vec3s* arg2, Vec3s* arg3, f32 arg4) {
|
||||
/**
|
||||
* Same as Actor_TrackPlayer, except use the actor's world position as the focus point, with the height
|
||||
* specified.
|
||||
*
|
||||
* @param play
|
||||
* @param actor
|
||||
* @param headRot the computed actor's head's rotation step
|
||||
* @param torsoRot the computed actor's torso's rotation step
|
||||
* @param focusHeight the height of the focus point relative to their world position
|
||||
*
|
||||
* @return true if rotated towards player, false if rotations were stepped back to zero.
|
||||
*
|
||||
* @note same note as Actor_TrackPlayer
|
||||
*/
|
||||
s32 Actor_TrackPlayerSetFocusHeight(PlayState* play, Actor* actor, Vec3s* headRot, Vec3s* torsoRot, f32 focusHeight) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
s32 pad;
|
||||
Vec3f sp2C;
|
||||
s16 var;
|
||||
s16 abs_var;
|
||||
s16 yaw;
|
||||
Vec3f target;
|
||||
|
||||
actor->focus.pos = actor->world.pos;
|
||||
actor->focus.pos.y += arg4;
|
||||
actor->focus.pos.y += focusHeight;
|
||||
|
||||
if (!(((play->csCtx.state != CS_STATE_IDLE) || gDbgCamEnabled) && (gSaveContext.entranceIndex == ENTR_SPOT04_0))) {
|
||||
var = actor->yawTowardsPlayer - actor->shape.rot.y;
|
||||
abs_var = ABS(var);
|
||||
if (abs_var >= 0x4300) {
|
||||
func_80037F30(arg2, arg3);
|
||||
yaw = ABS(BINANG_SUB(actor->yawTowardsPlayer, actor->shape.rot.y));
|
||||
if (yaw >= 0x4300) {
|
||||
Actor_TrackNone(headRot, torsoRot);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (((play->csCtx.state != CS_STATE_IDLE) || gDbgCamEnabled) && (gSaveContext.entranceIndex == ENTR_SPOT04_0)) {
|
||||
sp2C = play->view.eye;
|
||||
target = play->view.eye;
|
||||
} else {
|
||||
sp2C = player->actor.focus.pos;
|
||||
target = player->actor.focus.pos;
|
||||
}
|
||||
|
||||
func_80037FC8(actor, &sp2C, arg2, arg3);
|
||||
Actor_TrackPoint(actor, &target, headRot, torsoRot);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
s32 func_80038290(PlayState* play, Actor* actor, Vec3s* arg2, Vec3s* arg3, Vec3f arg4) {
|
||||
/**
|
||||
* Computes the necessary HeadRot and TorsoRot steps to be added to the normal rotation to smoothly turn an actors's
|
||||
* head and torso towards the player if within a certain yaw, else smoothly returns the rotations back to zero.
|
||||
* Also sets the focus position with the specified point.
|
||||
*
|
||||
* @param play
|
||||
* @param actor
|
||||
* @param headRot the computed actor's head's rotation step
|
||||
* @param torsoRot the computed actor's torso's rotation step
|
||||
* @param focusPos the point to set as the actor's focus position
|
||||
*
|
||||
* @return true if rotated towards player, false if rotations were stepped back to zero.
|
||||
*
|
||||
* @note if in a cutscene or debug camera is enabled, and the last entrance used was Kokiri Forest spawn 0, the computed
|
||||
* rotation will instead turn towards the view eye no matter the yaw.
|
||||
*/
|
||||
s32 Actor_TrackPlayer(PlayState* play, Actor* actor, Vec3s* headRot, Vec3s* torsoRot, Vec3f focusPos) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
s32 pad;
|
||||
Vec3f sp24;
|
||||
s16 var;
|
||||
s16 abs_var;
|
||||
s16 yaw;
|
||||
Vec3f target;
|
||||
|
||||
actor->focus.pos = arg4;
|
||||
actor->focus.pos = focusPos;
|
||||
|
||||
if (!(((play->csCtx.state != CS_STATE_IDLE) || gDbgCamEnabled) && (gSaveContext.entranceIndex == ENTR_SPOT04_0))) {
|
||||
var = actor->yawTowardsPlayer - actor->shape.rot.y;
|
||||
abs_var = ABS(var);
|
||||
if (abs_var >= 0x4300) {
|
||||
func_80037F30(arg2, arg3);
|
||||
yaw = ABS(BINANG_SUB(actor->yawTowardsPlayer, actor->shape.rot.y));
|
||||
if (yaw >= 0x4300) {
|
||||
Actor_TrackNone(headRot, torsoRot);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (((play->csCtx.state != CS_STATE_IDLE) || gDbgCamEnabled) && (gSaveContext.entranceIndex == ENTR_SPOT04_0)) {
|
||||
sp24 = play->view.eye;
|
||||
target = play->view.eye;
|
||||
} else {
|
||||
sp24 = player->actor.focus.pos;
|
||||
target = player->actor.focus.pos;
|
||||
}
|
||||
|
||||
func_80037FC8(actor, &sp24, arg2, arg3);
|
||||
Actor_TrackPoint(actor, &target, headRot, torsoRot);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -859,7 +859,7 @@ void BgDyYoseizo_Update(Actor* thisx, PlayState* play2) {
|
|||
this->heightOffset = this->scale * 7500.0f;
|
||||
Actor_SetFocus(&this->actor, this->heightOffset);
|
||||
this->actor.focus.pos.y = this->heightOffset;
|
||||
func_80038290(play, &this->actor, &this->headRot, &this->torsoRot, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(play, &this->actor, &this->headRot, &this->torsoRot, this->actor.focus.pos);
|
||||
BgDyYoseizo_UpdateEffects(this, play);
|
||||
Actor_SetScale(&this->actor, this->scale);
|
||||
}
|
||||
|
|
|
@ -270,7 +270,7 @@ void EnAni_Update(Actor* thisx, PlayState* play) {
|
|||
}
|
||||
|
||||
if (this->unk_2A8 & 1) {
|
||||
func_80038290(play, &this->actor, &this->unk_29C, &this->unk_2A2, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(play, &this->actor, &this->unk_29C, &this->unk_2A2, this->actor.focus.pos);
|
||||
this->unk_2A2.z = 0;
|
||||
this->unk_2A2.y = this->unk_2A2.z;
|
||||
this->unk_2A2.x = this->unk_2A2.z;
|
||||
|
|
|
@ -497,7 +497,7 @@ void EnBomBowlMan_Update(Actor* thisx, PlayState* play) {
|
|||
}
|
||||
}
|
||||
|
||||
func_80038290(play, &this->actor, &this->unk_218, &this->unk_224, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(play, &this->actor, &this->unk_218, &this->unk_224, this->actor.focus.pos);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -243,7 +243,7 @@ void EnDs_Update(Actor* thisx, PlayState* play) {
|
|||
this->actionFunc(this, play);
|
||||
|
||||
if (this->unk_1E8 & 1) {
|
||||
func_80038290(play, &this->actor, &this->unk_1D8, &this->unk_1DE, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(play, &this->actor, &this->unk_1D8, &this->unk_1DE, this->actor.focus.pos);
|
||||
} else {
|
||||
Math_SmoothStepToS(&this->unk_1D8.x, 0, 6, 0x1838, 100);
|
||||
Math_SmoothStepToS(&this->unk_1D8.y, 0, 6, 0x1838, 100);
|
||||
|
|
|
@ -253,7 +253,7 @@ void EnFu_Update(Actor* thisx, PlayState* play) {
|
|||
Math_SmoothStepToS(&this->unk_2A2.y, 0, 6, 6200, 100);
|
||||
this->behaviorFlags &= ~FU_RESET_LOOK_ANGLE;
|
||||
} else {
|
||||
func_80038290(play, &this->actor, &this->lookAngleOffset, &this->unk_2A2, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(play, &this->actor, &this->lookAngleOffset, &this->unk_2A2, this->actor.focus.pos);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -693,7 +693,7 @@ void EnGe1_TurnToFacePlayer(EnGe1* this, PlayState* play) {
|
|||
if (ABS(angleDiff) <= 0x4000) {
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 6, 4000, 100);
|
||||
this->actor.world.rot.y = this->actor.shape.rot.y;
|
||||
func_80038290(play, &this->actor, &this->headRot, &this->unk_2A2, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(play, &this->actor, &this->headRot, &this->unk_2A2, this->actor.focus.pos);
|
||||
} else {
|
||||
if (angleDiff < 0) {
|
||||
Math_SmoothStepToS(&this->headRot.y, -0x2000, 6, 6200, 0x100);
|
||||
|
@ -710,7 +710,7 @@ void EnGe1_LookAtPlayer(EnGe1* this, PlayState* play) {
|
|||
s16 angleDiff = this->actor.yawTowardsPlayer - this->actor.shape.rot.y;
|
||||
|
||||
if ((ABS(angleDiff) <= 0x4300) && (this->actor.xzDistToPlayer < 100.0f)) {
|
||||
func_80038290(play, &this->actor, &this->headRot, &this->unk_2A2, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(play, &this->actor, &this->headRot, &this->unk_2A2, this->actor.focus.pos);
|
||||
} else {
|
||||
Math_SmoothStepToS(&this->headRot.x, 0, 6, 6200, 100);
|
||||
Math_SmoothStepToS(&this->headRot.y, 0, 6, 6200, 100);
|
||||
|
|
|
@ -397,7 +397,7 @@ void EnGe2_TurnToFacePlayer(EnGe2* this, PlayState* play) {
|
|||
if (ABS(angleDiff) <= 0x4000) {
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 6, 4000, 100);
|
||||
this->actor.world.rot.y = this->actor.shape.rot.y;
|
||||
func_80038290(play, &this->actor, &this->headRot, &this->unk_2EE, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(play, &this->actor, &this->headRot, &this->unk_2EE, this->actor.focus.pos);
|
||||
} else {
|
||||
if (angleDiff < 0) {
|
||||
Math_SmoothStepToS(&this->headRot.y, -0x2000, 6, 6200, 0x100);
|
||||
|
@ -413,7 +413,7 @@ void EnGe2_TurnToFacePlayer(EnGe2* this, PlayState* play) {
|
|||
void EnGe2_LookAtPlayer(EnGe2* this, PlayState* play) {
|
||||
if ((ABS((s16)(this->actor.yawTowardsPlayer - this->actor.shape.rot.y)) <= 0x4300) &&
|
||||
(this->actor.xzDistToPlayer < 200.0f)) {
|
||||
func_80038290(play, &this->actor, &this->headRot, &this->unk_2EE, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(play, &this->actor, &this->headRot, &this->unk_2EE, this->actor.focus.pos);
|
||||
} else {
|
||||
Math_SmoothStepToS(&this->headRot.x, 0, 6, 6200, 100);
|
||||
Math_SmoothStepToS(&this->headRot.y, 0, 6, 6200, 100);
|
||||
|
|
|
@ -98,7 +98,7 @@ void EnGe3_TurnToFacePlayer(EnGe3* this, PlayState* play) {
|
|||
if (ABS(angleDiff) <= 0x4000) {
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 6, 4000, 100);
|
||||
this->actor.world.rot.y = this->actor.shape.rot.y;
|
||||
func_80038290(play, &this->actor, &this->headRot, &this->unk_306, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(play, &this->actor, &this->headRot, &this->unk_306, this->actor.focus.pos);
|
||||
} else {
|
||||
if (angleDiff < 0) {
|
||||
Math_SmoothStepToS(&this->headRot.y, -0x2000, 6, 6200, 0x100);
|
||||
|
@ -114,7 +114,7 @@ void EnGe3_TurnToFacePlayer(EnGe3* this, PlayState* play) {
|
|||
void EnGe3_LookAtPlayer(EnGe3* this, PlayState* play) {
|
||||
if ((ABS((s16)(this->actor.yawTowardsPlayer - this->actor.shape.rot.y)) <= 0x2300) &&
|
||||
(this->actor.xzDistToPlayer < 100.0f)) {
|
||||
func_80038290(play, &this->actor, &this->headRot, &this->unk_306, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(play, &this->actor, &this->headRot, &this->unk_306, this->actor.focus.pos);
|
||||
} else {
|
||||
Math_SmoothStepToS(&this->headRot.x, 0, 6, 6200, 100);
|
||||
Math_SmoothStepToS(&this->headRot.y, 0, 6, 6200, 100);
|
||||
|
|
|
@ -769,7 +769,7 @@ void EnHeishi2_Update(Actor* thisx, PlayState* play) {
|
|||
if ((this->type == 2) || (this->type == 5)) {
|
||||
this->actor.focus.pos.y = 70.0f;
|
||||
Actor_SetFocus(&this->actor, 70.0f);
|
||||
func_80038290(play, &this->actor, &this->unk_260, &this->unk_26C, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(play, &this->actor, &this->unk_260, &this->unk_26C, this->actor.focus.pos);
|
||||
}
|
||||
|
||||
this->unk_2FC++;
|
||||
|
|
|
@ -262,7 +262,7 @@ void func_80A56900(EnHeishi4* this, PlayState* play) {
|
|||
|
||||
void func_80A56994(EnHeishi4* this, PlayState* play) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
func_80038290(play, &this->actor, &this->unk_260, &this->unk_266, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(play, &this->actor, &this->unk_260, &this->unk_266, this->actor.focus.pos);
|
||||
if ((this->unk_282 == Message_GetState(&play->msgCtx)) && Message_ShouldAdvance(play)) {
|
||||
Message_CloseTextbox(play);
|
||||
SET_INFTABLE(INFTABLE_6C);
|
||||
|
|
|
@ -241,7 +241,7 @@ void EnHs_Update(Actor* thisx, PlayState* play) {
|
|||
this->actionFunc(this, play);
|
||||
|
||||
if (this->unk_2A8 & 1) {
|
||||
func_80038290(play, &this->actor, &this->unk_29C, &this->unk_2A2, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(play, &this->actor, &this->unk_29C, &this->unk_2A2, this->actor.focus.pos);
|
||||
this->unk_2A8 &= ~1;
|
||||
} else {
|
||||
Math_SmoothStepToS(&this->unk_29C.x, 12800, 6, 6200, 100);
|
||||
|
|
|
@ -118,7 +118,7 @@ void EnHs2_Update(Actor* thisx, PlayState* play) {
|
|||
}
|
||||
this->actionFunc(this, play);
|
||||
if (this->unk_2A8 & 0x1) {
|
||||
func_80038290(play, &this->actor, &this->unk_29C, &this->unk_2A2, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(play, &this->actor, &this->unk_29C, &this->unk_2A2, this->actor.focus.pos);
|
||||
this->unk_2A8 &= ~1;
|
||||
} else {
|
||||
Math_SmoothStepToS(&this->unk_29C.x, 12800, 6, 6200, 100);
|
||||
|
|
|
@ -185,7 +185,7 @@ void EnJs_Update(Actor* thisx, PlayState* play) {
|
|||
}
|
||||
this->actionFunc(this, play);
|
||||
if (this->unk_284 & 1) {
|
||||
func_80038290(play, &this->actor, &this->unk_278, &this->unk_27E, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(play, &this->actor, &this->unk_278, &this->unk_27E, this->actor.focus.pos);
|
||||
} else {
|
||||
Math_SmoothStepToS(&this->unk_278.x, 0, 6, 0x1838, 0x64);
|
||||
Math_SmoothStepToS(&this->unk_278.y, 0, 6, 0x1838, 0x64);
|
||||
|
|
|
@ -298,7 +298,7 @@ void EnMk_Update(Actor* thisx, PlayState* play) {
|
|||
this->actionFunc(this, play);
|
||||
|
||||
if (this->flags & 1) {
|
||||
func_80038290(play, &this->actor, &this->headRotation, &vec, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(play, &this->actor, &this->headRotation, &vec, this->actor.focus.pos);
|
||||
} else {
|
||||
Math_SmoothStepToS(&this->headRotation.x, 0, 6, 6200, 100);
|
||||
Math_SmoothStepToS(&this->headRotation.y, 0, 6, 6200, 100);
|
||||
|
|
|
@ -488,7 +488,7 @@ void func_80AAE50C(EnMm* this, PlayState* play) {
|
|||
}
|
||||
|
||||
void func_80AAE598(EnMm* this, PlayState* play) {
|
||||
func_80038290(play, &this->actor, &this->unk_248, &this->unk_24E, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(play, &this->actor, &this->unk_248, &this->unk_24E, this->actor.focus.pos);
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
|
||||
if ((func_80AADA70() != 0) && (this->unk_1E0 == 0)) {
|
||||
|
|
|
@ -292,7 +292,7 @@ void EnMm2_Update(Actor* thisx, PlayState* play) {
|
|||
s32 pad;
|
||||
|
||||
if (this->unk_1F4 & 1) {
|
||||
func_80038290(play, &this->actor, &this->unk_1E8, &this->unk_1EE, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(play, &this->actor, &this->unk_1E8, &this->unk_1EE, this->actor.focus.pos);
|
||||
} else {
|
||||
Math_SmoothStepToS(&this->unk_1E8.x, 0, 6, 6200, 100);
|
||||
Math_SmoothStepToS(&this->unk_1E8.y, 0, 6, 6200, 100);
|
||||
|
|
|
@ -184,7 +184,7 @@ void EnSth_FacePlayer(EnSth* this, PlayState* play) {
|
|||
if (ABS(diffRot) <= 0x4000) {
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 6, 0xFA0, 0x64);
|
||||
this->actor.world.rot.y = this->actor.shape.rot.y;
|
||||
func_80038290(play, &this->actor, &this->headRot, &this->unk_2AC, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(play, &this->actor, &this->headRot, &this->unk_2AC, this->actor.focus.pos);
|
||||
} else {
|
||||
if (diffRot < 0) {
|
||||
Math_SmoothStepToS(&this->headRot.y, -0x2000, 6, 0x1838, 0x100);
|
||||
|
@ -200,7 +200,7 @@ void EnSth_LookAtPlayer(EnSth* this, PlayState* play) {
|
|||
s16 diffRot = this->actor.yawTowardsPlayer - this->actor.shape.rot.y;
|
||||
|
||||
if ((ABS(diffRot) <= 0x4300) && (this->actor.xzDistToPlayer < 100.0f)) {
|
||||
func_80038290(play, &this->actor, &this->headRot, &this->unk_2AC, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(play, &this->actor, &this->headRot, &this->unk_2AC, this->actor.focus.pos);
|
||||
} else {
|
||||
Math_SmoothStepToS(&this->headRot.x, 0, 6, 0x1838, 0x64);
|
||||
Math_SmoothStepToS(&this->headRot.y, 0, 6, 0x1838, 0x64);
|
||||
|
|
|
@ -471,7 +471,7 @@ void EnSyatekiMan_Update(Actor* thisx, PlayState* play) {
|
|||
this->blinkFunc(this);
|
||||
this->actor.focus.pos.y = 70.0f;
|
||||
Actor_SetFocus(&this->actor, 70.0f);
|
||||
func_80038290(play, &this->actor, &this->headRot, &this->bodyRot, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(play, &this->actor, &this->headRot, &this->bodyRot, this->actor.focus.pos);
|
||||
}
|
||||
|
||||
s32 EnSyatekiMan_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) {
|
||||
|
|
|
@ -1146,7 +1146,7 @@ void EnTa_Update(Actor* thisx, PlayState* play) {
|
|||
}
|
||||
|
||||
if (this->unk_2E0 & 1) {
|
||||
func_80038290(play, &this->actor, &this->unk_2D4, &this->unk_2DA, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(play, &this->actor, &this->unk_2D4, &this->unk_2DA, this->actor.focus.pos);
|
||||
} else {
|
||||
Math_SmoothStepToS(&this->unk_2D4.x, 0, 6, 6200, 100);
|
||||
Math_SmoothStepToS(&this->unk_2D4.y, 0, 6, 6200, 100);
|
||||
|
|
|
@ -185,7 +185,7 @@ void EnTakaraMan_Update(Actor* thisx, PlayState* play) {
|
|||
}
|
||||
|
||||
Actor_SetFocus(&this->actor, this->height);
|
||||
func_80038290(play, &this->actor, &this->unk_22C, &this->unk_232, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(play, &this->actor, &this->unk_22C, &this->unk_232, this->actor.focus.pos);
|
||||
if (this->eyeTimer == 0) {
|
||||
this->eyeTextureIdx++;
|
||||
if (this->eyeTextureIdx >= 2) {
|
||||
|
|
|
@ -140,7 +140,7 @@ void func_80B4AF18(EnZl1* this, PlayState* play) {
|
|||
Player* player = GET_PLAYER(play);
|
||||
s32 pad;
|
||||
|
||||
func_80038290(play, &this->actor, &this->unk_200, &this->unk_206, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(play, &this->actor, &this->unk_200, &this->unk_206, this->actor.focus.pos);
|
||||
|
||||
if (this->unk_1E6 != 0) {
|
||||
if (Actor_TextboxIsClosing(&this->actor, play)) {
|
||||
|
@ -329,7 +329,7 @@ void func_80B4B240(EnZl1* this, PlayState* play) {
|
|||
frameCount = Animation_GetLastFrame(animHeaderSeg);
|
||||
Animation_Change(&this->skelAnime, animHeaderSeg, 1.0f, 0.0f, frameCount, sp54[sp3C], -10.0f);
|
||||
}
|
||||
func_80038290(play, &this->actor, &this->unk_200, &this->unk_206, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(play, &this->actor, &this->unk_200, &this->unk_206, this->actor.focus.pos);
|
||||
}
|
||||
|
||||
void func_80B4B7F4(CsCmdActorAction* npcAction, Vec3f* pos) {
|
||||
|
@ -410,7 +410,7 @@ void func_80B4B8B4(EnZl1* this, PlayState* play) {
|
|||
}
|
||||
this->actor.velocity.z = (sp68.z - sp74.z) / actionLength;
|
||||
}
|
||||
func_80038290(play, &this->actor, &this->unk_200, &this->unk_206, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(play, &this->actor, &this->unk_200, &this->unk_206, this->actor.focus.pos);
|
||||
Play_CameraSetAtEye(play, this->subCamId, &subCamAt, &subCamEye);
|
||||
Play_CameraSetFov(play, this->subCamId, 70.0f);
|
||||
}
|
||||
|
@ -562,7 +562,7 @@ void func_80B4BF2C(EnZl1* this, PlayState* play) {
|
|||
}
|
||||
break;
|
||||
}
|
||||
func_80038290(play, &this->actor, &this->unk_200, &this->unk_206, this->actor.focus.pos);
|
||||
Actor_TrackPlayer(play, &this->actor, &this->unk_200, &this->unk_206, this->actor.focus.pos);
|
||||
}
|
||||
|
||||
void EnZl1_Update(Actor* thisx, PlayState* play) {
|
||||
|
|
Loading…
Reference in a new issue