summaryrefslogtreecommitdiff
path: root/src/overlays/actors/ovl_En_Test3/z_en_test3.c
diff options
context:
space:
mode:
authorengineer124 <47598039+engineer124@users.noreply.github.com>2024-10-21 11:30:39 +1100
committerGitHub <noreply@github.com>2024-10-20 17:30:39 -0700
commitea323f1712b36aeefa9d770fae5e46cce0dce65f (patch)
treee28aea613df4ccd893c1c2c4cd9d779105caad29 /src/overlays/actors/ovl_En_Test3/z_en_test3.c
parenta7461640410c87c73f7e7283fdb229a4818ac244 (diff)
Player Docs: speedXZ and yaw (#1724)
* rename struct members * PR
Diffstat (limited to 'src/overlays/actors/ovl_En_Test3/z_en_test3.c')
-rw-r--r--src/overlays/actors/ovl_En_Test3/z_en_test3.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/overlays/actors/ovl_En_Test3/z_en_test3.c b/src/overlays/actors/ovl_En_Test3/z_en_test3.c
index 6d6897e42..7cb0a57b7 100644
--- a/src/overlays/actors/ovl_En_Test3/z_en_test3.c
+++ b/src/overlays/actors/ovl_En_Test3/z_en_test3.c
@@ -532,11 +532,11 @@ s32 func_80A3F15C(EnTest3* this, PlayState* play, struct_80A41828* arg2) {
Math_Vec3f_Copy(&this->player.actor.world.pos, &curPathPos);
Math_Vec3f_Copy(&this->player.actor.home.pos, &curPathPos);
Math_Vec3f_Copy(&this->player.actor.prevPos, &curPathPos);
- this->player.currentYaw = Math_Vec3f_Yaw(&this->player.actor.world.pos, &nextPathPos);
+ this->player.yaw = Math_Vec3f_Yaw(&this->player.actor.world.pos, &nextPathPos);
if (arg2->unk_1_0 < 0) {
- this->player.currentYaw += 0x8000;
+ this->player.yaw += 0x8000;
}
- this->player.actor.shape.rot.y = this->player.currentYaw;
+ this->player.actor.shape.rot.y = this->player.yaw;
return true;
}
}
@@ -671,7 +671,7 @@ s32 func_80A3F8D4(EnTest3* this, PlayState* play, struct_80A41828* arg2, Schedul
s32 func_80A3F9A4(EnTest3* this, PlayState* play) {
Math_ScaledStepToS(&this->player.actor.shape.rot.y, this->player.actor.home.rot.y, 0x320);
- this->player.currentYaw = this->player.actor.shape.rot.y;
+ this->player.yaw = this->player.actor.shape.rot.y;
return false;
}
@@ -806,7 +806,7 @@ s32 func_80A3FF10(EnTest3* this, PlayState* play, struct_80A41828* arg2, Schedul
this->player.actor.home.rot.y = -0x2AAB;
this->player.actor.shape.rot.y = -0x2AAB;
- this->player.currentYaw = -0x2AAB;
+ this->player.yaw = -0x2AAB;
//! FAKE:
if (1) {}
return true;
@@ -925,9 +925,9 @@ s32 func_80A40230(EnTest3* this, PlayState* play) {
Math_Vec3f_Copy(&D_80A41D50, &this->player.actor.world.pos);
dx = this->player.actor.world.pos.x - this->player.actor.prevPos.x;
dy = this->player.actor.world.pos.z - this->player.actor.prevPos.z;
- this->player.linearVelocity = sqrtf(SQ(dx) + SQ(dy));
- this->player.linearVelocity *= 1.0f + (1.05f * fabsf(Math_SinS(this->player.floorPitch)));
- sKafeiControlStickMagnitude = (this->player.linearVelocity * 10.0f) + 20.0f;
+ this->player.speedXZ = sqrtf(SQ(dx) + SQ(dy));
+ this->player.speedXZ *= 1.0f + (1.05f * fabsf(Math_SinS(this->player.floorPitch)));
+ sKafeiControlStickMagnitude = (this->player.speedXZ * 10.0f) + 20.0f;
sKafeiControlStickMagnitude = CLAMP_MAX(sKafeiControlStickMagnitude, 60.0f);
sKafeiControlStickAngle = this->player.actor.world.rot.y;
this->player.actor.world.pos.x = this->player.actor.prevPos.x;
@@ -1068,7 +1068,7 @@ void EnTest3_Update(Actor* thisx, PlayState* play2) {
if (D_80A41D48) {
this->player.actor.world.pos.x = D_80A41D50.x;
this->player.actor.world.pos.z = D_80A41D50.z;
- this->player.linearVelocity = 0.0f;
+ this->player.speedXZ = 0.0f;
}
}