mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-20 05:51:18 +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
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue