summaryrefslogtreecommitdiff
path: root/src/code/z_actor.c
diff options
context:
space:
mode:
authorfig02 <fig02srl@gmail.com>2022-12-24 12:18:57 -0500
committerGitHub <noreply@github.com>2022-12-24 12:18:57 -0500
commit92e03cf747933ea8dbdea0dd996c5d6ef7635ffe (patch)
tree5c8828d115b05a896b3e018398939f5af859a279 /src/code/z_actor.c
parent4a9873775cfda32008cc1f66bd26310b3c2afdf3 (diff)
speedXZ -> speed (#1477)
* speedXZ -> speed * += * revert arg in player function * anon review * engineer review * forgot one * last review * revert decimal
Diffstat (limited to 'src/code/z_actor.c')
-rw-r--r--src/code/z_actor.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/code/z_actor.c b/src/code/z_actor.c
index a58bc208a..964d434b4 100644
--- a/src/code/z_actor.c
+++ b/src/code/z_actor.c
@@ -850,8 +850,8 @@ void func_8002D7EC(Actor* actor) {
}
void func_8002D868(Actor* actor) {
- actor->velocity.x = Math_SinS(actor->world.rot.y) * actor->speedXZ;
- actor->velocity.z = Math_CosS(actor->world.rot.y) * actor->speedXZ;
+ actor->velocity.x = Math_SinS(actor->world.rot.y) * actor->speed;
+ actor->velocity.z = Math_CosS(actor->world.rot.y) * actor->speed;
actor->velocity.y += actor->gravity;
if (actor->velocity.y < actor->minVelocityY) {
@@ -865,11 +865,11 @@ void Actor_MoveForward(Actor* actor) {
}
void func_8002D908(Actor* actor) {
- f32 sp24 = Math_CosS(actor->world.rot.x) * actor->speedXZ;
+ f32 speedXZ = Math_CosS(actor->world.rot.x) * actor->speed;
- actor->velocity.x = Math_SinS(actor->world.rot.y) * sp24;
- actor->velocity.y = Math_SinS(actor->world.rot.x) * actor->speedXZ;
- actor->velocity.z = Math_CosS(actor->world.rot.y) * sp24;
+ actor->velocity.x = Math_SinS(actor->world.rot.y) * speedXZ;
+ actor->velocity.y = Math_SinS(actor->world.rot.x) * actor->speed;
+ actor->velocity.z = Math_CosS(actor->world.rot.y) * speedXZ;
}
void func_8002D97C(Actor* actor) {
@@ -878,7 +878,7 @@ void func_8002D97C(Actor* actor) {
}
void func_8002D9A4(Actor* actor, f32 arg1) {
- actor->speedXZ = Math_CosS(actor->world.rot.x) * arg1;
+ actor->speed = Math_CosS(actor->world.rot.x) * arg1;
actor->velocity.y = -Math_SinS(actor->world.rot.x) * arg1;
}
@@ -3350,9 +3350,9 @@ Actor* Actor_GetProjectileActor(PlayState* play, Actor* refActor, f32 radius) {
(((ArmsHook*)actor)->timer == 0)) {
actor = actor->next;
} else {
- deltaX = Math_SinS(actor->world.rot.y) * (actor->speedXZ * 10.0f);
+ deltaX = Math_SinS(actor->world.rot.y) * (actor->speed * 10.0f);
deltaY = actor->velocity.y + (actor->gravity * 10.0f);
- deltaZ = Math_CosS(actor->world.rot.y) * (actor->speedXZ * 10.0f);
+ deltaZ = Math_CosS(actor->world.rot.y) * (actor->speed * 10.0f);
spA8.x = actor->world.pos.x + deltaX;
spA8.y = actor->world.pos.y + deltaY;
@@ -4091,7 +4091,7 @@ s32 func_80035124(Actor* actor, PlayState* play) {
actor->params = 1;
} else if (!(actor->bgCheckFlags & BGCHECKFLAG_GROUND)) {
Actor_MoveForward(actor);
- Math_SmoothStepToF(&actor->speedXZ, 0.0f, 1.0f, 0.1f, 0.0f);
+ Math_SmoothStepToF(&actor->speed, 0.0f, 1.0f, 0.1f, 0.0f);
} else if ((actor->bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH) && (actor->velocity.y < -4.0f)) {
ret = 1;
} else {
@@ -4299,7 +4299,7 @@ Actor* func_800358DC(Actor* actor, Vec3f* spawnPos, Vec3s* spawnRot, f32* arg3,
spawnPos->z, spawnRot->x, spawnRot->y, actor->objBankIndex, params);
if (spawnedEnPart != NULL) {
spawnedEnPart->actor.scale = actor->scale;
- spawnedEnPart->actor.speedXZ = arg3[0];
+ spawnedEnPart->actor.speed = arg3[0];
spawnedEnPart->displayList = dList;
spawnedEnPart->action = 2;
spawnedEnPart->timer = timer;