diff --git a/docs/tutorial/advanced_control_flow.md b/docs/tutorial/advanced_control_flow.md index 96ba7a43d1..48ef9661b1 100644 --- a/docs/tutorial/advanced_control_flow.md +++ b/docs/tutorial/advanced_control_flow.md @@ -67,7 +67,7 @@ void EnMs_Init(Actor* thisx, PlayState* play) { Actor_SetScale(&this->actor, 0.015f); this->actor.colChkInfo.mass = 0xFF; this->actionFunc = func_80952734; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.velocity.y = 0.0f; this->actor.gravity = -1.0f; } diff --git a/include/z64actor.h b/include/z64actor.h index 7c48cd5cfa..249109a448 100644 --- a/include/z64actor.h +++ b/include/z64actor.h @@ -150,7 +150,7 @@ typedef struct Actor { /* 0x054 */ f32 targetArrowOffset; // Height offset of the target arrow relative to `focus` position /* 0x058 */ Vec3f scale; // Scale of the actor in each axis /* 0x064 */ Vec3f velocity; // Velocity of the actor in each axis - /* 0x070 */ f32 speedXZ; // How fast the actor is traveling along the XZ plane + /* 0x070 */ f32 speed; // Context dependent speed value. Can be used for XZ or XYZ depending on which move function is used /* 0x074 */ f32 gravity; // Acceleration due to gravity. Value is added to Y velocity every frame /* 0x078 */ f32 terminalVelocity; // Sets the lower bounds cap on velocity along the Y axis /* 0x07C */ struct CollisionPoly* wallPoly; // Wall polygon the actor is touching diff --git a/src/code/z_actor.c b/src/code/z_actor.c index 6ba05d4f96..644d933b94 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -1125,8 +1125,8 @@ void Actor_UpdatePos(Actor* actor) { * It is recommended to not call this function directly and use `Actor_MoveWithGravity` instead */ void Actor_UpdateVelocityWithGravity(Actor* actor) { - actor->velocity.x = actor->speedXZ * Math_SinS(actor->world.rot.y); - actor->velocity.z = actor->speedXZ * Math_CosS(actor->world.rot.y); + actor->velocity.x = actor->speed * Math_SinS(actor->world.rot.y); + actor->velocity.z = actor->speed * Math_CosS(actor->world.rot.y); actor->velocity.y += actor->gravity; if (actor->velocity.y < actor->terminalVelocity) { @@ -1150,11 +1150,11 @@ void Actor_MoveWithGravity(Actor* actor) { * It is recommended to not call this function directly and use `Actor_MoveWithoutGravity` instead */ void Actor_UpdateVelocityWithoutGravity(Actor* actor) { - f32 horizontalSpeed = 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) * horizontalSpeed; - actor->velocity.y = Math_SinS(actor->world.rot.x) * actor->speedXZ; - actor->velocity.z = Math_CosS(actor->world.rot.y) * horizontalSpeed; + 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; } /** @@ -1174,11 +1174,11 @@ void Actor_MoveWithoutGravity(Actor* actor) { * It is recommended to not call this function directly and use `Actor_MoveWithoutGravityReverse` instead */ void Actor_UpdateVelocityWithoutGravityReverse(Actor* actor) { - f32 horizontalSpeed = 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) * horizontalSpeed; - actor->velocity.y = Math_SinS(-actor->world.rot.x) * actor->speedXZ; - actor->velocity.z = Math_CosS(actor->world.rot.y) * horizontalSpeed; + 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; } /** @@ -1193,7 +1193,7 @@ void Actor_MoveWithoutGravityReverse(Actor* actor) { * Sets horizontal speed and Y velocity using the `speed` argument and current pitch */ void Actor_SetSpeeds(Actor* actor, f32 speed) { - actor->speedXZ = Math_CosS(actor->world.rot.x) * speed; + actor->speed = Math_CosS(actor->world.rot.x) * speed; actor->velocity.y = -Math_SinS(actor->world.rot.x) * speed; } @@ -3607,7 +3607,7 @@ Actor* func_800BC270(PlayState* play, Actor* actor, f32 arg2, s32 arg3) { ((itemAction->id == ACTOR_EN_ARROW) && (func_800BC188(itemAction->params) & arg3))) { f32 speedXZ; - if ((itemAction->speedXZ <= 0.0f) && (GET_PLAYER(play)->unk_D57 != 0)) { + if ((itemAction->speed <= 0.0f) && (GET_PLAYER(play)->unk_D57 != 0)) { if (itemAction->id == ACTOR_ARMS_HOOK) { speedXZ = 20.0f; } else if (itemAction->id == ACTOR_EN_BOOM) { @@ -3624,7 +3624,7 @@ Actor* func_800BC270(PlayState* play, Actor* actor, f32 arg2, s32 arg3) { } } } else { - speedXZ = itemAction->speedXZ; + speedXZ = itemAction->speed; } if (func_800BC1B4(actor, itemAction, arg2, speedXZ)) { @@ -3644,7 +3644,7 @@ Actor* func_800BC444(PlayState* play, Actor* actor, f32 arg2) { while (explosive != NULL) { if (((explosive->id == ACTOR_EN_BOM) || (explosive->id == ACTOR_EN_BOM_CHU) || (explosive->id == ACTOR_EN_BOMBF))) { - if (func_800BC1B4(actor, explosive, arg2, explosive->speedXZ)) { + if (func_800BC1B4(actor, explosive, arg2, explosive->speed)) { break; } } diff --git a/src/code/z_en_hy_code.c b/src/code/z_en_hy_code.c index 85a5e7e84f..1affc8df7c 100644 --- a/src/code/z_en_hy_code.c +++ b/src/code/z_en_hy_code.c @@ -207,8 +207,8 @@ s32 EnHy_MoveForwards(EnHy* enHy, f32 speedTarget) { s32 reachedEnd = false; Vec3f curPointPos; - Math_SmoothStepToF(&enHy->actor.speedXZ, speedTarget, 0.4f, 1000.0f, 0.0f); - rotStep = enHy->actor.speedXZ * 400.0f; + Math_SmoothStepToF(&enHy->actor.speed, speedTarget, 0.4f, 1000.0f, 0.0f); + rotStep = enHy->actor.speed * 400.0f; if (SubS_CopyPointFromPath(enHy->path, enHy->curPoint, &curPointPos) && SubS_MoveActorToPoint(&enHy->actor, &curPointPos, rotStep)) { enHy->curPoint++; @@ -225,8 +225,8 @@ s32 EnHy_MoveBackwards(EnHy* enHy, f32 speedTarget) { s32 reachedEnd = false; Vec3f curPointPos; - Math_SmoothStepToF(&enHy->actor.speedXZ, speedTarget, 0.4f, 1000.0f, 0.0f); - rotStep = enHy->actor.speedXZ * 400.0f; + Math_SmoothStepToF(&enHy->actor.speed, speedTarget, 0.4f, 1000.0f, 0.0f); + rotStep = enHy->actor.speed * 400.0f; if (SubS_CopyPointFromPath(enHy->path, enHy->curPoint, &curPointPos) && SubS_MoveActorToPoint(&enHy->actor, &curPointPos, rotStep)) { enHy->curPoint--; diff --git a/src/code/z_en_item00.c b/src/code/z_en_item00.c index f450db0149..987f8b10eb 100644 --- a/src/code/z_en_item00.c +++ b/src/code/z_en_item00.c @@ -219,7 +219,7 @@ void EnItem00_Init(Actor* thisx, PlayState* play) { this->unk152 = 15; this->unk14C = 35; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.velocity.y = 0.0f; this->actor.gravity = 0.0f; @@ -346,7 +346,7 @@ void func_800A640C(EnItem00* this, PlayState* play) { this->actor.shape.yOffset = (Math_SinS(this->actor.shape.rot.y) * 150.0f) + 850.0f; } - Math_SmoothStepToF(&this->actor.speedXZ, 0.0f, 1.0f, 0.5f, 0.0f); + Math_SmoothStepToF(&this->actor.speed, 0.0f, 1.0f, 0.5f, 0.0f); if (this->unk14C == 0) { if ((this->actor.params != ITEM00_SMALL_KEY) && (this->actor.params != ITEM00_HEART_PIECE) && @@ -406,7 +406,7 @@ void func_800A6780(EnItem00* this, PlayState* play) { if (this->actor.params == ITEM00_RECOVERY_HEART) { if (this->actor.velocity.y < 0.0f) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.gravity = -0.4f; if (this->actor.velocity.y < -1.5f) { this->actor.velocity.y = -1.5f; @@ -447,7 +447,7 @@ void func_800A6780(EnItem00* this, PlayState* play) { if (this->actor.bgCheckFlags & 3) { this->actionFunc = func_800A640C; this->actor.shape.rot.z = 0; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } } @@ -684,7 +684,7 @@ void EnItem00_Update(Actor* thisx, PlayState* play) { this->unk152 = 15; this->unk14C = 35; this->actor.shape.rot.z = 0; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.velocity.y = 0.0f; this->actor.gravity = 0.0f; @@ -951,7 +951,7 @@ Actor* Item_DropCollectible(PlayState* play, Vec3f* spawnPos, u32 params) { } else { spawnedActor->velocity.y = -2.0f; } - spawnedActor->speedXZ = 2.0f; + spawnedActor->speed = 2.0f; spawnedActor->gravity = -0.9f; spawnedActor->world.rot.y = randPlusMinusPoint5Scaled(0x10000); Actor_SetScale(spawnedActor, 0.0f); @@ -1002,7 +1002,7 @@ Actor* Item_DropCollectible2(PlayState* play, Vec3f* spawnPos, s32 params) { if (spawnedActor != NULL) { if (param8000 == 0) { spawnedActor->velocity.y = 0.0f; - spawnedActor->speedXZ = 0.0f; + spawnedActor->speed = 0.0f; if (param10000 != 0) { spawnedActor->gravity = 0.0f; } else { @@ -1195,7 +1195,7 @@ void Item_DropCollectibleRandom(PlayState* play, Actor* fromActor, Vec3f* spawnP spawnPos->y, spawnPos->z, 0, 0, 0, dropId); if ((spawnedActor != 0) && (dropId != (u8)ITEM00_NO_DROP)) { spawnedActor->actor.velocity.y = 8.0f; - spawnedActor->actor.speedXZ = 2.0f; + spawnedActor->actor.speed = 2.0f; spawnedActor->actor.gravity = -0.9f; spawnedActor->actor.world.rot.y = Rand_ZeroOne() * 40000.0f; Actor_SetScale(&spawnedActor->actor, 0.0f); diff --git a/src/code/z_player_lib.c b/src/code/z_player_lib.c index 51b25268b9..a52a7a5c44 100644 --- a/src/code/z_player_lib.c +++ b/src/code/z_player_lib.c @@ -492,7 +492,7 @@ s32 Player_IsGoronOrDeku(Player* player) { s32 func_801234D4(PlayState* play) { Player* player = GET_PLAYER(play); - return (player->stateFlags2 & PLAYER_STATE2_8) || player->actor.speedXZ != 0.0f || + return (player->stateFlags2 & PLAYER_STATE2_8) || (player->actor.speed != 0.0f) || ((player->transformation != PLAYER_FORM_ZORA) && (player->stateFlags1 & PLAYER_STATE1_8000000)) || ((player->transformation == PLAYER_FORM_ZORA) && (player->stateFlags1 & PLAYER_STATE1_8000000) && (!(player->actor.bgCheckFlags & 1) || (player->currentBoots < PLAYER_BOOTS_ZORA_UNDERWATER))); diff --git a/src/code/z_sub_s.c b/src/code/z_sub_s.c index a792f3ce2d..e4138269f2 100644 --- a/src/code/z_sub_s.c +++ b/src/code/z_sub_s.c @@ -762,7 +762,7 @@ s32 SubS_WeightPathing_Move(Actor* actor, Path* path, s32* waypoint, f32* progre } while (true) { if (!SubS_WeightPathing_ComputePoint(path, *waypoint, &point, *progress, direction) || - ((s32)(actor->speedXZ * 10000.0f) == 0)) { + ((s32)(actor->speed * 10000.0f) == 0)) { return false; } dist = Math_Vec3f_DistXZ(&actor->world.pos, &point); diff --git a/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c b/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c index 3607accaf7..60f0ba274c 100644 --- a/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c +++ b/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c @@ -238,7 +238,7 @@ void ArmsHook_Shoot(ArmsHook* this, PlayState* play) { Actor_MoveWithGravity(&this->actor); Math_Vec3f_Diff(&this->actor.world.pos, &this->actor.prevPos, &prevFrameDiff); Math_Vec3f_Sum(&this->unk1E0, &prevFrameDiff, &this->unk1E0); - this->actor.shape.rot.x = Math_Atan2S_XY(this->actor.speedXZ, -this->actor.velocity.y); + this->actor.shape.rot.x = Math_Atan2S_XY(this->actor.speed, -this->actor.velocity.y); sp60.x = this->unk1EC.x - (this->unk1E0.x - this->unk1EC.x); sp60.y = this->unk1EC.y - (this->unk1E0.y - this->unk1EC.y); sp60.z = this->unk1EC.z - (this->unk1E0.z - this->unk1EC.z); diff --git a/src/overlays/actors/ovl_Bg_F40_Block/z_bg_f40_block.c b/src/overlays/actors/ovl_Bg_F40_Block/z_bg_f40_block.c index b110ba68f1..e6b18c2204 100644 --- a/src/overlays/actors/ovl_Bg_F40_Block/z_bg_f40_block.c +++ b/src/overlays/actors/ovl_Bg_F40_Block/z_bg_f40_block.c @@ -148,7 +148,7 @@ s32 func_80BC3B00(BgF40Block* this) { } } - if (Math_Vec3f_StepTo(&this->dyna.actor.world.pos, &sp28, this->dyna.actor.speedXZ) <= 0.0f) { + if (Math_Vec3f_StepTo(&this->dyna.actor.world.pos, &sp28, this->dyna.actor.speed) <= 0.0f) { this->unk_168 = 6; this->unk_160 = this->unk_164; return true; @@ -182,26 +182,26 @@ s32 func_80BC3D08(BgF40Block* this, PlayState* play, s32 arg2) { if (arg2 != 0) { sp48.x = - (D_80BC4620[this->unk_168].x * ((800.0f * this->dyna.actor.scale.x) - (this->dyna.actor.speedXZ * 0.5f))) + + (D_80BC4620[this->unk_168].x * ((800.0f * this->dyna.actor.scale.x) - (this->dyna.actor.speed * 0.5f))) + this->dyna.actor.world.pos.x; sp48.y = - (D_80BC4620[this->unk_168].y * ((800.0f * this->dyna.actor.scale.y) - (this->dyna.actor.speedXZ * 0.5f))) + + (D_80BC4620[this->unk_168].y * ((800.0f * this->dyna.actor.scale.y) - (this->dyna.actor.speed * 0.5f))) + this->dyna.actor.world.pos.y; sp48.z = - (D_80BC4620[this->unk_168].z * ((800.0f * this->dyna.actor.scale.z) - (this->dyna.actor.speedXZ * 0.5f))) + + (D_80BC4620[this->unk_168].z * ((800.0f * this->dyna.actor.scale.z) - (this->dyna.actor.speed * 0.5f))) + this->dyna.actor.world.pos.z; - sp3C.x = (D_80BC4620[this->unk_168].x * this->dyna.actor.speedXZ) + sp48.x; - sp3C.y = (D_80BC4620[this->unk_168].y * this->dyna.actor.speedXZ) + sp48.y; - sp3C.z = (D_80BC4620[this->unk_168].z * this->dyna.actor.speedXZ) + sp48.z; + sp3C.x = (D_80BC4620[this->unk_168].x * this->dyna.actor.speed) + sp48.x; + sp3C.y = (D_80BC4620[this->unk_168].y * this->dyna.actor.speed) + sp48.y; + sp3C.z = (D_80BC4620[this->unk_168].z * this->dyna.actor.speed) + sp48.z; } else { sp3C.x = (D_80BC4620[this->unk_168].x * 800.0f * this->dyna.actor.scale.x) + this->dyna.actor.world.pos.x; sp3C.y = (D_80BC4620[this->unk_168].y * 800.0f * this->dyna.actor.scale.y) + this->dyna.actor.world.pos.y; sp3C.z = (D_80BC4620[this->unk_168].z * 800.0f * this->dyna.actor.scale.z) + this->dyna.actor.world.pos.z; - sp48.x = sp3C.x - (D_80BC4620[this->unk_168].x * this->dyna.actor.speedXZ * 1.5f); - sp48.y = sp3C.y - (D_80BC4620[this->unk_168].y * this->dyna.actor.speedXZ * 1.5f); - sp48.z = sp3C.z - (D_80BC4620[this->unk_168].z * this->dyna.actor.speedXZ * 1.5f); + sp48.x = sp3C.x - (D_80BC4620[this->unk_168].x * this->dyna.actor.speed * 1.5f); + sp48.y = sp3C.y - (D_80BC4620[this->unk_168].y * this->dyna.actor.speed * 1.5f); + sp48.z = sp3C.z - (D_80BC4620[this->unk_168].z * this->dyna.actor.speed * 1.5f); } if (BgCheck_AnyLineTest1(&play->colCtx, &sp48, &sp3C, &sp30, &sp54, true)) { @@ -240,11 +240,11 @@ void BgF40Block_Init(Actor* thisx, PlayState* play) { if (this->path != NULL) { if (Flags_GetSwitch(play, BGF40BLOCK_GET_SWITCHFLAG(&this->dyna.actor))) { this->actionFunc = func_80BC4530; - this->dyna.actor.speedXZ = 40.0f; + this->dyna.actor.speed = 40.0f; func_80BC3A2C(this, play); } else { this->actionFunc = func_80BC4380; - this->dyna.actor.speedXZ = 20.0f; + this->dyna.actor.speed = 20.0f; func_80BC3980(this, play); } } else { @@ -272,7 +272,7 @@ void func_80BC41AC(BgF40Block* this, PlayState* play) { void func_80BC4228(BgF40Block* this, PlayState* play) { if (func_80BC3B00(this)) { - this->dyna.actor.speedXZ = 20.0f; + this->dyna.actor.speed = 20.0f; if (this->unk_160 < (this->path->count - 1)) { this->unk_164 = this->unk_160 + 1; } else { @@ -332,7 +332,7 @@ void func_80BC43CC(BgF40Block* this, PlayState* play) { void func_80BC4448(BgF40Block* this, PlayState* play) { if (func_80BC3B00(this)) { - this->dyna.actor.speedXZ = 40.0f; + this->dyna.actor.speed = 40.0f; if (this->unk_160 > 0) { this->unk_164 = this->unk_160 - 1; } else { diff --git a/src/overlays/actors/ovl_Bg_Ikana_Dharma/z_bg_ikana_dharma.c b/src/overlays/actors/ovl_Bg_Ikana_Dharma/z_bg_ikana_dharma.c index 3c31f8846c..18eb983259 100644 --- a/src/overlays/actors/ovl_Bg_Ikana_Dharma/z_bg_ikana_dharma.c +++ b/src/overlays/actors/ovl_Bg_Ikana_Dharma/z_bg_ikana_dharma.c @@ -137,7 +137,7 @@ void BgIkanaDharma_Destroy(Actor* thisx, PlayState* play) { void BgIkanaDharma_SetupWaitForHit(BgIkanaDharma* this) { this->actionFunc = BgIkanaDharma_WaitForHit; - this->dyna.actor.speedXZ = 0.0f; + this->dyna.actor.speed = 0.0f; } void BgIkanaDharma_WaitForHit(BgIkanaDharma* this, PlayState* play) { @@ -157,7 +157,7 @@ void BgIkanaDharma_WaitForHit(BgIkanaDharma* this, PlayState* play) { tempAngle1 = BINANG_ADD(this->dyna.actor.yawTowardsPlayer, 0x8000); tempAngle2 = (BINANG_SUB(player->actor.shape.rot.y, tempAngle1) >> 1); this->dyna.actor.world.rot.y = tempAngle1 + tempAngle2 + 0xF000; - this->dyna.actor.speedXZ = 20.0f; + this->dyna.actor.speed = 20.0f; Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_DARUMA_VANISH); BgIkanaDharma_SetupStartCutscene(this); } else if ((this->dyna.actor.flags & ACTOR_FLAG_40) == ACTOR_FLAG_40 && sFirstHitBgIkanaDharma == NULL && diff --git a/src/overlays/actors/ovl_Bg_Spdweb/z_bg_spdweb.c b/src/overlays/actors/ovl_Bg_Spdweb/z_bg_spdweb.c index 5a886d5b30..a1bd0d65d9 100644 --- a/src/overlays/actors/ovl_Bg_Spdweb/z_bg_spdweb.c +++ b/src/overlays/actors/ovl_Bg_Spdweb/z_bg_spdweb.c @@ -314,7 +314,7 @@ void func_809CE4C8(BgSpdweb* this, PlayState* play) { player->stateFlags1 |= PLAYER_STATE1_20; this->unk_161 = 1; } - } else if (player->actor.speedXZ != 0.0f) { + } else if (player->actor.speed != 0.0f) { this->unk_164 = CLAMP_MIN(this->unk_164, 2.0f); } } diff --git a/src/overlays/actors/ovl_Boss_02/z_boss_02.c b/src/overlays/actors/ovl_Boss_02/z_boss_02.c index 7269a61e7e..2ef6227375 100644 --- a/src/overlays/actors/ovl_Boss_02/z_boss_02.c +++ b/src/overlays/actors/ovl_Boss_02/z_boss_02.c @@ -710,10 +710,10 @@ void func_809DAB78(Boss02* this, PlayState* play) { this->unk_0168 = 2000.0f; if (this->unk_0195 != 0) { - this->actor.speedXZ = this->unk_01A8 * D_809DF5B0 * 1.25f; + this->actor.speed = this->unk_01A8 * D_809DF5B0 * 1.25f; this->skelAnime.playSpeed = 2.0f; } else { - this->actor.speedXZ = this->unk_01A8 * D_809DF5B0; + this->actor.speed = this->unk_01A8 * D_809DF5B0; } Actor_UpdateVelocityWithoutGravity(&this->actor); @@ -947,7 +947,7 @@ void func_809DAB78(Boss02* this, PlayState* play) { case 21: this->unk_01A8 = 0.0f; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; if (this->unk_0146[0] == 0) { this->unk_0146[0] = 3; @@ -969,13 +969,13 @@ void func_809DAB78(Boss02* this, PlayState* play) { spCC = player->actor.world.pos.x - this->actor.world.pos.x; spC4 = player->actor.world.pos.z - this->actor.world.pos.z; if (sqrtf(SQ(spCC) + SQ(spC4)) < (400.0f * D_809DF5B0)) { - this->actor.speedXZ = 15.0f * D_809DF5B0; + this->actor.speed = 15.0f * D_809DF5B0; } spCC = this->actor.world.pos.x; spC4 = this->actor.world.pos.z; if (sqrtf(SQ(spCC) + SQ(spC4)) < (400.0f * D_809DF5B0)) { - this->actor.speedXZ = 15.0f * D_809DF5B0; + this->actor.speed = 15.0f * D_809DF5B0; } if (otherTwinmold->unk_0144 >= 10) { @@ -998,7 +998,7 @@ void func_809DAB78(Boss02* this, PlayState* play) { if (this->actor.bgCheckFlags & 1) { this->unk_0144 = 23; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->unk_0170 = this->unk_017C; this->unk_016C = 30; this->unk_0170.y = this->actor.floorHeight; @@ -1958,7 +1958,7 @@ void func_809DD934(Boss02* this, PlayState* play) { temp_a0_5->world.pos.x *= phi_f0_2; temp_a0_5->world.pos.z *= phi_f0_2; - temp_a0_5->speedXZ *= phi_f0_2; + temp_a0_5->speed *= phi_f0_2; temp_a0_5->velocity.x *= phi_f0_2; temp_a0_5->velocity.y *= phi_f0_2; diff --git a/src/overlays/actors/ovl_Boss_03/z_boss_03.c b/src/overlays/actors/ovl_Boss_03/z_boss_03.c index c5d729729e..fba59ca515 100644 --- a/src/overlays/actors/ovl_Boss_03/z_boss_03.c +++ b/src/overlays/actors/ovl_Boss_03/z_boss_03.c @@ -581,7 +581,7 @@ void func_809E34B8(Boss03* this, PlayState* play) { Math_ApproachS(&this->bodyYRot, bodyYRotTarget, 5, 0x100); Math_ApproachS(&this->unk_274, this->unk_276, 1, 0x100); - Math_ApproachF(&this->actor.speedXZ, this->unk_278, 1.0f, this->unk_27C); + Math_ApproachF(&this->actor.speed, this->unk_278, 1.0f, this->unk_27C); Math_ApproachF(&this->unk_260, sinf(this->skelAnime.curFrame * (M_PI / 5.0f)) * 10.0f * 0.01f, 0.5f, 1.0f); if ((this->workTimer[WORK_TIMER_UNK2_A] == 0) && (this->actor.bgCheckFlags & 8)) { @@ -669,7 +669,7 @@ void Boss03_ChasePlayer(Boss03* this, PlayState* play) { Math_ApproachS(&this->bodyYRot, bodyYRotTarget, 5, 0x100); Math_ApproachS(&this->unk_274, this->unk_276, 1, 0x100); - Math_ApproachF(&this->actor.speedXZ, this->unk_278, 1.0f, this->unk_27C); + Math_ApproachF(&this->actor.speed, this->unk_278, 1.0f, this->unk_27C); Math_ApproachF(&this->unk_260, sinf(this->skelAnime.curFrame * (M_PI / 5.0f)) * 10.0f * 0.01f, 0.5f, 1.0f); Actor_MoveWithoutGravityReverse(&this->actor); @@ -765,7 +765,7 @@ void Boss03_CatchPlayer(Boss03* this, PlayState* play) { -0.5f, 5, 0x100); Math_ApproachS(&this->unk_274, this->unk_276, 1, 0x100); - Math_ApproachF(&this->actor.speedXZ, this->unk_278, 1.0f, this->unk_27C); + Math_ApproachF(&this->actor.speed, this->unk_278, 1.0f, this->unk_27C); Math_ApproachF(&this->unk_260, sinf(this->skelAnime.curFrame * (M_PI / 5.0f)) * 10.0f * 0.01f, 0.5f, 1.0f); Actor_MoveWithoutGravityReverse(&this->actor); Math_ApproachS(&this->actor.shape.rot.x, this->actor.world.rot.x, 2, this->unk_274 * 2); @@ -873,7 +873,7 @@ void Boss03_ChewPlayer(Boss03* this, PlayState* play) { switch (this->unk_242) { case 0: - Math_ApproachF(&this->actor.speedXZ, 10.0f, 1.0f, 1.0f); + Math_ApproachF(&this->actor.speed, 10.0f, 1.0f, 1.0f); if (sqrtf(SQ(xDiff) + SQ(zDiff)) < 100.0f) { this->unk_242 = 1; Animation_MorphToLoop(&this->skelAnime, &gGyorgBackingUpAnim, -15.0f); @@ -881,7 +881,7 @@ void Boss03_ChewPlayer(Boss03* this, PlayState* play) { break; case 1: - Math_ApproachF(&this->actor.speedXZ, 0.0f, 1.0f, 0.5f); + Math_ApproachF(&this->actor.speed, 0.0f, 1.0f, 0.5f); Math_ApproachF(&this->actor.world.pos.y, 200.0f, 0.05f, 5.0f); break; } @@ -995,7 +995,7 @@ void Boss03_PrepareCharge(Boss03* this, PlayState* play) { } // Turns back slowly - Math_ApproachF(&this->actor.speedXZ, -3.0f, 1.0f, 0.5f); + Math_ApproachF(&this->actor.speed, -3.0f, 1.0f, 0.5f); Actor_MoveWithoutGravityReverse(&this->actor); } @@ -1032,11 +1032,11 @@ void Boss03_Charge(Boss03* this, PlayState* play) { this->actor.shape.rot = this->actor.world.rot; - Math_ApproachF(&this->actor.speedXZ, 25.0f, 1.0f, 3.0f); + Math_ApproachF(&this->actor.speed, 25.0f, 1.0f, 3.0f); Math_ApproachF(&this->unk_260, sinf(this->skelAnime.curFrame * (M_PI / 5.0f)) * 10.0f * 0.01f, 0.5f, 1.0f); Actor_MoveWithoutGravityReverse(&this->actor); - if (this->actor.speedXZ >= 20.0f) { + if (this->actor.speed >= 20.0f) { // Jump over platform if (this->unk_242 == 1) { if (sqrtf(SQXZ(this->actor.world.pos)) < 700.0f) { @@ -1068,7 +1068,7 @@ void Boss03_SetupJumpOverPlatform(Boss03* this, PlayState* play) { this->actionFunc = Boss03_JumpOverPlatform; this->actor.gravity = -2.0f; this->actor.velocity.y = 30.0f; - this->actor.speedXZ = 25.0f; + this->actor.speed = 25.0f; Boss03_PlayUnderwaterSfx(&this->actor.projectedPos, NA_SE_EN_KONB_JUMP_OLD); } @@ -1171,7 +1171,7 @@ void Boss03_IntroCutscene(Boss03* this, PlayState* play) { case 1: player->actor.world.pos.z = 0.0f; player->actor.world.pos.x = 0.0f; - player->actor.speedXZ = 0.0f; + player->actor.speed = 0.0f; this->subCamEye.x = 100.0f; this->subCamEye.y = 540.0f; @@ -1210,7 +1210,7 @@ void Boss03_IntroCutscene(Boss03* this, PlayState* play) { } if (this->csTimer > 50) { - Math_ApproachF(&this->actor.speedXZ, this->unk_278, 1.0f, 0.1f); + Math_ApproachF(&this->actor.speed, this->unk_278, 1.0f, 0.1f); } if (this->unk_242 < 2) { @@ -1225,7 +1225,7 @@ void Boss03_IntroCutscene(Boss03* this, PlayState* play) { } else { this->unk_278 = 0.0f; bubblesToSpawnNum = 1; - if ((this->actor.speedXZ == 0.0f) && (this->csTimer > 230)) { + if ((this->actor.speed == 0.0f) && (this->csTimer > 230)) { this->csState = 3; this->csTimer = 0; } @@ -1243,7 +1243,7 @@ void Boss03_IntroCutscene(Boss03* this, PlayState* play) { case 3: Boss03_PlayUnderwaterSfx(&this->actor.projectedPos, NA_SE_EN_KONB_PREATTACK_OLD - SFX_FLAG); sp5A = 0x1970; - Math_ApproachF(&this->actor.speedXZ, 15.0f, 1.0f, 2.0f); + Math_ApproachF(&this->actor.speed, 15.0f, 1.0f, 2.0f); if (this->csTimer > 20) { this->csState = 4; this->csTimer = 0; @@ -1276,14 +1276,14 @@ void Boss03_IntroCutscene(Boss03* this, PlayState* play) { this->csState = 5; this->csTimer = 0; this->unk_2D5 = false; - this->actor.speedXZ = -200.0f; + this->actor.speed = -200.0f; Actor_MoveWithoutGravityReverse(&this->actor); this->actor.world.pos.y = this->waterHeight - 150.0f; Play_DisableMotionBlur(); case 5: SkelAnime_Update(&this->skelAnime); - this->actor.speedXZ = 20.0f; + this->actor.speed = 20.0f; Actor_MoveWithoutGravityReverse(&this->actor); player->actor.shape.rot.y = -0x1470; player->actor.world.rot.y = player->actor.shape.rot.y; @@ -1301,7 +1301,7 @@ void Boss03_IntroCutscene(Boss03* this, PlayState* play) { this->csState = 6; this->csTimer = 0; this->actor.gravity = -1.5f; - this->actor.speedXZ = 20.0f; + this->actor.speed = 20.0f; Audio_QueueSeqCmd(NA_BGM_BOSS | 0x8000); Actor_PlaySfx(&this->actor, NA_SE_EN_KONB_JUMP_OLD); @@ -1326,7 +1326,7 @@ void Boss03_IntroCutscene(Boss03* this, PlayState* play) { this->bubbleEffectSpawnCount = 2; this->actor.gravity = 0.0f; Math_ApproachZeroF(&this->actor.velocity.y, 1.0f, 1.0f); - Math_ApproachZeroF(&this->actor.speedXZ, 1.0f, 0.5f); + Math_ApproachZeroF(&this->actor.speed, 1.0f, 0.5f); } else { if (1) {} if (1) {} @@ -1382,7 +1382,7 @@ void Boss03_IntroCutscene(Boss03* this, PlayState* play) { if ((this->csState == 2) || (this->csState == 3)) { Actor_MoveWithoutGravityReverse(&this->actor); - phi_f2 = this->actor.speedXZ * 0.02f; + phi_f2 = this->actor.speed * 0.02f; phi_f2 = CLAMP_MAX(phi_f2, 0.12f); sp5C = Math_SinS(this->unk_240 * sp5A) * phi_f2; @@ -1544,7 +1544,7 @@ void Boss03_DeathCutscene(Boss03* this, PlayState* play) { this->unk_242 = 1; this->actor.gravity = -2.0f; this->actor.velocity.y = 25.0f; - this->actor.speedXZ = 10.0f; + this->actor.speed = 10.0f; this->actor.world.rot.y = this->unk_2BE + 0x8000; this->unk_240 = 0; Actor_PlaySfx(&this->actor, NA_SE_EN_KONB_DEAD_JUMP2_OLD); @@ -1565,7 +1565,7 @@ void Boss03_DeathCutscene(Boss03* this, PlayState* play) { if (this->actor.world.pos.y < PLATFORM_HEIGHT + (100.0f * sp64)) { this->actor.world.pos.y = PLATFORM_HEIGHT + (100.0f * sp64); this->actor.velocity.y = ((Rand_ZeroFloat(10.0f) + 7.5f) * sp64) + 7.5f; - this->actor.speedXZ = ((Rand_ZeroFloat(5.0f) + 2.5f) * sp64) + 2.5f; + this->actor.speed = ((Rand_ZeroFloat(5.0f) + 2.5f) * sp64) + 2.5f; if (Rand_ZeroOne() < 0.5f) { this->shapeRotTargetX = @@ -1778,7 +1778,7 @@ void Boss03_Stunned(Boss03* this, PlayState* play) { this->actor.shape.rot.x = this->actor.world.rot.x; Math_ApproachF(&this->actor.world.pos.y, 100.0f, 0.05f, 5.0f); - Math_ApproachF(&this->actor.speedXZ, 0.0f, 1.0f, 1.5f); + Math_ApproachF(&this->actor.speed, 0.0f, 1.0f, 1.5f); Actor_MoveWithoutGravityReverse(&this->actor); } @@ -2511,13 +2511,13 @@ void Boss03_SeaweedUpdate(Actor* thisx, PlayState* play) { yDiff = player->actor.world.pos.y - this->seaweedSegmentPositions[i].y; zDiff = player->actor.world.pos.z - this->seaweedSegmentPositions[i].z; distanceBetweenSeaweedAndDisturbance = sqrtf(SQ(xDiff) + SQ(yDiff) + SQ(zDiff)); - disturbanceFactor = player->actor.speedXZ * 3.0f + 70.0f; + disturbanceFactor = player->actor.speed * 3.0f + 70.0f; // Player is standing on ground if (player->actor.bgCheckFlags & 1) { maxBendSpeed = 0; } else { - maxBendSpeed = player->actor.speedXZ * 16.0f; + maxBendSpeed = player->actor.speed * 16.0f; if (maxBendSpeed > 0x1000) { maxBendSpeed = 0x1000; } else if (maxBendSpeed < 0x100) { @@ -2550,8 +2550,8 @@ void Boss03_SeaweedUpdate(Actor* thisx, PlayState* play) { break; } - maxBendSpeed = sGyorgBossInstance->actor.speedXZ * 16.0f; - disturbanceFactor = sGyorgBossInstance->actor.speedXZ * 5.0f + 150.0f; + maxBendSpeed = sGyorgBossInstance->actor.speed * 16.0f; + disturbanceFactor = sGyorgBossInstance->actor.speed * 5.0f + 150.0f; if (maxBendSpeed > 0x1000) { maxBendSpeed = 0x1000; } else if (maxBendSpeed < 0x100) { diff --git a/src/overlays/actors/ovl_Boss_04/z_boss_04.c b/src/overlays/actors/ovl_Boss_04/z_boss_04.c index 832466fa7c..a78b7234ec 100644 --- a/src/overlays/actors/ovl_Boss_04/z_boss_04.c +++ b/src/overlays/actors/ovl_Boss_04/z_boss_04.c @@ -431,7 +431,7 @@ void func_809ECD18(Boss04* this, PlayState* play) { Math_ApproachS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 10, 0x200); this->actor.world.pos.y = (this->actor.floorHeight + KREG(17) + 160.0f) + (Math_SinS(this->unk_1F4 * 512) * 10.0f); - Math_ApproachF(&this->actor.speedXZ, this->unk_6D4, 1.0f, 0.5f); + Math_ApproachF(&this->actor.speed, this->unk_6D4, 1.0f, 0.5f); if (this->unk_1F8 == 0) { this->unk_1F8 = Rand_ZeroFloat(100.0f) + 50.0f; @@ -460,7 +460,7 @@ void func_809ECEF4(Boss04* this) { this->unk_1F8 = 0; this->unk_1F6 = 1; this->unk_1FA = 60; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.gravity = -3.0f; } @@ -477,7 +477,7 @@ void func_809ECF58(Boss04* this, PlayState* play) { this->actor.world.rot.y = BINANG_ROT180((s16)Rand_ZeroFloat(8000.0f) + this->actor.world.rot.y); } - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; if (this->actor.bgCheckFlags & 8) { play_sound(NA_SE_IT_BIG_BOMB_EXPLOSION); @@ -496,7 +496,7 @@ void func_809ECF58(Boss04* this, PlayState* play) { if (this->unk_6F4 == 0) { Math_ApproachS(&this->actor.shape.rot.y, this->actor.world.rot.y, 5, 0x1000); if (this->unk_1FA == 0) { - Math_ApproachF(&this->actor.speedXZ, 20.0f, 1.0f, 1.0f); + Math_ApproachF(&this->actor.speed, 20.0f, 1.0f, 1.0f); sp3C.x = this->actor.world.pos.x; sp3C.y = this->actor.floorHeight + 2.0f; sp3C.z = this->actor.world.pos.z; @@ -517,7 +517,7 @@ void func_809ED224(Boss04* this) { this->actionFunc = func_809ED2A0; this->unk_1F8 = 60; this->unk_1FA = 100; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->unk_2D0 = 10000.0f; this->unk_2C8 = 200; Actor_PlaySfx(&this->actor, NA_SE_EN_ME_DEAD); diff --git a/src/overlays/actors/ovl_Demo_Syoten/z_demo_syoten.c b/src/overlays/actors/ovl_Demo_Syoten/z_demo_syoten.c index a91877288f..b1d5c71282 100644 --- a/src/overlays/actors/ovl_Demo_Syoten/z_demo_syoten.c +++ b/src/overlays/actors/ovl_Demo_Syoten/z_demo_syoten.c @@ -313,7 +313,7 @@ void func_80C16BD4(DemoSyoten* this, PlayState* play) { break; case 4: - this->actor.speedXZ = + this->actor.speed = play->csCtx.actorActions[Cutscene_GetActorActionIndex(play, this->unk_3F0)]->urot.z * 0.005493164f; if (this->unk_3EC < this->unk_3E8->count) { if (func_80C16818(this)) { diff --git a/src/overlays/actors/ovl_Dm_Char09/z_dm_char09.c b/src/overlays/actors/ovl_Dm_Char09/z_dm_char09.c index 425bcdcfb1..4420586779 100644 --- a/src/overlays/actors/ovl_Dm_Char09/z_dm_char09.c +++ b/src/overlays/actors/ovl_Dm_Char09/z_dm_char09.c @@ -90,15 +90,15 @@ void func_80AB1FDC(DmChar09* this, PlayState* play) { phi_fv0 = this->speed; phi_fa0 = this->speed * 0.16f; } - Math_StepToF(&thisx->speedXZ, phi_fv0, phi_fa0); - if ((thisx->speedXZ + 0.05f) < sp54) { - Math_Vec3f_Scale(&thisx->velocity, thisx->speedXZ / sp54); + Math_StepToF(&thisx->speed, phi_fv0, phi_fa0); + if ((thisx->speed + 0.05f) < sp54) { + Math_Vec3f_Scale(&thisx->velocity, thisx->speed / sp54); thisx->world.pos.x += thisx->velocity.x; thisx->world.pos.y += thisx->velocity.y; thisx->world.pos.z += thisx->velocity.z; } else { this->unk_21C += this->unk_220; - thisx->speedXZ *= 0.4f; + thisx->speed *= 0.4f; phi_a1 = true; if (((this->unk_21C >= this->unk_218) && (this->unk_220 > 0)) || ((this->unk_21C <= 0) && (this->unk_220 < 0))) { diff --git a/src/overlays/actors/ovl_Elf_Msg6/z_elf_msg6.c b/src/overlays/actors/ovl_Elf_Msg6/z_elf_msg6.c index 0ffb5c7589..1507da5e26 100644 --- a/src/overlays/actors/ovl_Elf_Msg6/z_elf_msg6.c +++ b/src/overlays/actors/ovl_Elf_Msg6/z_elf_msg6.c @@ -278,7 +278,7 @@ void func_80BA1CF8(ElfMsg6* this, PlayState* play) { if ((this->actor.textId == 0x224) && CHECK_WEEKEVENTREG(WEEKEVENTREG_08_40)) { this->actor.textId = 0x25B; - } else if (func_80BA1C00(this) && (player->actor.speedXZ > 1.0f)) { + } else if (func_80BA1C00(this) && (player->actor.speed > 1.0f)) { player->tatlTextId = -this->actor.textId; ActorCutscene_SetIntentToPlay(0x7C); sp20->elfMsg = &this->actor; @@ -319,7 +319,7 @@ void func_80BA1E30(ElfMsg6* this, PlayState* play) { return; } - if (func_80BA1C00(this) && (player->actor.speedXZ > 1.0f)) { + if (func_80BA1C00(this) && (player->actor.speed > 1.0f)) { player->tatlTextId = -this->actor.textId; ActorCutscene_SetIntentToPlay(0x7C); sp20->elfMsg = &this->actor; diff --git a/src/overlays/actors/ovl_En_Akindonuts/z_en_akindonuts.c b/src/overlays/actors/ovl_En_Akindonuts/z_en_akindonuts.c index 6b48c9779e..3ccfd26998 100644 --- a/src/overlays/actors/ovl_En_Akindonuts/z_en_akindonuts.c +++ b/src/overlays/actors/ovl_En_Akindonuts/z_en_akindonuts.c @@ -129,10 +129,10 @@ static InitChainEntry sInitChain[] = { }; void func_80BECBE0(EnAkindonuts* this, s16 arg1) { - f32 sp24 = Math_CosS(this->actor.world.rot.x) * this->actor.speedXZ; + f32 sp24 = Math_CosS(this->actor.world.rot.x) * this->actor.speed; this->actor.velocity.x = Math_SinS(this->actor.world.rot.y) * sp24; - this->actor.velocity.y = Math_SinS(this->actor.world.rot.x) * this->actor.speedXZ; + this->actor.velocity.y = Math_SinS(this->actor.world.rot.x) * this->actor.speed; this->actor.velocity.z = Math_CosS(this->actor.world.rot.y) * sp24; if (arg1) { @@ -1561,9 +1561,9 @@ void func_80BEFAF0(EnAkindonuts* this, PlayState* play) { if (this->unk_334 >= 3) { sp32 = true; } - Math_ApproachF(&this->actor.speedXZ, 1.5f, 0.2f, 1.0f); + Math_ApproachF(&this->actor.speed, 1.5f, 0.2f, 1.0f); } else { - Math_ApproachF(&this->actor.speedXZ, 2.0f, 0.2f, 1.0f); + Math_ApproachF(&this->actor.speed, 2.0f, 0.2f, 1.0f); } func_80BECBE0(this, sp32); diff --git a/src/overlays/actors/ovl_En_Am/z_en_am.c b/src/overlays/actors/ovl_En_Am/z_en_am.c index 79ec20df6f..acefdf5007 100644 --- a/src/overlays/actors/ovl_En_Am/z_en_am.c +++ b/src/overlays/actors/ovl_En_Am/z_en_am.c @@ -265,21 +265,21 @@ void EnAm_ApplyEnemyTexture(EnAm* this, PlayState* play) { void func_808B0208(EnAm* this, PlayState* play) { // If the armos is against a wall, rotate and turn away from it - if ((this->actor.speedXZ > 0.0f) && (this->actor.bgCheckFlags & 8)) { + if ((this->actor.speed > 0.0f) && (this->actor.bgCheckFlags & 8)) { this->actor.world.rot.y = (this->actor.wallYaw * 2) - this->actor.world.rot.y; - this->actor.world.pos.x += this->actor.speedXZ * Math_SinS(this->actor.world.rot.y); - this->actor.world.pos.z += this->actor.speedXZ * Math_CosS(this->actor.world.rot.y); + this->actor.world.pos.x += this->actor.speed * Math_SinS(this->actor.world.rot.y); + this->actor.world.pos.z += this->actor.speed * Math_CosS(this->actor.world.rot.y); } SkelAnime_Update(&this->skelAnime); if (Animation_OnFrame(&this->skelAnime, 8.0f) != 0) { - this->actor.speedXZ = this->speed; + this->actor.speed = this->speed; this->actor.velocity.y = 12.0f; } else if (this->skelAnime.curFrame > 11.0f) { if (!(this->actor.bgCheckFlags & 1)) { this->skelAnime.curFrame = 11.0f; } else { Math_ScaledStepToS(&this->actor.world.rot.y, this->armosYaw, 0x1F40); - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; if (this->actor.bgCheckFlags & 2) { EnAm_SpawnEffects(this, play); } @@ -293,7 +293,7 @@ void func_808B0208(EnAm* this, PlayState* play) { void func_808B0358(EnAm* this) { Animation_PlayLoopSetSpeed(&this->skelAnime, &gArmosHopAnim, 4.0f); this->explodeTimer = 3; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.world.rot.y = this->actor.shape.rot.y; this->speed = 6.0f; this->actionFunc = func_808B03C0; @@ -382,7 +382,7 @@ void EnAm_TakeDamage(EnAm* this, PlayState* play) { Animation_Change(&this->skelAnime, &gArmosTakeDamageAnim, 1.0f, 4.0f, Animation_GetLastFrame(&gArmosTakeDamageAnim) - 6, ANIMMODE_ONCE, 0.0f); func_800BE504(&this->actor, &this->enemyCollider); - this->actor.speedXZ = 6.0f; + this->actor.speed = 6.0f; Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, Animation_GetLastFrame(&gArmosTakeDamageAnim) - 10); Actor_PlaySfx(&this->actor, NA_SE_EN_EYEGOLE_DAMAGE); this->enemyCollider.base.acFlags &= ~AC_ON; @@ -391,7 +391,7 @@ void EnAm_TakeDamage(EnAm* this, PlayState* play) { } void func_808B07A8(EnAm* this, PlayState* play) { - Math_StepToF(&this->actor.speedXZ, 0.0f, 0.5f); + Math_StepToF(&this->actor.speed, 0.0f, 0.5f); if (SkelAnime_Update(&this->skelAnime)) { if (this->actor.colChkInfo.health == 0) { func_808B0820(this); @@ -407,7 +407,7 @@ void func_808B0820(EnAm* this) { this->explodeTimer = 64; this->actor.world.rot.y = this->actor.shape.rot.y; this->actor.flags |= ACTOR_FLAG_10; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->speed = 6.0f; this->actionFunc = func_808B0894; } @@ -451,12 +451,12 @@ void func_808B0894(EnAm* this, PlayState* play) { void func_808B0AD0(EnAm* this, PlayState* play) { Animation_Change(&this->skelAnime, &gArmosPushedBackAnim, 1.0f, 0.0f, 8.0f, ANIMMODE_ONCE, 0.0f); this->actor.world.rot.y = this->actor.yawTowardsPlayer; - this->actor.speedXZ = -6.0f; + this->actor.speed = -6.0f; this->actionFunc = func_808B0B4C; } void func_808B0B4C(EnAm* this, PlayState* play) { - Math_StepToF(&this->actor.speedXZ, 0.0f, 0.5f); + Math_StepToF(&this->actor.speed, 0.0f, 0.5f); if (SkelAnime_Update(&this->skelAnime)) { func_808B0358(this); } diff --git a/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c b/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c index 8fe5c121e0..fa6cd3e757 100644 --- a/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c +++ b/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c @@ -225,7 +225,7 @@ void func_8088A7D8(PlayState* play, EnArrow* this) { this->actionFunc = func_8088B6B0; Animation_PlayOnce(&this->arrow.skelAnime, &gameplay_keep_Anim_012860); this->actor.world.rot.y += (s32)(0x6000 * (Rand_ZeroOne() - 0.5f)) + 0x8000; - this->actor.speedXZ *= 0.02f + (0.02f * Rand_ZeroOne()); + this->actor.speed *= 0.02f + (0.02f * Rand_ZeroOne()); this->actor.gravity = -1.5f; this->unk_260 = 50; this->unk_263 = 1; @@ -375,7 +375,7 @@ void func_8088ACE0(EnArrow* this, PlayState* play) { if (this->actor.params == ENARROW_8) { R_TRANS_FADE_FLASH_ALPHA_STEP = -1; Actor_Spawn(&play->actorCtx, play, ACTOR_EN_M_FIRE1, this->actor.world.pos.x, this->actor.world.pos.y, - this->actor.world.pos.z, 0, 0, 0, this->actor.speedXZ == 0.0f); + this->actor.world.pos.z, 0, 0, 0, this->actor.speed == 0.0f); sp82 = NA_SE_IT_DEKU; } else { sp82 = NA_SE_IT_SLING_REFLECT; @@ -396,7 +396,7 @@ void func_8088ACE0(EnArrow* this, PlayState* play) { Math_Vec3f_Diff(&sp7C->world.pos, &this->actor.world.pos, &this->unk_268); sp7C->flags |= ACTOR_FLAG_8000; this->collider.base.atFlags &= ~AT_HIT; - this->actor.speedXZ *= 0.5f; + this->actor.speed *= 0.5f; this->actor.velocity.y *= 0.5f; } else { this->unk_261 |= 1; @@ -424,9 +424,9 @@ void func_8088ACE0(EnArrow* this, PlayState* play) { func_8088AA98(this, play); if (this->actor.params == ENARROW_7) { if (this->bubble.unk_149 == 0) { - sp78 = sqrtf(SQ(this->actor.speedXZ) + SQ(this->actor.velocity.y)); - sp74 = Math_SinS(this->actor.world.rot.y) * this->actor.speedXZ; - temp_f12_2 = Math_CosS(this->actor.world.rot.y) * this->actor.speedXZ; + sp78 = sqrtf(SQ(this->actor.speed) + SQ(this->actor.velocity.y)); + sp74 = Math_SinS(this->actor.world.rot.y) * this->actor.speed; + temp_f12_2 = Math_CosS(this->actor.world.rot.y) * this->actor.speed; this->actor.prevPos.x = this->actor.world.pos.x - (sp74 * (10.0f / sp78)); this->actor.prevPos.y = this->actor.world.pos.y - (this->actor.velocity.y * (10.0f / sp78)); @@ -456,7 +456,7 @@ void func_8088ACE0(EnArrow* this, PlayState* play) { Math_Vec3f_Copy(&this->unk_228, &this->actor.world.pos); - if (this->actor.speedXZ == 0.0f) { + if (this->actor.speed == 0.0f) { this->actor.velocity.y -= 1.0f; if (this->actor.velocity.y < this->actor.terminalVelocity) { this->actor.velocity.y = this->actor.terminalVelocity; @@ -474,7 +474,7 @@ void func_8088ACE0(EnArrow* this, PlayState* play) { } if (this->actor.params < ENARROW_6) { - this->actor.shape.rot.x = Math_Atan2S_XY(this->actor.speedXZ, -this->actor.velocity.y); + this->actor.shape.rot.x = Math_Atan2S_XY(this->actor.speed, -this->actor.velocity.y); } } @@ -641,7 +641,7 @@ void EnArrow_Draw(Actor* thisx, PlayState* play) { &this->actor, this->actor.projectedPos.z < 160.0f ? 0 : 1); } else if (this->actor.params == ENARROW_7) { s32 spA4 = 255 - (s32)(this->bubble.unk_144 * 4.0f); - f32 spA0 = (this->actor.speedXZ * 0.1f) + 1.0f; + f32 spA0 = (this->actor.speed * 0.1f) + 1.0f; f32 sp9C = (1.0f / spA0); OPEN_DISPS(play->state.gfxCtx); @@ -659,7 +659,7 @@ void EnArrow_Draw(Actor* thisx, PlayState* play) { MTXMODE_APPLY); Matrix_Translate(0.0f, 0.0f, 460.0f, MTXMODE_APPLY); - if (this->actor.speedXZ == 0.0f) { + if (this->actor.speed == 0.0f) { func_800B8118(&this->actor, play, MTXMODE_NEW); gSPDisplayList(POLY_XLU_DISP++, gameplay_keep_DL_06F380); @@ -687,7 +687,7 @@ void EnArrow_Draw(Actor* thisx, PlayState* play) { CLOSE_DISPS(play->state.gfxCtx); return; - } else if (this->actor.speedXZ != 0.0f) { + } else if (this->actor.speed != 0.0f) { u8 sp63 = (Math_CosS(this->unk_260 * 5000) * 127.5f) + 127.5f; f32 sp5C; @@ -710,7 +710,7 @@ void EnArrow_Draw(Actor* thisx, PlayState* play) { Matrix_Push(); Matrix_Mult(&play->billboardMtxF, MTXMODE_APPLY); - if (this->actor.speedXZ == 0.0f) { + if (this->actor.speed == 0.0f) { phi_v0 = 0; } else { phi_v0 = (play->gameplayFrames % 256) * 4000; diff --git a/src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.c b/src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.c index 18ccfb030c..0994ada491 100644 --- a/src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.c +++ b/src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.c @@ -213,7 +213,7 @@ void EnAttackNiw_EnterViewFromOffscreen(EnAttackNiw* this, PlayState* play) { Vec3f flightTarget; s32 pad; - this->actor.speedXZ = 10.0f; + this->actor.speed = 10.0f; // randomTargetCenterOffset is set in _Init, only needs to be set once // but the view is moving, so now we need to re-calculate the spot in space @@ -314,7 +314,7 @@ void EnAttackNiw_AimAtPlayer(EnAttackNiw* this, PlayState* play) { Math_SmoothStepToS(&this->actor.world.rot.y, this->targetRotY, 2, this->rotStep, 0); Math_SmoothStepToS(&this->actor.world.rot.x, this->targetRotX, 2, this->rotStep, 0); Math_ApproachF(&this->rotStep, 10000.0f, 1.0f, 1000.0f); - Math_ApproachF(&this->actor.speedXZ, this->targetXZSpeed, 0.9f, 1.0f); + Math_ApproachF(&this->actor.speed, this->targetXZSpeed, 0.9f, 1.0f); if (this->actor.gravity == -2.0f && this->unkTimer25A == 0 && (this->actor.bgCheckFlags & 8 || this->randomAngleChangeTimer == 0)) { diff --git a/src/overlays/actors/ovl_En_Az/z_en_az.c b/src/overlays/actors/ovl_En_Az/z_en_az.c index 38690e122c..4c611c2734 100644 --- a/src/overlays/actors/ovl_En_Az/z_en_az.c +++ b/src/overlays/actors/ovl_En_Az/z_en_az.c @@ -437,9 +437,9 @@ s32 func_80A95534(PlayState* play, ActorPathing* actorPathing) { this->unk_36C = actorPathing->distSqToCurPointXZ; } } - Math_SmoothStepToF(&this->actor.speedXZ, this->unk_36C, 0.8f, 2.0f, 0.0f); + Math_SmoothStepToF(&this->actor.speed, this->unk_36C, 0.8f, 2.0f, 0.0f); actorPathing->moveFunc = SubS_ActorPathing_MoveWithGravity; - if (actorPathing->distSqToCurPointXZ <= this->actor.speedXZ) { + if (actorPathing->distSqToCurPointXZ <= this->actor.speed) { ret = true; } return ret; @@ -454,11 +454,11 @@ s32 func_80A9565C(PlayState* play, ActorPathing* actorPathing) { actorPathing->moveFunc = func_80A94A90; this->unk_374 |= 0x2000; temp_f0 = func_80A954AC(this); - if ((actorPathing->distSqToCurPointXZ < SQ(this->actor.speedXZ)) || (temp_f0 <= 0.0f)) { + if ((actorPathing->distSqToCurPointXZ < SQ(this->actor.speed)) || (temp_f0 <= 0.0f)) { ret = true; } else { this->unk_39E = this->actor.world.rot.x = - Math_Atan2S(-this->actor.velocity.y, Math_CosS(-this->actor.world.rot.x) * this->actor.speedXZ); + Math_Atan2S(-this->actor.velocity.y, Math_CosS(-this->actor.world.rot.x) * this->actor.speed); } return ret; } @@ -474,10 +474,10 @@ s32 func_80A95730(PlayState* play, ActorPathing* actorPathing) { this->actor.gravity = 0.0f; temp_f0 = func_80A954AC(this); - if ((actorPathing->distSqToCurPointXZ < SQ(this->actor.speedXZ)) || (temp_f0 <= 0.0f)) { + if ((actorPathing->distSqToCurPointXZ < SQ(this->actor.speed)) || (temp_f0 <= 0.0f)) { ret = true; } else { - sp40 = SQ(this->actor.speedXZ) / actorPathing->distSqToCurPoint; + sp40 = SQ(this->actor.speed) / actorPathing->distSqToCurPoint; sp34 = ABS(actorPathing->rotToCurPoint.x - this->actor.world.rot.x); sp3C = (s32)(sp34 * sp40) + 0xAAA; @@ -521,12 +521,12 @@ s32 func_80A958B0(PlayState* play, ActorPathing* actorPathing) { } else { Math_SmoothStepToF(&this->unk_36C, 26.0f, 0.5f, 1.0f, 0.01f); } - Math_SmoothStepToF(&this->actor.speedXZ, this->unk_36C, 0.8f, 2.0f, 0.0f); + Math_SmoothStepToF(&this->actor.speed, this->unk_36C, 0.8f, 2.0f, 0.0f); temp1 = func_80A954AC(this); - if ((actorPathing->distSqToCurPointXZ < SQ(this->actor.speedXZ)) || (temp1 <= 0.0f)) { + if ((actorPathing->distSqToCurPointXZ < SQ(this->actor.speed)) || (temp1 <= 0.0f)) { ret = true; } else { - sp3C = SQ(this->actor.speedXZ) / actorPathing->distSqToCurPoint; + sp3C = SQ(this->actor.speed) / actorPathing->distSqToCurPoint; sp30 = ABS(actorPathing->rotToCurPoint.x - this->actor.world.rot.x); sp2C = (s32)(sp30 * sp3C) + 0xAAA; sp30 = ABS(actorPathing->rotToCurPoint.y - this->actor.world.rot.y); @@ -608,7 +608,7 @@ void func_80A95DA0(EnAz* this, PlayState* play) { SubS_ActorPathing_Init(play, &this->actor.world.pos, &this->actor, sp40, play->setupPathList, BEAVER_GET_PARAM_FF(&this->actor), 0, 0, 1, 1); this->unk_36C = 4.0f; - this->actor.speedXZ = 4.0f; + this->actor.speed = 4.0f; this->actor.gravity = 0.0f; SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationInfo, BEAVER_ANIM_SWIM_WITH_SPINNING_TAIL, &this->animIndex); @@ -665,7 +665,7 @@ void func_80A95FE8(EnAz* this, PlayState* play) { SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationInfo, BEAVER_ANIM_IDLE, &this->animIndex); this->unk_374 &= ~0x1000; this->actor.gravity = -1.0f; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; Math_SmoothStepToS(&this->actor.shape.rot.x, 0, 3, 0x1000, 0x100); Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.world.rot.y, 3, 0x1038, 0x100); if (this->actor.bgCheckFlags & 1) { @@ -1510,7 +1510,7 @@ void func_80A97EAC(EnAz* this, PlayState* play) { SubS_ActorPathing_Init(play, &this->actor.world.pos, &this->actor, &this->unk_300, play->setupPathList, BEAVER_GET_PARAM_FF(&this->actor), 0, 0, 1, 0); this->unk_36C = 8.0f; - this->actor.speedXZ = 8.0f; + this->actor.speed = 8.0f; this->actor.gravity = 0.0f; this->actor.velocity.y = 6.0f; SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationInfo, BEAVER_ANIM_SWIM_WITH_SPINNING_TAIL, @@ -1554,7 +1554,7 @@ void func_80A97F9C(EnAz* this, PlayState* play) { play->transitionTrigger = TRANS_TRIGGER_START; play->transitionType = TRANS_TYPE_FADE_WHITE; gSaveContext.nextTransitionType = TRANS_TYPE_FADE_WHITE; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; func_80A979DC(this, play); } else { if (gSaveContext.timerCurTimes[TIMER_ID_MINIGAME_2] == SECONDS_TO_TIMER(0)) { @@ -1798,7 +1798,7 @@ void EnAz_Draw(Actor* thisx, PlayState* play2) { CLOSE_DISPS(play->state.gfxCtx); } OPEN_DISPS(play->state.gfxCtx); - if ((this->actor.depthInWater >= 28.0f) && (this->actor.speedXZ > 0.5f)) { + if ((this->actor.depthInWater >= 28.0f) && (this->actor.speed > 0.5f)) { Matrix_Translate(this->unk_3B4.x, this->unk_3B4.y, this->unk_3B4.z, MTXMODE_NEW); Matrix_RotateYS(this->actor.shape.rot.y, MTXMODE_APPLY); Matrix_RotateXS(this->actor.shape.rot.x, MTXMODE_APPLY); diff --git a/src/overlays/actors/ovl_En_Baba/z_en_baba.c b/src/overlays/actors/ovl_En_Baba/z_en_baba.c index dd8c5a96fb..b16f33c316 100644 --- a/src/overlays/actors/ovl_En_Baba/z_en_baba.c +++ b/src/overlays/actors/ovl_En_Baba/z_en_baba.c @@ -320,8 +320,8 @@ s32 EnBaba_MoveForward(EnBaba* this, f32 speedTarget) { s32 reachedEnd = false; Vec3f point; - Math_SmoothStepToF(&this->actor.speedXZ, speedTarget, 0.4f, 1000.0f, 0.0f); - rotStep = this->actor.speedXZ * 400.0f; + Math_SmoothStepToF(&this->actor.speed, speedTarget, 0.4f, 1000.0f, 0.0f); + rotStep = this->actor.speed * 400.0f; if (SubS_CopyPointFromPath(this->path, this->waypoint, &point) && SubS_MoveActorToPoint(&this->actor, &point, rotStep)) { this->waypoint++; @@ -485,7 +485,7 @@ void EnBaba_HandleSchedule(EnBaba* this, PlayState* play) { this->animIndex = BOMB_SHOP_LADY_ANIM_KNOCKED_OVER; // Ouch this->textId = 0x2A30; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; Enemy_StartFinishingBlow(play, &this->actor); this->stateFlags |= BOMB_SHOP_LADY_STATE_KNOCKED_OVER; Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, this->animIndex); diff --git a/src/overlays/actors/ovl_En_Baguo/z_en_baguo.c b/src/overlays/actors/ovl_En_Baguo/z_en_baguo.c index 2a4afb087a..516219265a 100644 --- a/src/overlays/actors/ovl_En_Baguo/z_en_baguo.c +++ b/src/overlays/actors/ovl_En_Baguo/z_en_baguo.c @@ -244,17 +244,17 @@ void EnBaguo_Roll(EnBaguo* this, PlayState* play) { this->timer = 100; this->actor.world.rot.y = this->actor.shape.rot.y; this->actionFunc = EnBaguo_Idle; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } else { if (!this->bouncedFlag && this->collider.base.atFlags & AT_BOUNCED) { this->zRollDirection ^= 1; this->bouncedFlag = 1; - this->actor.speedXZ = -7.0f; + this->actor.speed = -7.0f; } Math_ApproachF(&this->currentRotation.x, this->targetRotation.x, 0.2f, 1000.0f); Math_ApproachF(&this->currentRotation.z, this->targetRotation.z, 0.2f, 1000.0f); - Math_ApproachF(&this->actor.speedXZ, 5.0f, 0.3f, 0.5f); + Math_ApproachF(&this->actor.speed, 5.0f, 0.3f, 0.5f); this->actor.world.rot.x += (s16)this->currentRotation.x; if (this->currentRotation.z != 0.0f) { @@ -272,7 +272,7 @@ void EnBaguo_Roll(EnBaguo* this, PlayState* play) { void EnBaguo_SetupRetreatUnderground(EnBaguo* this) { this->action = NEJIRON_ACTION_RETREATING; this->actionFunc = EnBaguo_RetreatUnderground; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } void EnBaguo_RetreatUnderground(EnBaguo* this, PlayState* play) { @@ -330,7 +330,7 @@ void EnBaguo_CheckForDetonation(EnBaguo* this, PlayState* play) { if (i || this->actor.colChkInfo.damageEffect == NEJIRON_DMGEFF_KILL) { Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 8); this->action = NEJIRON_ACTION_EXPLODING; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.shape.shadowScale = 0.0f; for (i = 0; i < ARRAY_COUNT(this->effects); i++) { diff --git a/src/overlays/actors/ovl_En_Bat/z_en_bat.c b/src/overlays/actors/ovl_En_Bat/z_en_bat.c index a8b93fc2f8..519043dd83 100644 --- a/src/overlays/actors/ovl_En_Bat/z_en_bat.c +++ b/src/overlays/actors/ovl_En_Bat/z_en_bat.c @@ -203,7 +203,7 @@ void EnBat_SetupPerch(EnBat* this) { this->collider.dim.worldSphere.center.x = this->actor.focus.pos.x; this->collider.dim.worldSphere.center.y = this->actor.focus.pos.y; this->collider.dim.worldSphere.center.z = this->actor.focus.pos.z; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actionFunc = EnBat_Perch; } @@ -214,7 +214,7 @@ void EnBat_Perch(EnBat* this, PlayState* play) { void EnBat_SetupFlyIdle(EnBat* this) { this->timer = 100; this->collider.base.acFlags |= AC_ON; - this->actor.speedXZ = 3.5f; + this->actor.speed = 3.5f; this->actionFunc = EnBat_FlyIdle; } @@ -262,7 +262,7 @@ void EnBat_FlyIdle(EnBat* this, PlayState* play) { void EnBat_SetupDiveAttack(EnBat* this) { this->collider.base.atFlags |= AT_ON; this->timer = 300; - this->actor.speedXZ = 4.0f; + this->actor.speed = 4.0f; sNumberAttacking++; this->actionFunc = EnBat_DiveAttack; } @@ -317,7 +317,7 @@ void EnBat_DiveAttack(EnBat* this, PlayState* play) { void EnBat_SetupDie(EnBat* this, PlayState* play) { this->actor.flags &= ~ACTOR_FLAG_1; Enemy_StartFinishingBlow(play, &this->actor); - this->actor.speedXZ *= Math_CosS(this->actor.world.rot.x); + this->actor.speed *= Math_CosS(this->actor.world.rot.x); this->actor.bgCheckFlags &= ~1; this->actor.velocity.y = 0.0f; Actor_PlaySfx(&this->actor, NA_SE_EN_FFLY_DEAD); @@ -343,7 +343,7 @@ void EnBat_SetupDie(EnBat* this, PlayState* play) { Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 40); if (this->actor.flags & ACTOR_FLAG_8000) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } this->collider.base.acFlags &= ~AC_ON; @@ -352,7 +352,7 @@ void EnBat_SetupDie(EnBat* this, PlayState* play) { } void EnBat_Die(EnBat* this, PlayState* play) { - Math_StepToF(&this->actor.speedXZ, 0.0f, 0.5f); + Math_StepToF(&this->actor.speed, 0.0f, 0.5f); this->actor.colorFilterTimer = 40; if (!(this->actor.flags & ACTOR_FLAG_8000)) { // Carried by arrow @@ -397,7 +397,7 @@ void EnBat_SetupStunned(EnBat* this) { if (this->actionFunc != EnBat_Stunned) { this->actor.shape.yOffset = 700.0f; this->actor.velocity.y = 0.0f; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.world.pos.y += 13.0f; } Actor_PlaySfx(&this->actor, NA_SE_EN_COMMON_FREEZE); diff --git a/src/overlays/actors/ovl_En_Bb/z_en_bb.c b/src/overlays/actors/ovl_En_Bb/z_en_bb.c index 793054c330..d122c6d2e6 100644 --- a/src/overlays/actors/ovl_En_Bb/z_en_bb.c +++ b/src/overlays/actors/ovl_En_Bb/z_en_bb.c @@ -216,7 +216,7 @@ void EnBb_UpdateStateForFlying(EnBb* this) { Math_StepToF(&this->flameScaleY, 0.8f, 0.1f); Math_StepToF(&this->flameScaleX, 1.0f, 0.1f); EnBb_CheckForWall(this); - Math_StepToF(&this->actor.speedXZ, this->maxSpeed, 0.5f); + Math_StepToF(&this->actor.speed, this->maxSpeed, 0.5f); Math_ApproachS(&this->actor.shape.rot.y, this->targetYRotation, 5, 0x3E8); this->actor.world.rot.y = this->actor.shape.rot.y; } @@ -309,7 +309,7 @@ void EnBb_SetupDown(EnBb* this) { this->collider.base.atFlags |= AT_ON; this->timer = 140; this->collider.base.acFlags |= AC_ON; - this->actor.speedXZ = 2.0f; + this->actor.speed = 2.0f; this->flameScaleY = 0.0f; this->flameScaleX = 0.0f; this->actor.gravity = -2.0f; @@ -363,11 +363,11 @@ void EnBb_SetupDead(EnBb* this, PlayState* play) { func_800BE568(&this->actor, &this->collider); this->timer = 15; this->actor.shape.rot.x += 0x4E20; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 40, NA_SE_EN_BUBLE_DEAD); Item_DropCollectibleRandom(play, &this->actor, &this->actor.world.pos, 0x70); this->actor.velocity.y = 0.0f; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->bodyPartDrawStatus = BB_BODY_PART_DRAW_STATUS_DEAD; this->actor.gravity = -1.5f; @@ -422,12 +422,12 @@ void EnBb_SetupDamage(EnBb* this) { this->drawDmgEffScale = 0.4f; } else if (this->actor.colChkInfo.damageEffect == EN_BB_DMGEFF_STUN) { Actor_SetColorFilter(&this->actor, 0, 255, 0, 20); - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } else if (this->actor.colChkInfo.damageEffect == EN_BB_DMGEFF_HOOKSHOT) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } else { Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 20); - this->actor.speedXZ = 7.0f; + this->actor.speed = 7.0f; } this->actor.gravity = -1.0f; @@ -435,14 +435,14 @@ void EnBb_SetupDamage(EnBb* this) { } void EnBb_Damage(EnBb* this, PlayState* play) { - Math_SmoothStepToF(&this->actor.speedXZ, 0.0f, 1.0f, 0.5f, 0.0f); - if ((this->actor.bgCheckFlags & 1) && (this->actor.speedXZ < 0.1f)) { + Math_SmoothStepToF(&this->actor.speed, 0.0f, 1.0f, 0.5f, 0.0f); + if ((this->actor.bgCheckFlags & 1) && (this->actor.speed < 0.1f)) { EnBb_SetupDown(this); } } void EnBb_SetupFrozen(EnBb* this) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; if (this->actor.velocity.y > 0.0f) { this->actor.velocity.y = 0.0f; } @@ -472,7 +472,7 @@ void EnBb_SetupWaitForRevive(EnBb* this) { this->actor.shape.rot.x = 0; this->actor.world.pos.y += 50.0f; this->timer = 200; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.velocity.y = 0.0f; this->actor.gravity = 0.0f; this->actionFunc = EnBb_WaitForRevive; diff --git a/src/overlays/actors/ovl_En_Bbfall/z_en_bbfall.c b/src/overlays/actors/ovl_En_Bbfall/z_en_bbfall.c index faaf9c67ae..745ab6df51 100644 --- a/src/overlays/actors/ovl_En_Bbfall/z_en_bbfall.c +++ b/src/overlays/actors/ovl_En_Bbfall/z_en_bbfall.c @@ -273,7 +273,7 @@ void EnBbfall_SetupWaitForPlayer(EnBbfall* this) { this->actor.colChkInfo.health = sColChkInfoInit.health; this->actor.colorFilterTimer = 0; this->isBgCheckCollisionEnabled = false; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.gravity = 0.0f; this->actor.velocity.y = 0.0f; Math_Vec3f_Copy(&this->actor.world.pos, &this->actor.home.pos); @@ -323,7 +323,7 @@ void EnBbfall_SetupFly(EnBbfall* this) { this->flameOpacity = 255; this->isBgCheckCollisionEnabled = true; this->actor.bgCheckFlags &= ~1; - this->actor.speedXZ = 5.0f; + this->actor.speed = 5.0f; this->actor.gravity = -1.0f; this->actionFunc = EnBbfall_Fly; } @@ -372,7 +372,7 @@ void EnBbfall_SetupDown(EnBbfall* this) { this->timer = 200; this->flameOpacity = 0; this->collider.base.acFlags |= AC_ON; - this->actor.speedXZ = 2.0f; + this->actor.speed = 2.0f; this->flameScaleY = 0.0f; this->flameScaleX = 0.0f; this->actor.gravity = -2.0f; @@ -430,11 +430,11 @@ void EnBbfall_SetupDead(EnBbfall* this, PlayState* play) { func_800BE5CC(&this->actor, &this->collider, 0); this->timer = 15; this->actor.shape.rot.x += 0x4E20; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 40, NA_SE_EN_BUBLE_DEAD); Item_DropCollectibleRandom(play, &this->actor, &this->actor.world.pos, 0x70); this->actor.velocity.y = 0.0f; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->bodyPartDrawStatus = BBFALL_BODY_PART_DRAW_STATUS_DEAD; this->actor.gravity = -1.5f; @@ -488,20 +488,20 @@ void EnBbfall_SetupDamage(EnBbfall* this) { this->drawDmgEffScale = 0.4f; } else if (this->actor.colChkInfo.damageEffect == EN_BBFALL_DMGEFF_STUN) { Actor_SetColorFilter(&this->actor, 0, 255, 0, 20); - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } else if (this->actor.colChkInfo.damageEffect == EN_BBFALL_DMGEFF_HOOKSHOT) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } else { Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 20); - this->actor.speedXZ = 7.0f; + this->actor.speed = 7.0f; } this->actionFunc = EnBbfall_Damage; } void EnBbfall_Damage(EnBbfall* this, PlayState* play) { - Math_SmoothStepToF(&this->actor.speedXZ, 0.0f, 1.0f, 0.5f, 0.0f); - if ((this->actor.bgCheckFlags & 1) && (this->actor.speedXZ < 0.1f)) { + Math_SmoothStepToF(&this->actor.speed, 0.0f, 1.0f, 0.5f, 0.0f); + if ((this->actor.bgCheckFlags & 1) && (this->actor.speed < 0.1f)) { if (EnBbfall_IsTouchingLava(this, play)) { EnBbfall_SetupSinkIntoLava(this); } else { @@ -511,7 +511,7 @@ void EnBbfall_Damage(EnBbfall* this, PlayState* play) { } void EnBbfall_SetupFrozen(EnBbfall* this) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; if (this->actor.velocity.y > 0.0f) { this->actor.velocity.y = 0.0f; } diff --git a/src/overlays/actors/ovl_En_Bee/z_en_bee.c b/src/overlays/actors/ovl_En_Bee/z_en_bee.c index 602d428020..ad45c3a669 100644 --- a/src/overlays/actors/ovl_En_Bee/z_en_bee.c +++ b/src/overlays/actors/ovl_En_Bee/z_en_bee.c @@ -173,7 +173,7 @@ void EnBee_FlyIdle(EnBee* this, PlayState* play) { } Math_SmoothStepToS(&this->actor.world.rot.y, Math_Vec3f_Yaw(&this->actor.world.pos, &nextPos), 1, 0x7D0, 0); - Math_ApproachF(&this->actor.speedXZ, 3.0f, 0.3f, 1.0f); + Math_ApproachF(&this->actor.speed, 3.0f, 0.3f, 1.0f); if ((this->attackDelayTimer == 0) && (this->actor.params != BEE_BEHAVIOR_IDLE)) { EnBee_SetupAttack(this); @@ -227,7 +227,7 @@ void EnBee_Attack(EnBee* this, PlayState* play) { Math_SmoothStepToS(&this->actor.world.rot.y, Math_Vec3f_Yaw(&this->actor.world.pos, &nextPos), 1, 0x1388, 0); Math_ApproachF(&this->actor.world.pos.y, nextPos.y, 0.3f, 3.0f); - Math_ApproachF(&this->actor.speedXZ, 5.0f, 0.3f, 1.0f); + Math_ApproachF(&this->actor.speed, 5.0f, 0.3f, 1.0f); } void EnBee_UpdateDamage(EnBee* this, PlayState* play) { @@ -238,7 +238,7 @@ void EnBee_UpdateDamage(EnBee* this, PlayState* play) { if (this->collider.base.acFlags & AC_HIT) { Enemy_StartFinishingBlow(play, &this->actor); - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 10, NA_SE_EN_CUTBODY); this->actor.colChkInfo.health = 0; SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 50, NA_SE_EN_EXTINCT); diff --git a/src/overlays/actors/ovl_En_Bh/z_en_bh.c b/src/overlays/actors/ovl_En_Bh/z_en_bh.c index 2aff9891d3..da6bc06a33 100644 --- a/src/overlays/actors/ovl_En_Bh/z_en_bh.c +++ b/src/overlays/actors/ovl_En_Bh/z_en_bh.c @@ -52,7 +52,7 @@ void func_80C22DEC(EnBh* this, PlayState* play) { s16 yRot; s16 zRot; - this->actor.speedXZ = 3.0f; + this->actor.speed = 3.0f; xDiff = this->pos.x - this->actor.world.pos.x; yDiff = this->pos.y - this->actor.world.pos.y; zDiff = this->pos.z - this->actor.world.pos.z; diff --git a/src/overlays/actors/ovl_En_Bigpamet/z_en_bigpamet.c b/src/overlays/actors/ovl_En_Bigpamet/z_en_bigpamet.c index af18596bfe..41fd002f51 100644 --- a/src/overlays/actors/ovl_En_Bigpamet/z_en_bigpamet.c +++ b/src/overlays/actors/ovl_En_Bigpamet/z_en_bigpamet.c @@ -408,7 +408,7 @@ void func_80A282C8(EnBigpamet* this, PlayState* play) { void func_80A28378(EnBigpamet* this) { this->actor.parent->params = GEKKO_INIT_SNAPPER; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actionFunc = func_80A283A0; } @@ -421,7 +421,7 @@ void func_80A283A0(EnBigpamet* this, PlayState* play) { void func_80A283F0(EnBigpamet* this) { Animation_PlayLoop(&this->skelAnime2, &object_tl_Anim_00823C); - this->actor.speedXZ = 1.0f; + this->actor.speed = 1.0f; this->actor.world.rot.y = this->actor.shape.rot.y; this->actor.params = ENBIGPAMET_1; this->actionFunc = func_80A2844C; @@ -435,7 +435,7 @@ void func_80A2844C(EnBigpamet* this, PlayState* play) { 0x400); this->actor.world.rot.y = this->actor.shape.rot.y; } else if (this->actor.parent->params == GEKKO_JUMP_ON_SNAPPER) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } else if (this->actor.parent->params == GEKKO_ON_SNAPPER) { func_80A28E40(this); } @@ -446,7 +446,7 @@ void func_80A284E4(EnBigpamet* this) { this->unk_29E = 0; this->unk_2A8 = 1.0f; this->unk_2A4 = 1.0f; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; Actor_PlaySfx(&this->actor, NA_SE_EN_B_PAMET_VOICE); Actor_PlaySfx(this->actor.parent, NA_SE_EN_FROG_VOICE1); this->actionFunc = func_80A2855C; @@ -468,7 +468,7 @@ void func_80A2855C(EnBigpamet* this, PlayState* play) { void func_80A28618(EnBigpamet* this) { this->actor.draw = func_80A2966C; this->unk_2A8 = 0.5f; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; Actor_PlaySfx(&this->actor, NA_SE_EN_PAMET_CUTTER_ON); this->actionFunc = func_80A2866C; } @@ -499,7 +499,7 @@ void func_80A28708(EnBigpamet* this, PlayState* play) { } void func_80A28760(EnBigpamet* this) { - this->actor.speedXZ = 15.0f; + this->actor.speed = 15.0f; if (this->actor.bgCheckFlags & 8) { s16 temp_v1 = this->actor.yawTowardsPlayer - this->actor.wallYaw; @@ -561,7 +561,7 @@ void func_80A28970(EnBigpamet* this) { this->actor.shape.rot.z = 0; this->collider.base.atFlags &= ~AT_ON; this->collider.info.bumper.dmgFlags = 0xF7CFFFFF; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actionFunc = func_80A289C8; } @@ -618,7 +618,7 @@ void func_80A28B98(EnBigpamet* this, PlayState* play) { this->collider.base.acFlags &= ~AC_ON; this->actor.velocity.y = 22.0f; - this->actor.speedXZ = 5.0f; + this->actor.speed = 5.0f; if ((this->actor.draw == func_80A2966C) && (this->actionFunc != func_80A28DC0)) { this->actor.draw = EnBigpamet_Draw; @@ -659,7 +659,7 @@ void func_80A28D0C(EnBigpamet* this, PlayState* play) { void func_80A28D80(EnBigpamet* this) { this->actor.draw = func_80A2966C; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.shape.rot.x = 0; this->actor.shape.rot.z = 0; this->unk_2A8 = 0.0f; @@ -681,7 +681,7 @@ void func_80A28DC0(EnBigpamet* this, PlayState* play) { void func_80A28E40(EnBigpamet* this) { Animation_MorphToPlayOnce(&this->skelAnime2, &object_tl_Anim_000440, -2.0f); this->actor.flags |= ACTOR_FLAG_1; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actionFunc = func_80A28E98; } diff --git a/src/overlays/actors/ovl_En_Bigpo/z_en_bigpo.c b/src/overlays/actors/ovl_En_Bigpo/z_en_bigpo.c index f5aab7460f..c932959a02 100644 --- a/src/overlays/actors/ovl_En_Bigpo/z_en_bigpo.c +++ b/src/overlays/actors/ovl_En_Bigpo/z_en_bigpo.c @@ -482,7 +482,7 @@ void EnBigpo_SetupWarpOut(EnBigpo* this) { this->rotVelocity = 0x2000; this->idleTimer = 32; this->actor.flags &= ~ACTOR_FLAG_1; // targetable OFF - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; Actor_PlaySfx(&this->actor, NA_SE_EN_PO_DISAPPEAR); this->actionFunc = EnBigpo_WarpingOut; } @@ -556,7 +556,7 @@ void EnBigpo_IdleFlying(EnBigpo* this, PlayState* play) { this->hoverHeightCycleTimer = (this->hoverHeightCycleTimer == 0) ? 40 : (this->hoverHeightCycleTimer - 1); Math_StepToF(&this->savedHeight, player->actor.world.pos.y + 100.0f, 1.5f); this->actor.world.pos.y = (sin_rad(this->hoverHeightCycleTimer * (M_PI / 20)) * 10.0f) + this->savedHeight; - Math_StepToF(&this->actor.speedXZ, 3.0f, 0.2f); + Math_StepToF(&this->actor.speed, 3.0f, 0.2f); func_800B9010(&this->actor, NA_SE_EN_PO_FLY - SFX_FLAG); if (Actor_WorldDistXZToPoint(&this->actor, &this->actor.home.pos) > 300.0f) { this->unk208 = Actor_WorldYawTowardPoint(&this->actor, &this->actor.home.pos); @@ -580,7 +580,7 @@ void EnBigpo_SetupSpinUp(EnBigpo* this) { this->collider.base.atFlags |= AT_ON; this->rotVelocity = 0x800; this->actionFunc = EnBigpo_SpinningUp; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } void EnBigpo_SpinningUp(EnBigpo* this, PlayState* play) { @@ -603,7 +603,7 @@ void EnBigpo_SpinAttack(EnBigpo* this, PlayState* play) { s16 yawDiff; SkelAnime_Update(&this->skelAnime); - Math_StepToF(&this->actor.speedXZ, 10.0f, 1.0f); + Math_StepToF(&this->actor.speed, 10.0f, 1.0f); Math_SmoothStepToF(&this->actor.world.pos.y, player->actor.world.pos.y, 0.3f, 7.5f, 1.0f); EnBigpo_UpdateSpin(this); yawDiff = this->actor.yawTowardsPlayer - this->actor.world.rot.y; @@ -628,7 +628,7 @@ void EnBigpo_SpinningDown(EnBigpo* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); Math_SmoothStepToF(&this->actor.world.pos.y, player->actor.world.pos.y + 100.0f, 0.3f, 5.0f, 1.0f); - Math_StepToF(&this->actor.speedXZ, 0.0f, 0.2f); + Math_StepToF(&this->actor.speed, 0.0f, 0.2f); if (Math_ScaledStepToS(&this->rotVelocity, 0, 0x200)) { // spin down complete, re-allow hittable this->collider.base.colType = COLTYPE_HIT3; @@ -649,14 +649,14 @@ void EnBigpo_HitStun(EnBigpo* this) { this->collider.base.acFlags &= ~AC_ON; func_800BE504(&this->actor, &this->collider); this->actionFunc = EnBigpo_CheckHealth; - this->actor.speedXZ = 5.0f; + this->actor.speed = 5.0f; } /* * check if just damaged or dead */ void EnBigpo_CheckHealth(EnBigpo* this, PlayState* play) { - Math_StepToF(&this->actor.speedXZ, 0.0f, 0.5f); + Math_StepToF(&this->actor.speed, 0.0f, 0.5f); if (SkelAnime_Update(&this->skelAnime)) { if (this->actor.colChkInfo.health == 0) { EnBigpo_SetupDeath(this); @@ -668,7 +668,7 @@ void EnBigpo_CheckHealth(EnBigpo* this, PlayState* play) { void EnBigpo_SetupDeath(EnBigpo* this) { this->idleTimer = 0; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.world.rot.y = this->actor.shape.rot.y; this->actor.hintId = TATL_HINT_ID_NONE; this->collider.base.ocFlags1 &= ~OC1_ON; diff --git a/src/overlays/actors/ovl_En_Bigslime/z_en_bigslime.c b/src/overlays/actors/ovl_En_Bigslime/z_en_bigslime.c index 22ccb33940..a49f161f8a 100644 --- a/src/overlays/actors/ovl_En_Bigslime/z_en_bigslime.c +++ b/src/overlays/actors/ovl_En_Bigslime/z_en_bigslime.c @@ -1020,11 +1020,11 @@ void EnBigslime_SetupMoveOnCeiling(EnBigslime* this) { this->actor.velocity.y = 20.0f; if (this->subCamId != SUB_CAM_ID_DONE) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->ceilingMoveTimer = 20; } else { this->ceilingMoveTimer = 320; - this->actor.speedXZ = 5.0f; + this->actor.speed = 5.0f; } this->wavySurfaceTimer = 0; @@ -1051,7 +1051,7 @@ void EnBigslime_MoveOnCeiling(EnBigslime* this, PlayState* play) { } else if ((this->actor.xzDistToPlayer < 250.0f) || (this->ceilingMoveTimer == 0)) { EnBigslime_SetupDrop(this); } else { - this->actor.speedXZ = (fabsf(Math_SinS(pitch)) * 3.0f) + 5.0f; + this->actor.speed = (fabsf(Math_SinS(pitch)) * 3.0f) + 5.0f; Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 10, 0x800, 0x80); this->gekkoRot.y = this->actor.world.rot.y; } @@ -1060,7 +1060,7 @@ void EnBigslime_MoveOnCeiling(EnBigslime* this, PlayState* play) { void EnBigslime_SetupDrop(EnBigslime* this) { this->actor.velocity.y = 0.0f; this->ceilingDropTimer = 30; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actionFunc = EnBigslime_Drop; } @@ -1818,7 +1818,7 @@ void EnBigslime_SetupFreeze(EnBigslime* this) { s32 i; s32 j; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->freezeTimer = 40; if (this->actor.bgCheckFlags & 1) { this->actor.velocity.y = 0.0f; @@ -2026,7 +2026,7 @@ void EnBigslime_FrozenFall(EnBigslime* this, PlayState* play) { void EnBigslime_SetupJumpGekko(EnBigslime* this) { Animation_PlayLoop(&this->skelAnime, &gGekkoJumpForwardAnim); - this->actor.speedXZ = 8.0f; + this->actor.speed = 8.0f; this->jumpTimer = 100; this->actor.world.rot.y = this->gekkoRot.y; this->gekkoYaw = this->actor.yawTowardsPlayer + 0x8000; @@ -2050,9 +2050,9 @@ void EnBigslime_JumpGekko(EnBigslime* this, PlayState* play) { } if (!(this->actor.bgCheckFlags & 1) || ((this->skelAnime.curFrame > 1.0f) && (this->skelAnime.curFrame < 12.0f))) { - this->actor.speedXZ = 8.0f; + this->actor.speed = 8.0f; } else { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } if (Math_SmoothStepToS(&this->actor.world.rot.y, this->gekkoYaw, 5, 0x1000, 0x80) == 0) { @@ -2087,7 +2087,7 @@ void EnBigslime_JumpGekko(EnBigslime* this, PlayState* play) { void EnBigslime_SetupIdleLookAround(EnBigslime* this) { Animation_PlayOnce(&this->skelAnime, &gGekkoNervousIdleAnim); this->idleTimer = 60; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; if (BINANG_SUB(Actor_WorldYawTowardPoint(&this->actor, &this->actor.home.pos), this->gekkoRot.y) > 0) { this->gekkoYaw = this->gekkoRot.y + (Rand_Next() >> 20) + 0x2000; } else { @@ -2144,7 +2144,7 @@ void EnBigslime_IdleNoticePlayer(EnBigslime* this, PlayState* play) { void EnBigslime_SetupThrowMinislime(EnBigslime* this) { Animation_PlayOnce(&this->skelAnime, &gGekkoWindupPunchAnim); EnBigslime_GekkoSfxOutsideBigslime(this, NA_SE_EN_FROG_HOLD_SLIME); - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actionFunc = EnBigslime_ThrowMinislime; } @@ -2168,7 +2168,7 @@ void EnBigslime_SetupDamageGekko(EnBigslime* this, s32 isNotFrozen) { Animation_MorphToPlayOnce(&this->skelAnime, &gGekkoDamagedAnim, -3.0f); this->gekkoCollider.base.acFlags &= ~AC_ON; this->damageSpinTimer = 20; - this->actor.speedXZ = 10.0f; + this->actor.speed = 10.0f; this->actor.gravity = -2.0f; this->actor.velocity.y = 0.0f; if (isNotFrozen) { @@ -2192,7 +2192,7 @@ void EnBigslime_DamageGekko(EnBigslime* this, PlayState* play) { this->damageSpinTimer--; damageSpinTimer = CLAMP_MAX(this->damageSpinTimer, 10); this->gekkoRot.y += 0x300 * damageSpinTimer; - Math_StepToF(&this->actor.speedXZ, 0.0f, 0.5f); + Math_StepToF(&this->actor.speed, 0.0f, 0.5f); if (this->damageSpinTimer == 0) { EnBigslime_SetupCutscene(this); } @@ -2205,7 +2205,7 @@ void EnBigslime_SetupStunGekko(EnBigslime* this) { } this->actionFunc = EnBigslime_StunGekko; this->skelAnime.playSpeed = 0.0f; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } void EnBigslime_StunGekko(EnBigslime* this, PlayState* play) { @@ -2227,7 +2227,7 @@ void EnBigslime_SetupCutsceneFormBigslime(EnBigslime* this) { this->actor.world.rot.x = -Actor_WorldPitchTowardPoint(&this->actor, &this->actor.home.pos); this->actor.world.rot.y = Actor_WorldYawTowardPoint(&this->actor, &this->actor.home.pos); this->actionFunc = EnBigslime_CutsceneFormBigslime; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } void EnBigslime_CutsceneFormBigslime(EnBigslime* this, PlayState* play) { @@ -2245,7 +2245,7 @@ void EnBigslime_SetupFormBigslime(EnBigslime* this) { this->gekkoRot.x = 0x4000 - this->actor.world.rot.x; this->formBigslimeTimer = 0; this->wavySurfaceTimer = 0; - this->actor.speedXZ = 25.0f; + this->actor.speed = 25.0f; this->gekkoRot.y = this->actor.world.rot.y; this->formBigslimeCutsceneTimer = 2; @@ -2281,7 +2281,7 @@ void EnBigslime_FormBigslime(EnBigslime* this, PlayState* play) { Math_Vec3f_Copy(&this->actor.world.pos, &this->actor.home.pos); this->actor.gravity = 0.0f; this->actor.velocity.y = 0.0f; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; Animation_PlayLoop(&this->skelAnime, &gGekkoSwimForwardAnim); this->formBigslimeCutsceneTimer--; Actor_PlaySfx(&this->actor, NA_SE_EN_B_SLIME_COMBINE); @@ -2324,7 +2324,7 @@ void EnBigslime_SetupCutsceneDefeat(EnBigslime* this, PlayState* play) { Animation_GetLastFrame(&gGekkoDamagedAnim.common), ANIMMODE_ONCE_INTERP, 0.0f); this->gekkoCollider.base.acFlags &= ~AC_ON; this->defeatTimer = 60; - this->actor.speedXZ = 10.0f; + this->actor.speed = 10.0f; this->actor.gravity = -2.0f; this->actor.velocity.y = 0.0f; EnBigslime_GekkoSfxOutsideBigslime(this, NA_SE_EN_FROG_DEAD); @@ -2363,7 +2363,7 @@ void EnBigslime_CutsceneDefeat(EnBigslime* this, PlayState* play) { this->defeatTimer--; defeatTimer = CLAMP_MAX(this->defeatTimer, 10); this->gekkoRot.y += 0x300 * defeatTimer; - if (Math_StepToF(&this->actor.speedXZ, 0.0f, 0.5f)) { + if (Math_StepToF(&this->actor.speed, 0.0f, 0.5f)) { EnBigslime_SetupGekkoDespawn(this, play); } else { // Continue for the camera to follow Gekko as it spins in defeat @@ -2533,7 +2533,7 @@ void EnBigslime_SetupCutscene(EnBigslime* this) { ActorCutscene_SetIntentToPlay(this->cutscene); this->actionFuncStored = this->actionFunc; this->actionFunc = EnBigslime_PlayCutscene; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } void EnBigslime_PlayCutscene(EnBigslime* this, PlayState* play) { diff --git a/src/overlays/actors/ovl_En_Bom/z_en_bom.c b/src/overlays/actors/ovl_En_Bom/z_en_bom.c index bfedfda2c1..134eee5190 100644 --- a/src/overlays/actors/ovl_En_Bom/z_en_bom.c +++ b/src/overlays/actors/ovl_En_Bom/z_en_bom.c @@ -209,7 +209,7 @@ void func_80871058(EnBom* this, PlayState* play) { this->actor.velocity.y = -this->actor.velocity.y; } - if ((this->actor.speedXZ != 0.0f) && (this->actor.bgCheckFlags & 8)) { + if ((this->actor.speed != 0.0f) && (this->actor.bgCheckFlags & 8)) { s16 yDiff = BINANG_SUB(this->actor.wallYaw, this->actor.world.rot.y); if (ABS_ALT(yDiff) > 0x4000) { @@ -219,12 +219,12 @@ void func_80871058(EnBom* this, PlayState* play) { Actor_PlaySfx(&this->actor, this->isPowderKeg ? NA_SE_EV_PUT_DOWN_WOODBOX : NA_SE_EV_BOMB_BOUND); Actor_MoveWithGravity(&this->actor); - this->actor.speedXZ *= 0.7f; + this->actor.speed *= 0.7f; this->actor.bgCheckFlags &= ~8; } if (!(this->actor.bgCheckFlags & 1)) { - Math_StepToF(&this->actor.speedXZ, 0.0f, 0.08f); + Math_StepToF(&this->actor.speed, 0.0f, 0.08f); } else { Vec3f* sp58; u32 sp54 = func_800C99D4(&play->colCtx, this->actor.floorPoly, this->actor.floorBgId); @@ -251,33 +251,33 @@ void func_80871058(EnBom* this, PlayState* play) { Math_ApproachF(&this->actor.shape.yOffset, 700.0f, 1.0f, 700.0f); } - sp40 = Math_SinS(this->actor.world.rot.y) * this->actor.speedXZ; - sp3C = Math_CosS(this->actor.world.rot.y) * this->actor.speedXZ; + sp40 = Math_SinS(this->actor.world.rot.y) * this->actor.speed; + sp3C = Math_CosS(this->actor.world.rot.y) * this->actor.speed; Actor_GetSlopeDirection(this->actor.floorPoly, &slopeNormal, &downwardSlopeYaw); sp40 += 3.0f * slopeNormal.x; sp3C += 3.0f * slopeNormal.z; sp38 = sqrtf(SQ(sp40) + SQ(sp3C)); - if ((sp38 < this->actor.speedXZ) || + if ((sp38 < this->actor.speed) || (SurfaceType_GetSlope(&play->colCtx, this->actor.floorPoly, this->actor.floorBgId) == 1)) { if (sp38 > 16.0f) { - this->actor.speedXZ = 16.0f; + this->actor.speed = 16.0f; } else { - this->actor.speedXZ = sp38; + this->actor.speed = sp38; } this->actor.world.rot.y = Math_Atan2S_XY(sp3C, sp40); } - if (!Math_StepToF(&this->actor.speedXZ, 0.0f, sp58->x)) { + if (!Math_StepToF(&this->actor.speed, 0.0f, sp58->x)) { s16 temp = this->actor.world.rot.y; s32 pad; if (ABS_ALT(BINANG_SUB(this->actor.world.rot.y, this->actor.shape.rot.y)) > 0x4000) { temp = BINANG_ROT180(temp); } - Math_ScaledStepToS(&this->actor.shape.rot.y, temp, this->actor.speedXZ * 100.0f); - this->unk_1FA += (s16)(this->actor.speedXZ * 800.0f); + Math_ScaledStepToS(&this->actor.shape.rot.y, temp, this->actor.speed * 100.0f); + this->unk_1FA += (s16)(this->actor.speed * 800.0f); } if (this->actor.bgCheckFlags & 2) { @@ -444,7 +444,7 @@ void EnBom_Update(Actor* thisx, PlayState* play) { if (this->unk_1FC != 0) { this->unk_1FC--; - Math_ApproachZeroF(&thisx->speedXZ, 1.0f, 1.0f); + Math_ApproachZeroF(&thisx->speed, 1.0f, 1.0f); Actor_MoveWithGravity(thisx); Actor_UpdateBgCheckInfo(play, thisx, 35.0f, 10.0f, 36.0f, 4); if (this->unk_1FC == 0) { diff --git a/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.c b/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.c index cbcc402117..c01dea3048 100644 --- a/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.c +++ b/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.c @@ -184,7 +184,7 @@ void EnBomChu_WaitForRelease(EnBomChu* this, PlayState* play) { func_800B8EF4(play, &this->actor); this->isMoving = true; - this->actor.speedXZ = 8.0f; + this->actor.speed = 8.0f; this->movingSpeed = 8.0f; EnBomChu_SetupMove(this); } @@ -233,7 +233,7 @@ void EnBomChu_Move(EnBomChu* this, PlayState* play) { bgIdUpDown = bgIdSide = BGCHECK_SCENE; isFloorPolyValid = false; - this->actor.speedXZ = this->movingSpeed; + this->actor.speed = this->movingSpeed; lineLength = 2.0f * this->movingSpeed; if ((this->timer == 0) || (this->collider.base.acFlags & AC_HIT) || (this->collider.base.ocFlags1 & OC1_HIT)) { @@ -259,7 +259,7 @@ void EnBomChu_Move(EnBomChu* this, PlayState* play) { isFloorPolyValid = EnBomChu_UpdateFloorPoly(this, polySide, play); Math_Vec3f_Copy(&this->actor.world.pos, &posSide); this->actor.floorBgId = bgIdSide; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } else { if (this->actor.floorPoly != polyUpDown) { isFloorPolyValid = EnBomChu_UpdateFloorPoly(this, polyUpDown, play); @@ -269,7 +269,7 @@ void EnBomChu_Move(EnBomChu* this, PlayState* play) { this->actor.floorBgId = bgIdUpDown; } } else { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; lineLength *= 3.0f; Math_Vec3f_Copy(&posA, &posB); @@ -316,8 +316,8 @@ void EnBomChu_Move(EnBomChu* this, PlayState* play) { func_800B8F98(&this->actor, NA_SE_IT_BOMBCHU_MOVE - SFX_FLAG); } - if (this->actor.speedXZ != 0.0f) { - this->movingSpeed = this->actor.speedXZ; + if (this->actor.speed != 0.0f) { + this->movingSpeed = this->actor.speed; } } @@ -336,7 +336,7 @@ void EnBomChu_Explode(EnBomChu* this, PlayState* play) { } this->timer = 1; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; if (this->actor.depthInWater > 0.0f) { for (i = 0; i < 40; i++) { @@ -441,7 +441,7 @@ void EnBomChu_HandleNonSceneCollision(EnBomChu* this, PlayState* play) { isFloorPolyValid = EnBomChu_UpdateFloorPoly(this, poly, play); Math_Vec3f_Copy(&this->actor.world.pos, &originalWorldPos); this->actor.floorBgId = bgId; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; if (isFloorPolyValid) { EnBomChu_UpdateRotation(this); diff --git a/src/overlays/actors/ovl_En_Bombers2/z_en_bombers2.c b/src/overlays/actors/ovl_En_Bombers2/z_en_bombers2.c index 3157c9d5b1..5d4432de12 100644 --- a/src/overlays/actors/ovl_En_Bombers2/z_en_bombers2.c +++ b/src/overlays/actors/ovl_En_Bombers2/z_en_bombers2.c @@ -322,7 +322,7 @@ void func_80C0520C(EnBombers2* this, PlayState* play) { if ((fabsf(this->unk_29C.x - this->actor.world.pos.x) < 3.0f) && (fabsf(this->unk_29C.z - this->actor.world.pos.z) < 3.0f)) { this->unk_2B6 = this->actor.yawTowardsPlayer; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; if (fabsf(this->actor.world.rot.y - this->actor.yawTowardsPlayer) < 100.0f) { func_801477B4(play); this->talkState = TEXT_STATE_5; diff --git a/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c b/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c index fe0101ab4f..aff0579b12 100644 --- a/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c +++ b/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c @@ -168,7 +168,7 @@ void func_808AEAE0(EnBombf* this, PlayState* play) { } else if ((this->colliderCylinder.base.acFlags & AC_HIT) && ((this->colliderCylinder.info.acHitInfo->toucher.dmgFlags & 0x13828) || ((this->colliderCylinder.info.acHitInfo->toucher.dmgFlags & 0x200) && - (player->transformation == PLAYER_FORM_GORON) && (player->actor.speedXZ > 15.0f)))) { + (player->transformation == PLAYER_FORM_GORON) && (player->actor.speed > 15.0f)))) { this->colliderCylinder.base.acFlags &= ~AC_HIT; if (this->colliderCylinder.base.ac->category != ACTORCAT_BOSS) { bombf = (EnBombf*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_BOMBF, this->actor.world.pos.x, @@ -233,11 +233,11 @@ void func_808AEE3C(EnBombf* this, PlayState* play) { this->unk_204 = 1.0f; if (!(this->actor.bgCheckFlags & 1)) { - Math_SmoothStepToF(&this->actor.speedXZ, 0.0f, 1.0f, 0.025f, 0.0f); + Math_SmoothStepToF(&this->actor.speed, 0.0f, 1.0f, 0.025f, 0.0f); return; } - Math_SmoothStepToF(&this->actor.speedXZ, 0.0f, 1.0f, 1.5f, 0.0f); + Math_SmoothStepToF(&this->actor.speed, 0.0f, 1.0f, 1.5f, 0.0f); if (this->actor.bgCheckFlags & 2) { func_800B8EF4(play, &this->actor); if (this->actor.velocity.y < -6.0f) { @@ -345,7 +345,7 @@ void EnBombf_Update(Actor* thisx, PlayState* play) { this->actor.velocity.y = -this->actor.velocity.y; } - if ((this->actor.speedXZ != 0.0f) && (this->actor.bgCheckFlags & 8)) { + if ((this->actor.speed != 0.0f) && (this->actor.bgCheckFlags & 8)) { s16 yDiff = BINANG_SUB(this->actor.wallYaw, this->actor.world.rot.y); if (ABS_ALT(yDiff) > 0x4000) { @@ -357,7 +357,7 @@ void EnBombf_Update(Actor* thisx, PlayState* play) { DREG(6) = 1; Actor_UpdateBgCheckInfo(play, &this->actor, 5.0f, 10.0f, 0.0f, 0x1F); DREG(6) = 0; - this->actor.speedXZ *= 0.7f; + this->actor.speed *= 0.7f; this->actor.bgCheckFlags &= ~8; } diff --git a/src/overlays/actors/ovl_En_Bomjimb/z_en_bomjimb.c b/src/overlays/actors/ovl_En_Bomjimb/z_en_bomjimb.c index 5f852993ba..042b4e332b 100644 --- a/src/overlays/actors/ovl_En_Bomjimb/z_en_bomjimb.c +++ b/src/overlays/actors/ovl_En_Bomjimb/z_en_bomjimb.c @@ -215,7 +215,7 @@ s32 func_80C012FC(EnBomjimb* this, PlayState* play) { if (!Play_InCsMode(play) && (this->actor.xzDistToPlayer < 40.0f) && (fabsf(player->actor.world.pos.y - this->actor.world.pos.y) < 50.0f) && (play->msgCtx.msgLength == 0)) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; func_80C02740(this, play); return true; } @@ -368,7 +368,7 @@ void func_80C01A24(EnBomjimb* this, PlayState* play) { if ((this->unk_2E4 != NULL) && (this->unk_2E4->update != NULL)) { ((EnNiw*)this->unk_2E4)->unk2BC.z = 90000.0f; } - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->unk_2E4 = NULL; this->actor.gravity = -2.0f; func_80C02108(this); @@ -380,7 +380,7 @@ void func_80C01A24(EnBomjimb* this, PlayState* play) { } if (this->unk_2C0 != 0) { - Math_ApproachF(&this->actor.speedXZ, 6.0f, 0.5f, 2.0f); + Math_ApproachF(&this->actor.speed, 6.0f, 0.5f, 2.0f); } if ((this->unk_2C0 != 0) && !(this->actor.bgCheckFlags & 1)) { @@ -395,13 +395,13 @@ void func_80C01B40(EnBomjimb* this) { } void func_80C01B74(EnBomjimb* this, PlayState* play) { - Math_ApproachF(&this->actor.speedXZ, 6.0f, 0.5f, 2.0f); + Math_ApproachF(&this->actor.speed, 6.0f, 0.5f, 2.0f); if ((this->collider.base.acFlags & AC_HIT) || (this->actor.bgCheckFlags & 1)) { this->collider.base.acFlags &= ~AC_HIT; if ((this->unk_2E4 != NULL) && (this->unk_2E4->update != NULL)) { ((EnNiw*)this->unk_2E4)->unk2BC.z = 90000.0f; } - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->unk_2E4 = NULL; this->actor.gravity = -2.0f; func_80C02108(this); @@ -419,7 +419,7 @@ void func_80C01C18(EnBomjimb* this, PlayState* play) { this->unk_294.z = this->unk_2E4->world.pos.z; } } - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->unk_2CA = 2; this->actionFunc = func_80C01CD0; } @@ -553,7 +553,7 @@ void func_80C0217C(EnBomjimb* this, PlayState* play) { return; } - Math_ApproachF(&this->actor.speedXZ, 8.0f, 0.5f, 2.0f); + Math_ApproachF(&this->actor.speed, 8.0f, 0.5f, 2.0f); Math_Vec3f_Copy(&sp74, &this->actor.world.pos); sp74.x += Math_SinS(this->actor.world.rot.y) * 50.0f; @@ -611,7 +611,7 @@ void func_80C0217C(EnBomjimb* this, PlayState* play) { void func_80C0250C(EnBomjimb* this) { func_80C0113C(this, 15, 1.0f); this->unk_2D4 = 0; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->unk_2D6 = BINANG_ROT180(this->actor.yawTowardsPlayer); func_80C012E0(this); this->unk_2CA = 6; @@ -640,7 +640,7 @@ void func_80C02570(EnBomjimb* this, PlayState* play) { void func_80C0267C(EnBomjimb* this) { func_80C012E0(this); func_80C0113C(this, 8, 1.0f); - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.world.rot.y = this->actor.yawTowardsPlayer; this->unk_2AE = 40; this->unk_2C2 = 0; diff --git a/src/overlays/actors/ovl_En_Butte/z_en_butte.c b/src/overlays/actors/ovl_En_Butte/z_en_butte.c index eb3365b836..05072da729 100644 --- a/src/overlays/actors/ovl_En_Butte/z_en_butte.c +++ b/src/overlays/actors/ovl_En_Butte/z_en_butte.c @@ -241,7 +241,7 @@ void func_8091C794(EnButte* this, PlayState* play) { s16 yaw; func_8091C524(this); - Math_SmoothStepToF(&this->actor.speedXZ, sp4C->unk_04, sp4C->unk_08, sp4C->unk_0C, 0.0f); + Math_SmoothStepToF(&this->actor.speed, sp4C->unk_04, sp4C->unk_08, sp4C->unk_0C, 0.0f); if (this->unk_24F == 1) { distSq = SQ(100.0f); @@ -276,9 +276,8 @@ void func_8091C794(EnButte* this, PlayState* play) { func_8091C6B4(this); - playSpeed = - (((this->actor.speedXZ * 0.5f) + (Rand_ZeroOne() * 0.2f)) + ((1.0f - Math_SinS(this->unk_258)) * 0.15f)) + - ((1.0f - Math_SinS(this->unk_256)) * 0.3f) + sp38; + playSpeed = (((this->actor.speed * 0.5f) + (Rand_ZeroOne() * 0.2f)) + ((1.0f - Math_SinS(this->unk_258)) * 0.15f)) + + ((1.0f - Math_SinS(this->unk_256)) * 0.3f) + sp38; this->skelAnime.playSpeed = CLAMP(playSpeed, 0.2f, 1.5f); SkelAnime_Update(&this->skelAnime); @@ -318,7 +317,7 @@ void func_8091CBB4(EnButte* this, PlayState* play) { s16 yaw; func_8091C5EC(this); - Math_SmoothStepToF(&this->actor.speedXZ, sp5C->unk_04, sp5C->unk_08, sp5C->unk_0C, 0.0f); + Math_SmoothStepToF(&this->actor.speed, sp5C->unk_04, sp5C->unk_08, sp5C->unk_0C, 0.0f); sp40 = 0.0f; if ((this->unk_24E != 0) && (this->unk_24C < 12)) { @@ -344,7 +343,7 @@ void func_8091CBB4(EnButte* this, PlayState* play) { func_8091C6B4(this); - playSpeed = ((this->actor.speedXZ * 0.5f) + (Rand_ZeroOne() * 0.2f) + ((1.0f - Math_SinS(this->unk_258)) * 0.15f)) + + playSpeed = ((this->actor.speed * 0.5f) + (Rand_ZeroOne() * 0.2f) + ((1.0f - Math_SinS(this->unk_258)) * 0.15f)) + ((1.0f - Math_SinS(this->unk_256)) * 0.3f) + sp40; this->skelAnime.playSpeed = CLAMP(playSpeed, 0.2f, 1.5f); SkelAnime_Update(&this->skelAnime); @@ -356,7 +355,7 @@ void func_8091CBB4(EnButte* this, PlayState* play) { distSq = Math3D_XZDistanceSquared(this->actor.world.pos.x, this->actor.world.pos.z, this->actor.home.pos.x, this->actor.home.pos.z); - if ((player->heldItemAction != PLAYER_IA_STICK) || !(fabsf(player->actor.speedXZ) < 1.8f) || (this->unk_252 > 0) || + if ((player->heldItemAction != PLAYER_IA_STICK) || !(fabsf(player->actor.speed) < 1.8f) || (this->unk_252 > 0) || !(distSq < SQ(320.0f))) { func_8091C748(this); } else if ((distSq > SQ(240.0f)) && diff --git a/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c b/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c index bfc8281942..0353c6b4a8 100644 --- a/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c +++ b/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c @@ -549,7 +549,7 @@ void EnClearTag_UpdateCamera(EnClearTag* this, PlayState* play) { player->actor.world.pos.z = -950.0f; } - player->actor.speedXZ = 0.0f; + player->actor.speed = 0.0f; if (this->activeTimer == 0) { this->cameraState = 1; } @@ -578,7 +578,7 @@ void EnClearTag_UpdateCamera(EnClearTag* this, PlayState* play) { player->actor.world.pos.z = -950.0f; } - player->actor.speedXZ = 0.0f; + player->actor.speed = 0.0f; if (Message_GetState(&play->msgCtx) == TEXT_STATE_NONE) { mainCam = Play_GetCamera(play, CAM_ID_MAIN); mainCam->eye = this->subCamEye; diff --git a/src/overlays/actors/ovl_En_Col_Man/z_en_col_man.c b/src/overlays/actors/ovl_En_Col_Man/z_en_col_man.c index 61304db8e8..9dda146c39 100644 --- a/src/overlays/actors/ovl_En_Col_Man/z_en_col_man.c +++ b/src/overlays/actors/ovl_En_Col_Man/z_en_col_man.c @@ -117,10 +117,10 @@ void func_80AFDE00(EnColMan* this, PlayState* play) { if (this->actor.bgCheckFlags & 1) { if (this->actor.params == EN_COL_MAN_HEART_PIECE) { this->actor.params = EN_COL_MAN_RECOVERY_HEART; - this->actor.speedXZ = 2.0f; + this->actor.speed = 2.0f; this->actor.velocity.y = 8.0f; } else { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } } if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_56_02)) { @@ -164,7 +164,7 @@ void func_80AFDFB4(EnColMan* this, PlayState* play) { if ((this->actor.bgCheckFlags & 1) && (this->actor.velocity.y < 0.0f)) { if (!this->hasSetRandomValues) { this->actor.world.rot.y = randPlusMinusPoint5Scaled(30000.0f); - this->actor.speedXZ = 2.0f + BREG(56) + Rand_ZeroFloat(2.0f); + this->actor.speed = 2.0f + BREG(56) + Rand_ZeroFloat(2.0f); this->actor.velocity.y = 12.0f + BREG(57) + Rand_ZeroFloat(5.0f); this->hasSetRandomValues = true; Actor_PlaySfx(&this->actor, NA_SE_EN_ANSATSUSYA_ROCK); diff --git a/src/overlays/actors/ovl_En_Crow/z_en_crow.c b/src/overlays/actors/ovl_En_Crow/z_en_crow.c index 43f6349408..9e8234c591 100644 --- a/src/overlays/actors/ovl_En_Crow/z_en_crow.c +++ b/src/overlays/actors/ovl_En_Crow/z_en_crow.c @@ -163,7 +163,7 @@ void EnCrow_FlyIdle(EnCrow* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); onInitialAnimFrame = Animation_OnFrame(&this->skelAnime, 0.0f); - this->actor.speedXZ = (Rand_ZeroOne() * 1.5f) + 3.0f; + this->actor.speed = (Rand_ZeroOne() * 1.5f) + 3.0f; if ((this->actor.parent != NULL) && (this->actor.parent->home.rot.z == 0)) { this->actor.home.pos.x = this->actor.parent->world.pos.x; @@ -233,7 +233,7 @@ void EnCrow_FlyIdle(EnCrow* this, PlayState* play) { void EnCrow_SetupDiveAttack(EnCrow* this) { this->timer = 300; this->actionFunc = EnCrow_DiveAttack; - this->actor.speedXZ = 4.0f; + this->actor.speed = 4.0f; this->skelAnime.playSpeed = 2.0f; } @@ -295,7 +295,7 @@ void EnCrow_CheckIfFrozen(EnCrow* this, PlayState* play) { void EnCrow_SetupDamaged(EnCrow* this, PlayState* play) { f32 scale; - this->actor.speedXZ *= Math_CosS(this->actor.world.rot.x); + this->actor.speed *= Math_CosS(this->actor.world.rot.x); this->actor.velocity.y = 0.0f; Animation_Change(&this->skelAnime, &gGuayFlyAnim, 0.4f, 0.0f, 0.0f, ANIMMODE_LOOP_INTERP, -3.0f); this->actor.shape.yOffset = 0.0f; @@ -325,7 +325,7 @@ void EnCrow_SetupDamaged(EnCrow* this, PlayState* play) { Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 40); if (this->actor.flags & ACTOR_FLAG_8000) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } this->collider.base.acFlags &= ~AC_ON; @@ -335,7 +335,7 @@ void EnCrow_SetupDamaged(EnCrow* this, PlayState* play) { } void EnCrow_Damaged(EnCrow* this, PlayState* play) { - Math_StepToF(&this->actor.speedXZ, 0.0f, 0.5f); + Math_StepToF(&this->actor.speed, 0.0f, 0.5f); this->actor.colorFilterTimer = 40; if (!(this->actor.flags & ACTOR_FLAG_8000)) { @@ -385,7 +385,7 @@ void EnCrow_Die(EnCrow* this, PlayState* play) { void EnCrow_SetupTurnAway(EnCrow* this) { this->timer = 100; this->pitchTarget = -0x1000; - this->actor.speedXZ = 3.5f; + this->actor.speed = 3.5f; this->yawTarget = this->actor.yawTowardsPlayer + 0x8000; this->skelAnime.playSpeed = 2.0f; if (this->actor.colChkInfo.damageEffect == GUAY_DMGEFF_STUN) { diff --git a/src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.c b/src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.c index 6a75aedc34..911e711c15 100644 --- a/src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.c +++ b/src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.c @@ -838,7 +838,7 @@ void EnDekubaba_SetupPrunedSomersaultDie(EnDekubaba* this) { this->actor.gravity = -0.8f; this->actor.velocity.y = 4.0f; this->actor.world.rot.y = this->actor.shape.rot.y + 0x8000; - this->actor.speedXZ = this->size * 3.0f; + this->actor.speed = this->size * 3.0f; this->collider.base.acFlags &= ~AC_ON; this->actor.flags |= ACTOR_FLAG_10 | ACTOR_FLAG_20; this->actionFunc = EnDekubaba_PrunedSomersaultDie; @@ -851,7 +851,7 @@ void EnDekubaba_PrunedSomersaultDie(EnDekubaba* this, PlayState* play) { f32 deltaY; f32 deltaZ; - Math_StepToF(&this->actor.speedXZ, 0.0f, this->size * 0.1f); + Math_StepToF(&this->actor.speed, 0.0f, this->size * 0.1f); if (this->timer == 0) { Math_ScaledStepToS(&this->actor.shape.rot.x, 0x4800, 0x71C); @@ -865,7 +865,7 @@ void EnDekubaba_PrunedSomersaultDie(EnDekubaba* this, PlayState* play) { this->actor.scale.z = 0.0f; this->actor.scale.y = 0.0f; this->actor.scale.x = 0.0f; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.flags &= ~(ACTOR_FLAG_1 | ACTOR_FLAG_4); EffectSsHahen_SpawnBurst(play, &this->actor.world.pos, this->size * 3.0f, 0, (s32)(this->size * 12.0f), (s32)(this->size * 5.0f), 15, HAHEN_OBJECT_DEFAULT, 10, NULL); diff --git a/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.c b/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.c index 15a2401f86..580d4bb81c 100644 --- a/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.c +++ b/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.c @@ -411,7 +411,7 @@ void func_808BDFB8(EnDekunuts* this, PlayState* play) { this->unk_18C = 1; } - Math_StepToF(&this->actor.speedXZ, 7.5f, 1.0f); + Math_StepToF(&this->actor.speed, 7.5f, 1.0f); if (!Math_SmoothStepToS(&this->actor.world.rot.y, this->unk_192, 1, 0xE38, 0xB6)) { if (this->actor.bgCheckFlags & 0x20) { this->unk_192 = Actor_WorldYawTowardPoint(&this->actor, &this->actor.home.pos); @@ -435,7 +435,7 @@ void func_808BDFB8(EnDekunuts* this, PlayState* play) { (fabsf(this->actor.world.pos.y - this->actor.home.pos.y) < 2.0f)) { this->actor.colChkInfo.mass = MASS_IMMOVABLE; this->actor.flags &= ~ACTOR_FLAG_20; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; func_808BDC9C(this); } else if (this->unk_190 == 0) { func_808BE1CC(this); @@ -445,7 +445,7 @@ void func_808BDFB8(EnDekunuts* this, PlayState* play) { void func_808BE1CC(EnDekunuts* this) { Animation_PlayLoop(&this->skelAnime, &gDekuScrubPantingAnim); this->unk_190 = 3; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; if (this->unk_18D != 0) { this->unk_18D--; } @@ -468,7 +468,7 @@ void func_808BE22C(EnDekunuts* this, PlayState* play) { void func_808BE294(EnDekunuts* this, s32 arg1) { Animation_MorphToPlayOnce(&this->skelAnime, &gDekuScrubDamageAnim, -3.0f); if (this->actor.params == ENDEKUNUTS_GET_FF00_0) { - this->actor.speedXZ = 10.0f; + this->actor.speed = 10.0f; if (arg1 != 0) { func_800BE504(&this->actor, &this->collider); } @@ -483,14 +483,14 @@ void func_808BE294(EnDekunuts* this, s32 arg1) { } void func_808BE358(EnDekunuts* this, PlayState* play) { - Math_StepToF(&this->actor.speedXZ, 0.0f, 1.0f); + Math_StepToF(&this->actor.speed, 0.0f, 1.0f); if (SkelAnime_Update(&this->skelAnime)) { func_808BE484(this); } } void func_808BE3A8(EnDekunuts* this) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; if (this->actor.velocity.y > 0.0f) { this->actor.velocity.y = 0.0f; } @@ -520,7 +520,7 @@ void func_808BE3FC(EnDekunuts* this, PlayState* play) { void func_808BE484(EnDekunuts* this) { Animation_PlayOnce(&this->skelAnime, &gDekuScrubDieAnim); this->actionFunc = func_808BE4D4; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; Actor_PlaySfx(&this->actor, NA_SE_EN_NUTS_DEAD); } diff --git a/src/overlays/actors/ovl_En_Dg/z_en_dg.c b/src/overlays/actors/ovl_En_Dg/z_en_dg.c index fe8143b15e..4470505ec8 100644 --- a/src/overlays/actors/ovl_En_Dg/z_en_dg.c +++ b/src/overlays/actors/ovl_En_Dg/z_en_dg.c @@ -338,15 +338,15 @@ void EnDg_MoveAlongPath(EnDg* this, PlayState* play) { if ((this->index == ENDG_INDEX_SWAMP_SPIDER_HOUSE) || ((this->index == ENDG_INDEX_ROMANI_RANCH) && (play->sceneId == SCENE_OMOYA))) { - Math_ApproachF(&this->actor.speedXZ, 1.0f, 0.2f, 1.0f); + Math_ApproachF(&this->actor.speed, 1.0f, 0.2f, 1.0f); } else if (this->index == ENDG_INDEX_ROMANI_RANCH) { - Math_ApproachF(&this->actor.speedXZ, 3.5f, 0.2f, 1.0f); + Math_ApproachF(&this->actor.speed, 3.5f, 0.2f, 1.0f); } else if (play->sceneId == SCENE_CLOCKTOWER) { - Math_ApproachF(&this->actor.speedXZ, 3.5f, 0.2f, 1.0f); + Math_ApproachF(&this->actor.speed, 3.5f, 0.2f, 1.0f); } else if (sRacetrackDogInfo[this->index].textId & 0x11) { - Math_ApproachF(&this->actor.speedXZ, 1.0f, 0.2f, 1.0f); + Math_ApproachF(&this->actor.speed, 1.0f, 0.2f, 1.0f); } else { - Math_ApproachF(&this->actor.speedXZ, 3.5f, 0.2f, 1.0f); + Math_ApproachF(&this->actor.speed, 3.5f, 0.2f, 1.0f); } } else { Actor_Kill(&this->actor); @@ -355,7 +355,7 @@ void EnDg_MoveAlongPath(EnDg* this, PlayState* play) { void EnDg_SpawnFloorDustRing(EnDg* this, PlayState* play) { s16 curFrame = this->skelAnime.curFrame; - s16 mod = (this->actor.speedXZ > 6.0f) ? 2 : 3; + s16 mod = (this->actor.speed > 6.0f) ? 2 : 3; Vec3f pos; if (((this->index + curFrame) % mod) == 0) { @@ -492,7 +492,7 @@ void EnDg_TryPickUp(EnDg* this, PlayState* play) { EnDg_ChangeAnim(&this->skelAnime, sAnimationInfo, DOG_ANIM_SIT_DOWN); this->actor.flags &= ~ACTOR_FLAG_1; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; if (Player_GetMask(play) == PLAYER_MASK_TRUTH) { this->actor.flags |= ACTOR_FLAG_10000; func_800B8614(&this->actor, play, 100.0f); @@ -620,7 +620,7 @@ void EnDg_ChooseActionForForm(EnDg* this, PlayState* play) { case PLAYER_FORM_ZORA: this->dogFlags &= ~DOG_FLAG_JUMP_ATTACKING; - if ((this->behavior != DOG_BEHAVIOR_ZORA) && (player->actor.speedXZ > 1.0f)) { + if ((this->behavior != DOG_BEHAVIOR_ZORA) && (player->actor.speed > 1.0f)) { this->behavior = DOG_BEHAVIOR_ZORA; EnDg_ChangeAnim(&this->skelAnime, sAnimationInfo, DOG_ANIM_RUN); this->actionFunc = EnDg_ApproachPlayer; @@ -634,7 +634,7 @@ void EnDg_ChooseActionForForm(EnDg* this, PlayState* play) { case PLAYER_FORM_GORON: this->dogFlags &= ~DOG_FLAG_JUMP_ATTACKING; - if ((this->behavior != DOG_BEHAVIOR_GORON) && (player->actor.speedXZ > 1.0f)) { + if ((this->behavior != DOG_BEHAVIOR_GORON) && (player->actor.speed > 1.0f)) { this->behavior = DOG_BEHAVIOR_GORON; EnDg_ChangeAnim(&this->skelAnime, sAnimationInfo, DOG_ANIM_WALK_BACKWARDS); this->timer = 50; @@ -649,7 +649,7 @@ void EnDg_ChooseActionForForm(EnDg* this, PlayState* play) { case PLAYER_FORM_DEKU: this->dogFlags &= ~DOG_FLAG_JUMP_ATTACKING; - if ((this->behavior != DOG_BEHAVIOR_DEKU) && (player->actor.speedXZ > 1.0f)) { + if ((this->behavior != DOG_BEHAVIOR_DEKU) && (player->actor.speed > 1.0f)) { this->behavior = DOG_BEHAVIOR_DEKU; EnDg_ChangeAnim(&this->skelAnime, sAnimationInfo, DOG_ANIM_RUN); this->actionFunc = EnDg_ApproachPlayerToAttack; @@ -733,7 +733,7 @@ void EnDg_BackAwayFromGoron(EnDg* this, PlayState* play) { } this->actor.world.rot.y = this->actor.shape.rot.y; - Math_ApproachF(&this->actor.speedXZ, -1.5f, 0.2f, 1.0f); + Math_ApproachF(&this->actor.speed, -1.5f, 0.2f, 1.0f); Actor_MoveWithGravity(&this->actor); } @@ -760,18 +760,18 @@ void EnDg_RunAwayFromGoron(EnDg* this, PlayState* play) { Math_SmoothStepToS(&this->actor.world.rot.y, yRotation, 4, 0x3E8, 1); this->actor.world.rot.y = this->actor.shape.rot.y; - if (player->actor.speedXZ != 0.0f) { - Math_ApproachF(&this->actor.speedXZ, player->actor.speedXZ, 0.2f, 1.0f); + if (player->actor.speed != 0.0f) { + Math_ApproachF(&this->actor.speed, player->actor.speed, 0.2f, 1.0f); } else { - Math_ApproachF(&this->actor.speedXZ, 3.5f, 0.2f, 1.0f); + Math_ApproachF(&this->actor.speed, 3.5f, 0.2f, 1.0f); } } else { EnDg_ChangeAnim(&this->skelAnime, sAnimationInfo, DOG_ANIM_BARK); this->actionFunc = EnDg_BarkAtGoron; } - if (this->actor.speedXZ > 7.0f) { - this->actor.speedXZ = 7.0f; + if (this->actor.speed > 7.0f) { + this->actor.speed = 7.0f; } Actor_MoveWithGravity(&this->actor); @@ -811,7 +811,7 @@ void EnDg_ApproachPlayerToAttack(EnDg* this, PlayState* play) { this->actor.world.rot.y = this->actor.shape.rot.y; if (this->actor.xzDistToPlayer < 70.0f) { - Math_ApproachZeroF(&this->actor.speedXZ, 0.2f, 1.0f); + Math_ApproachZeroF(&this->actor.speed, 0.2f, 1.0f); if (Animation_OnFrame(&this->skelAnime, 7.0f)) { s16 yawDiff = ABS_ALT(player->actor.shape.rot.y - this->actor.shape.rot.y); @@ -827,7 +827,7 @@ void EnDg_ApproachPlayerToAttack(EnDg* this, PlayState* play) { } } else { Math_ApproachS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 4, 0xC00); - Math_ApproachF(&this->actor.speedXZ, 5.0f, 0.2f, 1.0f); + Math_ApproachF(&this->actor.speed, 5.0f, 0.2f, 1.0f); } Actor_MoveWithGravity(&this->actor); @@ -841,7 +841,7 @@ void EnDg_ApproachPlayerToAttack(EnDg* this, PlayState* play) { */ void EnDg_RunAfterAttacking(EnDg* this, PlayState* play) { this->dogFlags &= ~DOG_FLAG_BOUNCED; - Math_ApproachF(&this->actor.speedXZ, 3.5f, 0.1f, 0.5f); + Math_ApproachF(&this->actor.speed, 3.5f, 0.1f, 0.5f); Actor_MoveWithGravity(&this->actor); if (DECR(this->attackTimer) == 0) { this->attackTimer = 20; @@ -893,7 +893,7 @@ void EnDg_JumpAttack(EnDg* this, PlayState* play) { this->dogFlags &= ~DOG_FLAG_JUMP_ATTACKING; this->dogFlags |= DOG_FLAG_BOUNCED; this->collider.base.atFlags &= ~AT_BOUNCED; - this->actor.speedXZ *= -1.0f; + this->actor.speed *= -1.0f; EnDg_ChangeAnim(&this->skelAnime, sAnimationInfo, DOG_ANIM_RUN); this->actionFunc = EnDg_RunAfterAttacking; return; @@ -919,9 +919,9 @@ void EnDg_JumpAttack(EnDg* this, PlayState* play) { sAnimationInfo[DOG_ANIM_JUMP_ATTACK].playSpeed = 1.2f; this->actor.velocity.y = 2.0f * rand + 3.0f; - this->actor.speedXZ = 8.0f + rand; + this->actor.speed = 8.0f + rand; } else if (curFrame > 20) { - Math_ApproachF(&this->actor.speedXZ, 2.5f, 0.2f, 1.0f); + Math_ApproachF(&this->actor.speed, 2.5f, 0.2f, 1.0f); } if (curFrame > 23) { @@ -949,7 +949,7 @@ void EnDg_WalkToPlayer(EnDg* this, PlayState* play) { } else { Math_ApproachS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 4, 0xC00); this->actor.world.rot.y = this->actor.shape.rot.y; - Math_ApproachF(&this->actor.speedXZ, 2.0f, 0.2f, 1.0f); + Math_ApproachF(&this->actor.speed, 2.0f, 0.2f, 1.0f); Actor_MoveWithGravity(&this->actor); } @@ -996,12 +996,12 @@ void EnDg_ApproachPlayer(EnDg* this, PlayState* play) { this->actionFunc = EnDg_SitNextToPlayer; } else if (player->stateFlags3 & PLAYER_STATE3_20000000) { if ((this->actor.xzDistToPlayer > 40.0f) && (player->linearVelocity == 0.0f)) { - Math_ApproachF(&this->actor.speedXZ, 1.5f, 0.2f, 1.0f); + Math_ApproachF(&this->actor.speed, 1.5f, 0.2f, 1.0f); } else { - Math_ApproachF(&this->actor.speedXZ, player->actor.speedXZ, 0.2f, 1.0f); + Math_ApproachF(&this->actor.speed, player->actor.speed, 0.2f, 1.0f); } } else { - Math_ApproachF(&this->actor.speedXZ, 3.5f, 0.2f, 1.0f); + Math_ApproachF(&this->actor.speed, 3.5f, 0.2f, 1.0f); } EnDg_CheckForBremenMaskMarch(this, play); @@ -1033,7 +1033,7 @@ void EnDg_SlowlyBackUpBeforeAttacking(EnDg* this, PlayState* play) { } this->actor.world.rot.y = this->actor.shape.rot.y; - Math_ApproachF(&this->actor.speedXZ, -1.0f, 0.2f, 1.0f); + Math_ApproachF(&this->actor.speed, -1.0f, 0.2f, 1.0f); Actor_MoveWithGravity(&this->actor); EnDg_PlaySfxWalk(this); EnDg_PlaySfxGrowl(this, 4.0f); @@ -1059,7 +1059,7 @@ void EnDg_BackAwayFromPlayer(EnDg* this, PlayState* play) { } this->actor.world.rot.y = this->actor.shape.rot.y; - Math_ApproachF(&this->actor.speedXZ, -2.0f, 0.2f, 1.0f); + Math_ApproachF(&this->actor.speed, -2.0f, 0.2f, 1.0f); Actor_MoveWithGravity(&this->actor); } @@ -1110,7 +1110,7 @@ void EnDg_SetupSwim(EnDg* this, PlayState* play) { this->actionFunc = EnDg_Swim; } - Math_ApproachF(&this->actor.speedXZ, 1.0f, 0.2f, 1.0f); + Math_ApproachF(&this->actor.speed, 1.0f, 0.2f, 1.0f); Actor_MoveWithGravity(&this->actor); } @@ -1183,13 +1183,13 @@ void EnDg_Swim(EnDg* this, PlayState* play) { this->timer = Rand_S16Offset(60, 60); Actor_PlaySfx(&this->actor, NA_SE_EV_OUT_OF_WATER); EnDg_ChangeAnim(&this->skelAnime, sAnimationInfo, DOG_ANIM_RUN); - Math_ApproachF(&this->actor.speedXZ, 3.5f, 0.2f, 1.0f); + Math_ApproachF(&this->actor.speed, 3.5f, 0.2f, 1.0f); this->actionFunc = EnDg_IdleMove; } Math_SmoothStepToS(&this->actor.world.rot.y, yRotation, 4, 0x3E8, 1); this->actor.shape.rot.y = this->actor.world.rot.y; - Math_ApproachF(&this->actor.speedXZ, 0.5f, 0.2f, 1.0f); + Math_ApproachF(&this->actor.speed, 0.5f, 0.2f, 1.0f); Actor_MoveWithGravity(&this->actor); } @@ -1230,9 +1230,9 @@ void EnDg_JumpOutOfWater(EnDg* this, PlayState* play) { Actor_PlaySfx(&this->actor, NA_SE_EV_OUT_OF_WATER); EnDg_ChangeAnim(&this->skelAnime, sAnimationInfo, DOG_ANIM_RUN); this->actionFunc = EnDg_IdleMove; - Math_ApproachF(&this->actor.speedXZ, 3.5f, 0.2f, 1.0f); + Math_ApproachF(&this->actor.speed, 3.5f, 0.2f, 1.0f); } else { - Math_ApproachF(&this->actor.speedXZ, 0.5f, 0.2f, 1.0f); + Math_ApproachF(&this->actor.speed, 0.5f, 0.2f, 1.0f); } Actor_MoveWithGravity(&this->actor); @@ -1266,7 +1266,7 @@ void EnDg_Thrown(EnDg* this, PlayState* play) { Actor_PlaySfx(&this->actor, NA_SE_EV_MONKEY_WALK); } - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.gravity = -3.0f; if (player->transformation == PLAYER_FORM_HUMAN) { EnDg_TryPickUp(this, play); diff --git a/src/overlays/actors/ovl_En_Dinofos/z_en_dinofos.c b/src/overlays/actors/ovl_En_Dinofos/z_en_dinofos.c index 53889ac175..f92bfb4942 100644 --- a/src/overlays/actors/ovl_En_Dinofos/z_en_dinofos.c +++ b/src/overlays/actors/ovl_En_Dinofos/z_en_dinofos.c @@ -593,7 +593,7 @@ void func_8089B7B0(EnDinofos* this) { Animation_MorphToLoop(&this->skelAnime, &object_dinofos_Anim_002E40, -4.0f); this->unk_290 = (s32)Rand_ZeroFloat(20.0f) + 40; this->unk_292 = 30; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.world.rot.y = this->actor.shape.rot.y; func_8089AD70(this); this->actionFunc = func_8089B834; @@ -625,9 +625,9 @@ void func_8089B8B0(EnDinofos* this, PlayState* play) { phi_f0 = 70.0f; } if (this->actor.xzDistToPlayer <= phi_f0) { - this->actor.speedXZ = -3.5f; + this->actor.speed = -3.5f; } else { - this->actor.speedXZ = 3.5f; + this->actor.speed = 3.5f; } } @@ -650,9 +650,9 @@ void func_8089B98C(EnDinofos* this, PlayState* play) { Math_ScaledStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 0x100); this->actor.world.rot.y = this->actor.shape.rot.y; if (this->actor.xzDistToPlayer <= phi_f0) { - Math_StepToF(&this->actor.speedXZ, -7.0f, 0.5f); + Math_StepToF(&this->actor.speed, -7.0f, 0.5f); } else { - Math_StepToF(&this->actor.speedXZ, 7.0f, 0.5f); + Math_StepToF(&this->actor.speed, 7.0f, 0.5f); } if (this->actor.xzDistToPlayer < 80.0f) { @@ -674,7 +674,7 @@ void func_8089B98C(EnDinofos* this, PlayState* play) { void func_8089BAC0(EnDinofos* this) { if (this->actionFunc != func_8089BB60) { Animation_MorphToLoop(&this->skelAnime, &object_dinofos_Anim_000580, -4.0f); - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } if (BINANG_SUB(this->actor.yawTowardsPlayer, this->actor.shape.rot.y) > 0) { this->unk_28C = BINANG_ADD(this->actor.shape.rot.y, 0x4000); @@ -701,20 +701,20 @@ void func_8089BBB4(EnDinofos* this, PlayState* play) { s16 rotY = player->actor.shape.rot.y - this->actor.shape.rot.y; if (ABS_ALT(rotY) > 0x7800) { if (Rand_ZeroOne() < 0.5f) { - this->actor.speedXZ = 6.0f; + this->actor.speed = 6.0f; } else { - this->actor.speedXZ = -6.0f; + this->actor.speed = -6.0f; } } else if (rotY >= 0) { - this->actor.speedXZ = 6.0f; + this->actor.speed = 6.0f; } else { - this->actor.speedXZ = -6.0f; + this->actor.speed = -6.0f; } if (this->actionFunc == func_8089D1E0) { - this->skelAnime.playSpeed = this->actor.speedXZ * 0.166666671634f; + this->skelAnime.playSpeed = this->actor.speed * 0.166666671634f; } else { - Animation_Change(&this->skelAnime, &object_dinofos_Anim_00D62C, this->actor.speedXZ * 0.166666671634f, 0.0f, + Animation_Change(&this->skelAnime, &object_dinofos_Anim_00D62C, this->actor.speed * 0.166666671634f, 0.0f, 0.0f, ANIMMODE_LOOP, -4.0f); } @@ -734,7 +734,7 @@ void func_8089BD28(EnDinofos* this, PlayState* play) { Math_ScaledStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 0xBB8); if (!func_8089AE00(this, play)) { if (this->actor.bgCheckFlags & 8) { - if (this->actor.speedXZ >= 0.0f) { + if (this->actor.speed >= 0.0f) { phi_v0 = BINANG_ADD(this->actor.shape.rot.y, 0x4000); } else { phi_v0 = BINANG_SUB(this->actor.shape.rot.y, 0x4000); @@ -742,23 +742,23 @@ void func_8089BD28(EnDinofos* this, PlayState* play) { phi_v0 = this->actor.wallYaw - phi_v0; if (ABS_ALT(phi_v0) > 0x4000) { - this->actor.speedXZ *= -0.8f; - if (this->actor.speedXZ < 0.0f) { - this->actor.speedXZ -= 0.5f; + this->actor.speed *= -0.8f; + if (this->actor.speed < 0.0f) { + this->actor.speed -= 0.5f; } else { - this->actor.speedXZ += 0.5f; + this->actor.speed += 0.5f; } } } phi_v0 = BINANG_SUB(player->actor.shape.rot.y, this->actor.shape.rot.y); if ((phi_v0 >= 0) && (phi_v0 < 0x7800)) { - this->actor.speedXZ += 0.125f; + this->actor.speed += 0.125f; } else if ((phi_v0 < 0) && (phi_v0 > -0x7800)) { - this->actor.speedXZ -= 0.125f; + this->actor.speed -= 0.125f; } - if (this->actor.speedXZ > 0.0f) { + if (this->actor.speed > 0.0f) { this->skelAnime.playSpeed = 1.0f; } else { this->skelAnime.playSpeed = -1.0f; @@ -804,7 +804,7 @@ void func_8089C024(EnDinofos* this, s32 arg1) { } } - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->unk_290 = arg1; this->actor.world.rot.y = this->actor.shape.rot.y; this->actionFunc = func_8089C0DC; @@ -825,13 +825,13 @@ void func_8089C0DC(EnDinofos* this, PlayState* play) { void func_8089C164(EnDinofos* this) { if (this->unk_290 == 2) { - this->actor.speedXZ = -10.0f; + this->actor.speed = -10.0f; this->actor.velocity.y = 9.0f; this->colliderJntSph.base.acFlags |= AC_ON; } else { this->actor.velocity.y = 12.5f; if (this->unk_290 == 0) { - this->actor.speedXZ = 4.5f; + this->actor.speed = 4.5f; } } @@ -849,7 +849,7 @@ void func_8089C1F8(EnDinofos* this, PlayState* play) { void func_8089C244(EnDinofos* this) { this->actor.bgCheckFlags &= ~1; - this->actor.speedXZ = 8.0f; + this->actor.speed = 8.0f; this->actor.velocity.y = 16.0f; Actor_PlaySfx(&this->actor, NA_SE_EN_RIZA_JUMP); this->unk_290 = 0; @@ -880,13 +880,13 @@ void func_8089C398(EnDinofos* this) { this->skelAnime.endFrame = Animation_GetLastFrame(&object_dinofos_Anim_0025B4); } - if (this->actor.speedXZ < 0.0f) { + if (this->actor.speed < 0.0f) { this->unk_290 = 1; } else { this->unk_290 = 0; } - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; func_8089AD70(this); Actor_PlaySfx(&this->actor, NA_SE_EN_BOMCHU_WALK); this->actionFunc = func_8089C44C; @@ -909,7 +909,7 @@ void func_8089C4F8(EnDinofos* this) { Actor_PlaySfx(&this->actor, NA_SE_EN_RIZA_CRY); this->unk_290 = 0; this->unk_292 = -1; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.world.rot.y = this->actor.shape.rot.y; this->actionFunc = func_8089C56C; } @@ -941,14 +941,14 @@ void func_8089C690(EnDinofos* this) { if (this->actionFunc != func_8089C2A8) { this->actor.world.rot.y = this->actor.shape.rot.y; } else { - this->actor.speedXZ = 3.0f; + this->actor.speed = 3.0f; } this->actionFunc = func_8089C724; } void func_8089C724(EnDinofos* this, PlayState* play) { if (this->actor.bgCheckFlags & 1) { - Math_StepToF(&this->actor.speedXZ, 0.0f, 0.5f); + Math_StepToF(&this->actor.speed, 0.0f, 0.5f); } if (SkelAnime_Update(&this->skelAnime)) { @@ -957,7 +957,7 @@ void func_8089C724(EnDinofos* this, PlayState* play) { } void func_8089C784(EnDinofos* this) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; if (this->actor.velocity.y > 0.0f) { this->actor.velocity.y = 0.0f; } @@ -989,7 +989,7 @@ void func_8089C87C(EnDinofos* this, s32 arg1) { Animation_PlayOnce(&this->skelAnime, &object_dinofos_Anim_00D21C); func_800BE5CC(&this->actor, &this->colliderJntSph, arg1); this->actor.shape.rot.y = BINANG_ROT180(this->actor.world.rot.y); - this->actor.speedXZ = 10.0f; + this->actor.speed = 10.0f; if (this->actor.velocity.y > 0.0f) { this->actor.velocity.y = 0.0f; } @@ -1001,7 +1001,7 @@ void func_8089C87C(EnDinofos* this, s32 arg1) { } void func_8089C938(EnDinofos* this, PlayState* play) { - Math_StepToF(&this->actor.speedXZ, 0.0f, 0.5f); + Math_StepToF(&this->actor.speed, 0.0f, 0.5f); if (SkelAnime_Update(&this->skelAnime) && (this->actor.bgCheckFlags & 1)) { if (this->actor.colChkInfo.health == 0) { if (this->actor.cutscene == -1) { @@ -1021,18 +1021,18 @@ void func_8089C938(EnDinofos* this, PlayState* play) { void func_8089CA14(EnDinofos* this) { Animation_MorphToPlayOnce(&this->skelAnime, &object_dinofos_Anim_001040, -5.0f); this->colliderJntSph.base.acFlags |= AC_ON; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.world.rot.y = this->actor.shape.rot.y; this->actionFunc = func_8089CA74; } void func_8089CA74(EnDinofos* this, PlayState* play) { Math_ScaledStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 0x800); - Math_StepToF(&this->actor.speedXZ, 0.0f, 0.5f); + Math_StepToF(&this->actor.speed, 0.0f, 0.5f); if (SkelAnime_Update(&this->skelAnime)) { func_8089CB10(this, play); } else if (!func_8089AE00(this, play) && Animation_OnFrame(&this->skelAnime, 12.0f)) { - this->actor.speedXZ = 8.0f; + this->actor.speed = 8.0f; } } @@ -1042,7 +1042,7 @@ void func_8089CB10(EnDinofos* this, PlayState* play) { Animation_PlayLoop(&this->skelAnime, &object_dinofos_Anim_0013C0); this->unk_290 = 20; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->colliderJntSph.base.atFlags |= AT_ON; func_8089AD70(this); @@ -1130,7 +1130,7 @@ void func_8089CFAC(EnDinofos* this) { Animation_PlayOnce(&this->skelAnime, &object_dinofos_Anim_00ABD0); this->actor.flags &= ~ACTOR_FLAG_1; Actor_PlaySfx(&this->actor, NA_SE_EN_RIZA_DEAD); - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.world.rot.y = this->actor.shape.rot.y; this->actionFunc = func_8089D018; } @@ -1163,11 +1163,11 @@ void func_8089D018(EnDinofos* this, PlayState* play) { void func_8089D11C(EnDinofos* this, s16 arg1) { if (arg1 >= 0) { - this->actor.speedXZ = -15.0f; + this->actor.speed = -15.0f; } else { - this->actor.speedXZ = 15.0f; + this->actor.speed = 15.0f; } - Animation_Change(&this->skelAnime, &object_dinofos_Anim_00D62C, this->actor.speedXZ * (1.0f / 7.5f), 0.0f, 0.0f, + Animation_Change(&this->skelAnime, &object_dinofos_Anim_00D62C, this->actor.speed * (1.0f / 7.5f), 0.0f, 0.0f, ANIMMODE_LOOP, -4.0f); this->actor.world.rot.y = BINANG_ADD(this->actor.shape.rot.y, 0x4000); this->unk_292 = 10; @@ -1178,10 +1178,10 @@ void func_8089D11C(EnDinofos* this, s16 arg1) { void func_8089D1E0(EnDinofos* this, PlayState* play) { Math_ScaledStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 0xBB8); - Math_StepToF(&this->actor.speedXZ, 0.0f, 2.0f); + Math_StepToF(&this->actor.speed, 0.0f, 2.0f); this->skelAnime.playSpeed = - (1.0f + fabsf(this->actor.speedXZ * (1.0f / 15.0f))) * ((this->actor.speedXZ >= 0.0f) ? 1.0f : -1.0f); + (1.0f + fabsf(this->actor.speed * (1.0f / 15.0f))) * ((this->actor.speed >= 0.0f) ? 1.0f : -1.0f); this->actor.world.rot.y = BINANG_ADD(this->actor.shape.rot.y, 0x4000); SkelAnime_Update(&this->skelAnime); if (this->unk_292 != 0) { diff --git a/src/overlays/actors/ovl_En_Dno/z_en_dno.c b/src/overlays/actors/ovl_En_Dno/z_en_dno.c index c7f3ee2dc4..c4b25bbe7e 100644 --- a/src/overlays/actors/ovl_En_Dno/z_en_dno.c +++ b/src/overlays/actors/ovl_En_Dno/z_en_dno.c @@ -779,21 +779,21 @@ s32 EnDno_ActorPathing_UpdateActorInfo(PlayState* play, ActorPathing* actorPath) thisx->gravity = 0.0f; temp_v0 = thisx->yawTowardsPlayer - thisx->world.rot.y; if ((temp_v0 <= 0x4000) && (temp_v0 >= -0x4000)) { - Math_SmoothStepToF(&thisx->speedXZ, 15.0f, 0.8f, 1.0f, 0.01f); + Math_SmoothStepToF(&thisx->speed, 15.0f, 0.8f, 1.0f, 0.01f); } else { if (thisx->xzDistToPlayer <= 80.0f) { - Math_SmoothStepToF(&thisx->speedXZ, 8.0f, 0.5f, 0.5f, 0.01f); + Math_SmoothStepToF(&thisx->speed, 8.0f, 0.5f, 0.5f, 0.01f); } else if (thisx->xzDistToPlayer <= 360.0f) { - Math_SmoothStepToF(&thisx->speedXZ, 7.0f, 0.5f, 0.5f, 0.01f); + Math_SmoothStepToF(&thisx->speed, 7.0f, 0.5f, 0.5f, 0.01f); } else { - Math_SmoothStepToF(&thisx->speedXZ, 3.5f, 0.5f, 0.5f, 0.01f); + Math_SmoothStepToF(&thisx->speed, 3.5f, 0.5f, 0.5f, 0.01f); } } - if (actorPath->distSqToCurPoint < SQ(thisx->speedXZ)) { + if (actorPath->distSqToCurPoint < SQ(thisx->speed)) { ret = true; } else { - sp38 = thisx->speedXZ / sqrtf(actorPath->distSqToCurPointXZ); + sp38 = thisx->speed / sqrtf(actorPath->distSqToCurPointXZ); sp2C = ABS(actorPath->rotToCurPoint.x - thisx->world.rot.x); temp_v0_2 = sp2C; temp_v0_2 *= sp38; @@ -810,11 +810,11 @@ s32 EnDno_ActorPathing_UpdateActorInfo(PlayState* play, ActorPathing* actorPath) s32 EnDno_ActorPathing_Move(PlayState* play, ActorPathing* actorPath) { Actor* thisx = actorPath->actor; EnDno* this = (EnDno*)thisx; - f32 sp24 = Math_CosS(-thisx->world.rot.x) * thisx->speedXZ; + f32 sp24 = Math_CosS(-thisx->world.rot.x) * thisx->speed; f32 sp20 = gFramerateDivisorHalf; thisx->velocity.x = Math_SinS(thisx->world.rot.y) * sp24; - thisx->velocity.y = Math_SinS(-thisx->world.rot.x) * thisx->speedXZ; + thisx->velocity.y = Math_SinS(-thisx->world.rot.x) * thisx->speed; thisx->velocity.z = Math_CosS(thisx->world.rot.y) * sp24; this->unk_334.x += (this->actor.velocity.x * sp20) + this->actor.colChkInfo.displacement.x; @@ -864,7 +864,7 @@ void func_80A730A0(EnDno* this, PlayState* play) { func_800B9010(&this->actor, NA_SE_EV_BUTLER_FRY - SFX_FLAG); if (this->actorPath.flags & ACTOR_PATHING_REACHED_END_PERMANENT) { Math_Vec3f_Copy(&this->actor.world.pos, &this->actorPath.curPoint); - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.velocity.x = 0.0f; this->actor.velocity.y = 0.0f; this->actor.velocity.z = 0.0f; @@ -876,7 +876,7 @@ void func_80A73244(EnDno* this, PlayState* play) { this->actor.flags &= ~ACTOR_FLAG_8000000; this->actor.flags |= (ACTOR_FLAG_1 | ACTOR_FLAG_8); this->unk_328 = 2; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; Flags_UnsetSwitch(play, EN_DNO_GET_RACE_STARTED_SWITCH_FLAG(&this->actor)); gSaveContext.timerStates[TIMER_ID_MINIGAME_1] = TIMER_STATE_STOP; this->unk_44E = 0; diff --git a/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.c b/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.c index 81044f5da5..23a60c5d45 100644 --- a/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.c +++ b/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.c @@ -536,7 +536,7 @@ s32 func_80877278(EnDodongo* this, PlayState* play) { void func_808773C4(EnDodongo* this) { Animation_MorphToLoop(&this->skelAnime, &object_dodongo_Anim_004C20, -4.0f); - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->timer = Rand_S16Offset(30, 50); this->actionFunc = func_80877424; } @@ -556,7 +556,7 @@ void func_80877424(EnDodongo* this, PlayState* play) { void func_80877494(EnDodongo* this) { Animation_MorphToLoop(&this->skelAnime, &object_dodongo_Anim_008B1C, -4.0f); - this->actor.speedXZ = this->unk_334 * 1.5f; + this->actor.speed = this->unk_334 * 1.5f; this->timer = Rand_S16Offset(50, 70); this->actionFunc = func_80877500; } @@ -616,7 +616,7 @@ void func_808777A8(EnDodongo* this) { Sphere16* sph; Animation_MorphToPlayOnce(&this->skelAnime, &object_dodongo_Anim_0028F0, -4.0f); - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; for (i = 0; i < ARRAY_COUNT(this->collider3Elements); i++) { sph = &this->collider3.elements[i].dim.worldSphere; @@ -696,7 +696,7 @@ void func_80877DE0(EnDodongo* this) { this->actor.flags |= ACTOR_FLAG_10; this->timer = 25; this->actionFunc = func_80877E60; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } void func_80877E60(EnDodongo* this, PlayState* play) { @@ -849,7 +849,7 @@ void func_80878424(EnDodongo* this, PlayState* play) { void func_80878594(EnDodongo* this) { this->actionFunc = func_808785B0; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } void func_808785B0(EnDodongo* this, PlayState* play) { @@ -874,7 +874,7 @@ void func_8087864C(EnDodongo* this) { Actor_PlaySfx(&this->actor, NA_SE_EN_DODO_J_DAMAGE); this->timer = 0; this->unk_304 = 0; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 8); this->actionFunc = func_808786C8; } @@ -895,7 +895,7 @@ void func_80878724(EnDodongo* this) { this->unk_304 = 0; Actor_PlaySfx(&this->actor, NA_SE_EN_DODO_J_DEAD); this->actor.flags &= ~ACTOR_FLAG_1; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 8); this->actionFunc = func_808787B0; } diff --git a/src/overlays/actors/ovl_En_Dragon/z_en_dragon.c b/src/overlays/actors/ovl_En_Dragon/z_en_dragon.c index 4ff68de3e7..abc3c0597d 100644 --- a/src/overlays/actors/ovl_En_Dragon/z_en_dragon.c +++ b/src/overlays/actors/ovl_En_Dragon/z_en_dragon.c @@ -345,9 +345,9 @@ void EnDragon_RetreatOrIdle(EnDragon* this, PlayState* play) { EnDragon_SetupExtend(this); } else if ((this->timer != 0) && (fabsf(this->actor.world.pos.x - this->actor.home.pos.x) > 101.0f) && (fabsf(this->actor.world.pos.z - this->actor.home.pos.z) > 101.0f)) { - this->actor.speedXZ = -100.0f; + this->actor.speed = -100.0f; } else { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; if ((fabsf(this->actor.world.pos.x - this->actor.home.pos.x) > 4.0f) && (fabsf(this->actor.world.pos.z - this->actor.home.pos.z) > 4.0f)) { @@ -388,12 +388,12 @@ void EnDragon_Extend(EnDragon* this, PlayState* play) { Actor_PlaySfx(&this->actor, NA_SE_EN_UTSUBO_APPEAR - SFX_FLAG); extendedPos.x += Math_SinS(this->actor.world.rot.y) * -530.0f; extendedPos.z += Math_CosS(this->actor.world.rot.y) * -530.0f; - this->actor.speedXZ = 40.0f; + this->actor.speed = 40.0f; Math_SmoothStepToS(&this->jawZRotation, 0xFA0, 5, 0xBB8, 0x14); if ((fabsf(this->actor.world.pos.x - extendedPos.x) < 51.0f) && (fabsf(this->actor.world.pos.z - extendedPos.z) < 51.0f)) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; Math_ApproachF(&this->actor.world.pos.x, extendedPos.x, 0.3f, 50.0f); Math_ApproachF(&this->actor.world.pos.z, extendedPos.z, 0.3f, 50.0f); if ((fabsf(this->actor.world.pos.x - extendedPos.x) < 4.0f) && @@ -513,7 +513,7 @@ void EnDragon_Grab(EnDragon* this, PlayState* play) { pos.z += Math_CosS(this->actor.world.rot.y) * -930.0f; Math_Vec3f_Copy(&this->actor.world.pos, &pos); this->jawZRotation = 0x1450; - this->actor.speedXZ = 60.0f; + this->actor.speed = 60.0f; } this->grabTimer++; @@ -655,7 +655,7 @@ void EnDragon_Dead(EnDragon* this, PlayState* play) { if ((this->timer != 0) && (fabsf(this->actor.world.pos.x - this->actor.home.pos.x) > 121.0f) && (fabsf(this->actor.world.pos.z - this->actor.home.pos.z) > 121.0f)) { - this->actor.speedXZ = -120.0f; + this->actor.speed = -120.0f; if (((this->pythonIndex & 1) == 0) && (Rand_ZeroOne() < 0.5f)) { //! @bug: !play->gameplayFrames is 0 essentially all the time, so this code never runs. if (((!play->gameplayFrames) & 0x1F)) { @@ -667,7 +667,7 @@ void EnDragon_Dead(EnDragon* this, PlayState* play) { return; } - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; if ((fabsf(this->actor.world.pos.x - this->actor.home.pos.x) > 20.0f) && (fabsf(this->actor.world.pos.z - this->actor.home.pos.z) > 20.0f)) { Math_ApproachF(&this->actor.world.pos.x, this->actor.home.pos.x, 0.3f, 300.0f); @@ -754,7 +754,7 @@ void EnDragon_UpdateDamage(EnDragon* this, PlayState* play) { if ((this->action == DEEP_PYTHON_ACTION_EXTEND) && (this->grabWaitTimer == 0) && (player->invincibilityTimer == 0) && (this->collider.elements[0].info.ocElemFlags & OCELEM_HIT) && (!(func_800B64FC(play, 1000.0f, &this->actor.world.pos, &sp30) >= 0.0f) || (sp30 != 1))) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->action = DEEP_PYTHON_ACTION_GRAB; this->actor.flags |= ACTOR_FLAG_100000; this->actionFunc = EnDragon_SetupGrab; diff --git a/src/overlays/actors/ovl_En_Elf/z_en_elf.c b/src/overlays/actors/ovl_En_Elf/z_en_elf.c index 406d3bd9d1..0e0433a5ef 100644 --- a/src/overlays/actors/ovl_En_Elf/z_en_elf.c +++ b/src/overlays/actors/ovl_En_Elf/z_en_elf.c @@ -233,7 +233,7 @@ void func_8088C9CC(EnElf* this, PlayState* play) { this->unk_244 = 2; this->unk_248 = 0x400; this->unk_254 = 2.0f; - this->actor.speedXZ = 1.5f; + this->actor.speed = 1.5f; this->unk_26C = func_8088C920; this->unk_25C = (s32)Rand_ZeroFloat(8.0f) + 4; } else { @@ -558,9 +558,9 @@ void func_8088D9BC(EnElf* this, PlayState* play) { Vec3f* vec = &this->unk_224; if (this->fairyFlags & 0x4000) { - Math_SmoothStepToF(&this->actor.speedXZ, 5.0f, 0.5f, 1.0f, 0.01f); + Math_SmoothStepToF(&this->actor.speed, 5.0f, 0.5f, 1.0f, 0.01f); } else { - Math_SmoothStepToF(&this->actor.speedXZ, this->unk_254, 0.2f, 0.5f, 0.01f); + Math_SmoothStepToF(&this->actor.speed, this->unk_254, 0.2f, 0.5f, 0.01f); } switch (this->unk_244) { @@ -606,7 +606,7 @@ void func_8088DB4C(EnElf* this, Vec3f* arg1, f32 arg2, f32 arg3, f32 arg4) { xzVelocity = sqrtf(SQ(xVelTarget) + SQ(zVelTarget)); clampedXZ = CLAMP(xzVelocity, arg2, arg3); - this->actor.speedXZ = clampedXZ; + this->actor.speed = clampedXZ; if ((xzVelocity != clampedXZ) && (xzVelocity != 0.0f)) { xzVelocity = clampedXZ / xzVelocity; @@ -976,7 +976,7 @@ void func_8088E850(EnElf* this, PlayState* play) { if (arrowPointedActor != NULL) { func_8088DB4C(this, &nextPos, 0.0f, 30.0f, 0.2f); - if (this->actor.speedXZ >= 5.0f) { + if (this->actor.speed >= 5.0f) { func_8088F5F4(this, play, 0x10); } } else { @@ -1299,7 +1299,7 @@ void func_8088FA38(EnElf* this, PlayState* play) { refPos = this->actor.focus.pos; func_8088DB4C(this, &refPos, 0, 30.0f, 0.2f); - if (this->actor.speedXZ >= 5.0f) { + if (this->actor.speed >= 5.0f) { func_8088F5F4(this, play, 0x10); } diff --git a/src/overlays/actors/ovl_En_Elforg/z_en_elforg.c b/src/overlays/actors/ovl_En_Elforg/z_en_elforg.c index 366f86f6c0..65cc04d84f 100644 --- a/src/overlays/actors/ovl_En_Elforg/z_en_elforg.c +++ b/src/overlays/actors/ovl_En_Elforg/z_en_elforg.c @@ -55,7 +55,7 @@ static ColliderCylinderInit sCylinderInit = { }; void EnElforg_InitializeParams(EnElforg* this) { - this->actor.speedXZ = 1.0f; + this->actor.speed = 1.0f; this->targetSpeedXZ = 1.0f; this->actor.velocity.y = 0.0f; this->actor.world.rot.y = randPlusMinusPoint5Scaled(0x10000); @@ -189,22 +189,22 @@ void EnElforg_SpawnSparkles(EnElforg* this, PlayState* play, s32 life) { void EnElforg_ApproachTargetYPosition(EnElforg* this, Vec3f* targetPos) { f32 yDifference = targetPos->y - this->actor.world.pos.y; - if (fabsf(yDifference) < this->actor.speedXZ) { + if (fabsf(yDifference) < this->actor.speed) { this->actor.world.pos.y = targetPos->y; } else if (yDifference > 0.0f) { - this->actor.world.pos.y += this->actor.speedXZ; + this->actor.world.pos.y += this->actor.speed; } else { - this->actor.world.pos.y -= this->actor.speedXZ; + this->actor.world.pos.y -= this->actor.speed; } } void EnElforg_ApproachTargetSpeedXZ(EnElforg* this) { - if (this->actor.speedXZ > this->targetSpeedXZ) { - this->actor.speedXZ *= 0.9f; - } else if (this->actor.speedXZ < (this->targetSpeedXZ - 0.1f)) { - this->actor.speedXZ += 0.1f; + if (this->actor.speed > this->targetSpeedXZ) { + this->actor.speed *= 0.9f; + } else if (this->actor.speed < (this->targetSpeedXZ - 0.1f)) { + this->actor.speed += 0.1f; } else { - this->actor.speedXZ = this->targetSpeedXZ; + this->actor.speed = this->targetSpeedXZ; } } @@ -292,7 +292,7 @@ void EnElforg_TurnInFairy(EnElforg* this, PlayState* play) { // flying towards the fountain's center. SkelAnime_Update(&this->skelAnime); this->actor.shape.yOffset *= 0.9f; - this->actor.speedXZ = 5.0f; + this->actor.speed = 5.0f; EnElforg_ApproachTargetYPosition(this, &player->bodyPartsPos[PLAYER_BODYPART_WAIST]); xzDistToPlayer = this->actor.xzDistToPlayer; diff --git a/src/overlays/actors/ovl_En_Estone/z_en_estone.c b/src/overlays/actors/ovl_En_Estone/z_en_estone.c index 2338e1c0c0..573d386e59 100644 --- a/src/overlays/actors/ovl_En_Estone/z_en_estone.c +++ b/src/overlays/actors/ovl_En_Estone/z_en_estone.c @@ -71,12 +71,12 @@ void EnEstone_Init(Actor* thisx, PlayState* play) { this->actor.shape.rot.y = this->actor.world.rot.y; if (this->actor.params == ENESTONE_TYPE_LARGE) { - this->actor.speedXZ = Rand_ZeroFloat(5.0f) + 2.0f; + this->actor.speed = Rand_ZeroFloat(5.0f) + 2.0f; this->scale = (Rand_ZeroFloat(1.0f) * 0.005f) + 0.005f; this->actor.velocity.y = Rand_ZeroFloat(10.0f) + 15.0f; this->actor.gravity = -2.0f; } else { - this->actor.speedXZ = Rand_ZeroFloat(3.0f) + 1.0f; + this->actor.speed = Rand_ZeroFloat(3.0f) + 1.0f; this->scale = (Rand_ZeroFloat(1.0f) * 0.003f) + 0.003f; this->actor.velocity.y = Rand_ZeroFloat(5.0f) + 7.0f; this->actor.gravity = -1.0f; @@ -139,7 +139,7 @@ void EnEstone_Active(EnEstone* this, PlayState* play) { velocity.y = this->actor.floorHeight; Actor_SpawnFloorDustRing(play, &this->actor, &velocity, 0.0f, 10, 6.0f, 50, 30, true); this->actor.velocity.y = this->actor.gravity = 0.0f; - this->actor.speedXZ *= 0.3f; + this->actor.speed *= 0.3f; this->actor.shape.shadowScale = 0.0f; this->inactive = true; this->timer = 50; diff --git a/src/overlays/actors/ovl_En_Fall/z_en_fall.c b/src/overlays/actors/ovl_En_Fall/z_en_fall.c index 93c9ebb414..affea4c349 100644 --- a/src/overlays/actors/ovl_En_Fall/z_en_fall.c +++ b/src/overlays/actors/ovl_En_Fall/z_en_fall.c @@ -499,7 +499,7 @@ void EnFall_MoonsTear_Initialize(EnFall* this) { } this->actor.world.rot.y = Math_Vec3f_Yaw(&this->actor.world.pos, &this->actor.home.pos); this->actor.world.rot.x = Math_Vec3f_Pitch(&this->actor.world.pos, &this->actor.home.pos); - this->actor.speedXZ = Math_Vec3f_DistXYZ(&this->actor.world.pos, &this->actor.home.pos) / 82.0f; + this->actor.speed = Math_Vec3f_DistXYZ(&this->actor.world.pos, &this->actor.home.pos) / 82.0f; this->actor.shape.rot.x = this->actor.world.rot.x; this->actor.shape.rot.y = this->actor.world.rot.y; } @@ -516,7 +516,7 @@ void EnFall_MoonsTear_Fall(EnFall* this, PlayState* play) { } if (this->actor.draw != NULL) { - if (Math_Vec3f_StepTo(&this->actor.world.pos, &this->actor.home.pos, this->actor.speedXZ) <= 0.0f) { + if (Math_Vec3f_StepTo(&this->actor.world.pos, &this->actor.home.pos, this->actor.speed) <= 0.0f) { Actor_PlaySfx(&this->actor, NA_SE_EV_GORON_BOUND_1); SET_WEEKEVENTREG(WEEKEVENTREG_74_80); SET_WEEKEVENTREG(WEEKEVENTREG_74_20); diff --git a/src/overlays/actors/ovl_En_Famos/z_en_famos.c b/src/overlays/actors/ovl_En_Famos/z_en_famos.c index dd6ba07cb1..dd54a3eded 100644 --- a/src/overlays/actors/ovl_En_Famos/z_en_famos.c +++ b/src/overlays/actors/ovl_En_Famos/z_en_famos.c @@ -347,7 +347,7 @@ void EnFamos_UpdateFlipStatus(EnFamos* this) { */ void EnFamos_SetupStillIdle(EnFamos* this) { this->actionFunc = EnFamos_StillIdle; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } void EnFamos_StillIdle(EnFamos* this, PlayState* play) { @@ -376,7 +376,7 @@ void EnFamos_SetupPathingIdle(EnFamos* this) { Math_Vec3s_ToVec3f(&this->targetDest, &this->pathPoints[this->currentPathNode]); this->targetYaw = Actor_WorldYawTowardPoint(&this->actor, &this->targetDest); this->actionFunc = EnFamos_PathingIdle; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } void EnFamos_PathingIdle(EnFamos* this, PlayState* play) { @@ -399,7 +399,7 @@ void EnFamos_SetupTurnHome(EnFamos* this) { this->targetYaw = Actor_WorldYawTowardPoint(&this->actor, &this->calmPos); Math_Vec3f_Copy(&this->targetDest, &this->calmPos); this->actionFunc = EnFamos_TurnHome; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } void EnFamos_TurnHome(EnFamos* this, PlayState* play) { @@ -439,9 +439,9 @@ void EnFamos_ReturnHome(EnFamos* this, PlayState* play) { EnFamos_SetupStillIdle(this); } } else if (distanceToHome < 40.0f) { - Math_StepToF(&this->actor.speedXZ, 0.5f, 0.3f); + Math_StepToF(&this->actor.speed, 0.5f, 0.3f); } else { - Math_StepToF(&this->actor.speedXZ, 3.0f, 0.3f); + Math_StepToF(&this->actor.speed, 3.0f, 0.3f); } } @@ -451,7 +451,7 @@ void EnFamos_ReturnHome(EnFamos* this, PlayState* play) { void EnFamos_SetupAlert(EnFamos* this) { this->actor.world.rot.y = this->actor.shape.rot.y; this->stateTimer = 8; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; if (this->isCalm == true) { this->isCalm = false; @@ -498,7 +498,7 @@ void EnFamos_Chase(EnFamos* this, PlayState* play) { abovePlayerPos.y = player->actor.world.pos.y + 100.0f; abovePlayerPos.z = player->actor.world.pos.z; this->actor.world.rot.x = -Actor_WorldPitchTowardPoint(&this->actor, &abovePlayerPos); - Math_StepToF(&this->actor.speedXZ, 6.0f, 0.5f); + Math_StepToF(&this->actor.speed, 6.0f, 0.5f); surfaceType = func_800C9B18(&play->colCtx, this->actor.floorPoly, this->actor.floorBgId); if ((this->actor.xzDistToPlayer < 30.0f) && (this->actor.floorHeight > BGCHECK_Y_MIN) && // close enough @@ -514,7 +514,7 @@ void EnFamos_Chase(EnFamos* this, PlayState* play) { void EnFamos_SetupAttackAim(EnFamos* this) { Animation_PlayOnce(&this->skelAnime, &gFamosShakeAnim); - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; Actor_PlaySfx(&this->actor, NA_SE_EN_AMOS_VOICE); this->actionFunc = EnFamos_AttackAim; } @@ -537,7 +537,7 @@ void EnFamos_Attack(EnFamos* this, PlayState* play) { s32 hitFloor; u32 surfaceType; - Math_StepToF(&this->actor.speedXZ, 20.0f, 2.0f); + Math_StepToF(&this->actor.speed, 20.0f, 2.0f); this->stateTimer--; if (this->stateTimer == 0) { this->emblemCollider.base.acFlags &= ~AC_ON; @@ -585,7 +585,7 @@ void EnFamos_SetupFinishAttack(EnFamos* this) { SkelAnime_Update(&this->skelAnime); this->emblemCollider.base.acFlags |= AC_ON; this->stateTimer = 3; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; Actor_PlaySfx(&this->actor, NA_SE_EV_EXPLOSION); this->actionFunc = EnFamos_FinishAttack; } @@ -604,12 +604,12 @@ void EnFamos_FinishAttack(EnFamos* this, PlayState* play) { void EnFamos_SetupAttackRebound(EnFamos* this) { this->actor.world.rot.x = 0x4000; this->actionFunc = EnFamos_AttackRebound; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } void EnFamos_AttackRebound(EnFamos* this, PlayState* play) { - Math_StepToF(&this->actor.speedXZ, 5.0f, 0.3f); - if (this->actor.speedXZ > 1.0f) { + Math_StepToF(&this->actor.speed, 5.0f, 0.3f); + if (this->actor.speed > 1.0f) { if (ABS_ALT(this->flipRot) > 0x4000) { func_800B9010(&this->actor, NA_SE_EN_FAMOS_FLOAT_REVERSE - SFX_FLAG); } else { @@ -618,7 +618,7 @@ void EnFamos_AttackRebound(EnFamos* this, PlayState* play) { } if ((this->baseHeight < this->actor.world.pos.y) || (this->actor.bgCheckFlags & 0x10)) { // touching ceiling - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; EnFamos_SetupChase(this); } } @@ -629,7 +629,7 @@ void EnFamos_AttackRebound(EnFamos* this, PlayState* play) { void EnFamos_SetupScanForPlayer(EnFamos* this) { this->stateTimer = 60; this->actionFunc = EnFamos_ScanForPlayer; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } void EnFamos_ScanForPlayer(EnFamos* this, PlayState* play) { @@ -651,7 +651,7 @@ void EnFamos_ScanForPlayer(EnFamos* this, PlayState* play) { void EnFamos_SetupDeathSlam(EnFamos* this) { this->emblemCollider.base.acFlags &= ~AC_ON; this->stateTimer = 20; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 20); this->flippedTimer = -1; this->actor.world.pos.y = this->actor.floorHeight - 60.0f; @@ -681,7 +681,7 @@ void EnFamos_SetupDeathExplosion(EnFamos* this) { } void EnFamos_DeathExplosion(EnFamos* this, PlayState* play) { - Math_StepToF(&this->actor.speedXZ, 3.0f, 0.3f); + Math_StepToF(&this->actor.speed, 3.0f, 0.3f); if (this->actor.colorFilterTimer == 0) { Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, false, 4); } @@ -712,7 +712,7 @@ void EnFamos_SetupDeathFade(EnFamos* this) { this->actor.flags &= ~ACTOR_FLAG_1; this->actor.shape.shadowDraw = NULL; this->actionFunc = EnFamos_DeathFade; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } void EnFamos_DeathFade(EnFamos* this, PlayState* play) { diff --git a/src/overlays/actors/ovl_En_Fg/z_en_fg.c b/src/overlays/actors/ovl_En_Fg/z_en_fg.c index cc06fe2e12..0efbf9674c 100644 --- a/src/overlays/actors/ovl_En_Fg/z_en_fg.c +++ b/src/overlays/actors/ovl_En_Fg/z_en_fg.c @@ -212,7 +212,7 @@ void EnFg_Idle(EnFg* this, PlayState* play) { this->actor.world.rot.y = Math_Vec3f_Yaw(&ac->world.pos, &this->actor.world.pos); this->actor.shape.rot = this->actor.world.rot; this->actor.velocity.y = 10.0f; - this->actor.speedXZ = 3.0f; + this->actor.speed = 3.0f; this->actor.gravity = -0.8f; this->bounceCounter = 1; this->timer = 0; @@ -263,7 +263,7 @@ void EnFg_Jump(EnFg* this, PlayState* play) { this->actor.world.rot.y = Math_Vec3f_Yaw(&ac->world.pos, &this->actor.world.pos); this->actor.shape.rot = this->actor.world.rot; this->actor.velocity.y = 10.0f; - this->actor.speedXZ = 3.0f; + this->actor.speed = 3.0f; this->actor.gravity = -0.8f; this->bounceCounter = 1; this->timer = 0; diff --git a/src/overlays/actors/ovl_En_Firefly/z_en_firefly.c b/src/overlays/actors/ovl_En_Firefly/z_en_firefly.c index 4f5de6c914..bd00c3cbd8 100644 --- a/src/overlays/actors/ovl_En_Firefly/z_en_firefly.c +++ b/src/overlays/actors/ovl_En_Firefly/z_en_firefly.c @@ -215,7 +215,7 @@ s32 EnFirefly_ReturnToPerch(EnFirefly* this, PlayState* play) { EnFirefly_SetupPerch(this); } else { if (distFromHome * 0.05f < 1.0f) { - this->actor.speedXZ *= distFromHome * 0.05f; + this->actor.speed *= distFromHome * 0.05f; } Math_ScaledStepToS(&this->actor.shape.rot.y, Actor_WorldYawTowardPoint(&this->actor, &this->actor.home.pos), @@ -274,7 +274,7 @@ s32 EnFirefly_SeekTorch(EnFirefly* this, PlayState* play) { void EnFirefly_SetupFlyIdle(EnFirefly* this) { this->timer = Rand_S16Offset(70, 100); - this->actor.speedXZ = (Rand_ZeroOne() * 1.5f) + 1.5f; + this->actor.speed = (Rand_ZeroOne() * 1.5f) + 1.5f; Math_ScaledStepToS(&this->actor.shape.rot.y, Actor_WorldYawTowardPoint(&this->actor, &this->actor.home.pos), 0x300); this->pitchTarget = ((this->maxAltitude < this->actor.world.pos.y) ? 0xC00 : -0xC00) + 0x1554; this->skelAnime.playSpeed = 1.0f; @@ -291,7 +291,7 @@ void EnFirefly_FlyIdle(EnFirefly* this, PlayState* play) { } isSkelAnimeUpdated = Animation_OnFrame(&this->skelAnime, 0.0f); - this->actor.speedXZ = (Rand_ZeroOne() * 1.5f) + 1.5f; + this->actor.speed = (Rand_ZeroOne() * 1.5f) + 1.5f; if (!EnFirefly_ReturnToPerch(this, play) && !EnFirefly_SeekTorch(this, play)) { if (isSkelAnimeUpdated) { @@ -372,7 +372,7 @@ void EnFirefly_SetupFall(EnFirefly* this, PlayState* play) { } if (this->actor.flags & ACTOR_FLAG_8000) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } this->actionFunc = EnFirefly_Fall; @@ -381,7 +381,7 @@ void EnFirefly_SetupFall(EnFirefly* this, PlayState* play) { // Fall to the ground after being hit void EnFirefly_Fall(EnFirefly* this, PlayState* play) { this->actor.colorFilterTimer = 40; - Math_StepToF(&this->actor.speedXZ, 0.0f, 0.5f); + Math_StepToF(&this->actor.speed, 0.0f, 0.5f); if (!(this->actor.flags & ACTOR_FLAG_8000)) { if (this->drawDmgEffType != ACTOR_DRAW_DMGEFF_FROZEN_NO_SFX) { @@ -398,7 +398,7 @@ void EnFirefly_Fall(EnFirefly* this, PlayState* play) { void EnFirefly_SetupDie(EnFirefly* this) { this->timer = 15; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actionFunc = EnFirefly_Die; } @@ -434,7 +434,7 @@ void EnFirefly_DiveAttack(EnFirefly* this, PlayState* play) { this->timer--; } - Math_StepToF(&this->actor.speedXZ, 4.0f, 0.5f); + Math_StepToF(&this->actor.speed, 4.0f, 0.5f); if (this->actor.bgCheckFlags & 8) { Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.wallYaw, 2, 0xC00, 0x300); @@ -480,7 +480,7 @@ void EnFirefly_SetupRebound(EnFirefly* this) { this->actor.world.rot.x = 0x7000; this->timer = 18; this->skelAnime.playSpeed = 1.0f; - this->actor.speedXZ = 2.5f; + this->actor.speed = 2.5f; this->actionFunc = EnFirefly_Rebound; } @@ -489,7 +489,7 @@ void EnFirefly_Rebound(EnFirefly* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); Math_ScaledStepToS(&this->actor.shape.rot.x, 0, 0x100); Math_StepToF(&this->actor.velocity.y, 0.0f, 0.4f); - if (Math_StepToF(&this->actor.speedXZ, 0.0f, 0.15f)) { + if (Math_StepToF(&this->actor.speed, 0.0f, 0.15f)) { if (this->timer != 0) { this->timer--; } @@ -521,7 +521,7 @@ void EnFirefly_FlyAway(EnFirefly* this, PlayState* play) { return; } - Math_StepToF(&this->actor.speedXZ, 3.0f, 0.3f); + Math_StepToF(&this->actor.speed, 3.0f, 0.3f); if (this->actor.bgCheckFlags & 1) { this->pitchTarget = 0x954; @@ -550,7 +550,7 @@ void EnFirefly_SetupStunned(EnFirefly* this) { if (this->actionFunc != EnFirefly_Stunned) { this->actor.velocity.y = 0.0f; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } this->auraType = KEESE_AURA_NONE; @@ -586,7 +586,7 @@ void EnFirefly_Stunned(EnFirefly* this, PlayState* play) { void EnFirefly_SetupPerch(EnFirefly* this) { this->timer = 1; this->actionFunc = EnFirefly_Perch; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } // When perching, sit on collision and flap at random intervals @@ -611,7 +611,7 @@ void EnFirefly_SetupDisturbDiveAttack(EnFirefly* this) { this->actor.shape.rot.x = 0x1554; this->actor.shape.rot.y = this->actor.yawTowardsPlayer; this->timer = 50; - this->actor.speedXZ = 3.0f; + this->actor.speed = 3.0f; this->actionFunc = EnFirefly_DisturbDiveAttack; } diff --git a/src/overlays/actors/ovl_En_Fish/z_en_fish.c b/src/overlays/actors/ovl_En_Fish/z_en_fish.c index d164bf0703..60c09ebceb 100644 --- a/src/overlays/actors/ovl_En_Fish/z_en_fish.c +++ b/src/overlays/actors/ovl_En_Fish/z_en_fish.c @@ -278,12 +278,12 @@ void func_8091DF68(Actor* thisx, PlayState* play) { EnFish* this = THIS; func_8091DD48(this); - Math_SmoothStepToF(&thisx->speedXZ, 0.0f, 0.05f, 0.3f, 0.0f); + Math_SmoothStepToF(&thisx->speed, 0.0f, 0.05f, 0.3f, 0.0f); - if ((thisx->speedXZ * 1.4f) + 0.8f > 2.0f) { + if ((thisx->speed * 1.4f) + 0.8f > 2.0f) { this->skelAnime.playSpeed = 2.0f; } else { - this->skelAnime.playSpeed = (thisx->speedXZ * 1.4f) + 0.8f; + this->skelAnime.playSpeed = (thisx->speed * 1.4f) + 0.8f; } this->unk_270 >>= 1; @@ -327,7 +327,7 @@ void func_8091E128(Actor* thisx, PlayState* play) { EnFish* this = THIS; func_8091DD48(this); - Math_SmoothStepToF(&thisx->speedXZ, 1.8f, 0.08f, 0.4f, 0.0f); + Math_SmoothStepToF(&thisx->speed, 1.8f, 0.08f, 0.4f, 0.0f); if ((func_8091D630(&thisx->world.pos, &thisx->home.pos) > SQ(80.0f)) || (this->unk_240 < 4)) { this->unk_270 = this->unk_264; @@ -342,10 +342,10 @@ void func_8091E128(Actor* thisx, PlayState* play) { this->unk_24C = 0.0f; } - if ((thisx->speedXZ * 1.5f) + 0.8f > 4.0f) { + if ((thisx->speed * 1.5f) + 0.8f > 4.0f) { this->skelAnime.playSpeed = 4.0f; } else { - this->skelAnime.playSpeed = (thisx->speedXZ * 1.5f) + 0.8f; + this->skelAnime.playSpeed = (thisx->speed * 1.5f) + 0.8f; } if (this->unk_240 <= 0) { @@ -378,7 +378,7 @@ void func_8091E34C(Actor* thisx, PlayState* play2) { s32 pad; func_8091DD48(this); - Math_SmoothStepToF(&thisx->speedXZ, 4.2f, 0.08f, 1.4f, 0.0f); + Math_SmoothStepToF(&thisx->speed, 4.2f, 0.08f, 1.4f, 0.0f); if (func_8091D630(&thisx->world.pos, &thisx->home.pos) > SQ(160.0f)) { this->unk_270 = this->unk_264; @@ -418,10 +418,10 @@ void func_8091E34C(Actor* thisx, PlayState* play2) { this->unk_24C = 0.0f; } - if ((thisx->speedXZ * 1.5f) + 0.8f > 4.0f) { + if ((thisx->speed * 1.5f) + 0.8f > 4.0f) { this->skelAnime.playSpeed = 4.0f; } else { - this->skelAnime.playSpeed = (thisx->speedXZ * 1.5f) + 0.8f; + this->skelAnime.playSpeed = (thisx->speed * 1.5f) + 0.8f; } if ((this->unk_240 <= 0) || (!sp3C && (sp38 == 0))) { @@ -453,7 +453,7 @@ void func_8091E658(Actor* thisx, PlayState* play) { s16 sp32; func_8091DD48(this); - Math_SmoothStepToF(&thisx->speedXZ, 1.8f, 0.1f, 0.5f, 0.0f); + Math_SmoothStepToF(&thisx->speed, 1.8f, 0.1f, 0.5f, 0.0f); if (func_8091D630(&thisx->world.pos, &thisx->home.pos) > SQ(80.0f)) { this->unk_270 = this->unk_264; @@ -475,10 +475,10 @@ void func_8091E658(Actor* thisx, PlayState* play) { this->unk_24C = 1.2f; } - if ((thisx->speedXZ * 1.5f) + 0.8f > 4.0f) { + if ((thisx->speed * 1.5f) + 0.8f > 4.0f) { this->skelAnime.playSpeed = 4.0f; } else { - this->skelAnime.playSpeed = (thisx->speedXZ * 1.5f) + 0.8f; + this->skelAnime.playSpeed = (thisx->speed * 1.5f) + 0.8f; } if (this->unk_240 <= 0) { @@ -502,7 +502,7 @@ void func_8091E810(EnFish* this) { void func_8091E880(Actor* thisx, PlayState* play) { EnFish* this = THIS; - Math_SmoothStepToF(&this->actor.speedXZ, 0.0f, 0.1f, 0.1f, 0.0f); + Math_SmoothStepToF(&this->actor.speed, 0.0f, 0.1f, 0.1f, 0.0f); this->unk_26E = 0x43; this->unk_272 = 0x43; this->unk_268 = 0x4000; @@ -563,7 +563,7 @@ void func_8091EAF0(Actor* thisx, PlayState* play) { s32 sp40 = play->state.frames; s16 phi_v1; - Math_SmoothStepToF(&this->actor.speedXZ, Rand_ZeroOne() * 0.2f, 0.1f, 0.1f, 0.0f); + Math_SmoothStepToF(&this->actor.speed, Rand_ZeroOne() * 0.2f, 0.1f, 0.1f, 0.0f); phi_v1 = (s16)((((sp40 >> 5) & 2) | ((sp40 >> 2) & 1)) << 0xB) * 0.3f; if (sp40 & 4) { phi_v1 *= -1; @@ -625,12 +625,12 @@ void func_8091ED70(Actor* thisx, PlayState* play) { func_8091D840(thisx, play, 2, 25.0f); } - Math_SmoothStepToF(&thisx->speedXZ, 2.8f, 0.1f, 0.4f, 0.0f); + Math_SmoothStepToF(&thisx->speed, 2.8f, 0.1f, 0.4f, 0.0f); if ((thisx->bgCheckFlags & 8) || !(thisx->bgCheckFlags & 0x20)) { sp2E = Math_Vec3f_Yaw(&thisx->world.pos, &thisx->home.pos); thisx->home.rot.y = Rand_S16Offset(-100, 100) + sp2E; - thisx->speedXZ *= 0.5f; + thisx->speed *= 0.5f; } this->unk_268 = 0; @@ -651,10 +651,10 @@ void func_8091ED70(Actor* thisx, PlayState* play) { func_8091D728(this); } - if ((thisx->speedXZ * 1.5f) + 1.0f > 4.8f) { + if ((thisx->speed * 1.5f) + 1.0f > 4.8f) { this->skelAnime.playSpeed = 4.8f; } else { - this->skelAnime.playSpeed = (thisx->speedXZ * 1.5f) + 1.0f; + this->skelAnime.playSpeed = (thisx->speed * 1.5f) + 1.0f; } if (this->unk_240 <= 0) { @@ -700,14 +700,14 @@ void func_8091EFE8(Actor* thisx, PlayState* play) { } if (this->unk_277 == 0) { - Math_SmoothStepToF(&this->actor.speedXZ, 2.8f, 0.1f, 0.4f, 0.0f); + Math_SmoothStepToF(&this->actor.speed, 2.8f, 0.1f, 0.4f, 0.0f); if (this->unk_240 < 6) { - this->actor.speedXZ *= 0.75f; + this->actor.speed *= 0.75f; } } if ((this->actor.bgCheckFlags & 8) && !(this->actor.bgCheckFlags & 0x20)) { - this->actor.speedXZ *= 0.5f; + this->actor.speed *= 0.5f; } if (((Rand_Next() >> 0x1B) == 0) || ((this->actor.bgCheckFlags & 8) && ((Rand_Next() >> 0x1E) == 0)) || @@ -760,10 +760,10 @@ void func_8091EFE8(Actor* thisx, PlayState* play) { } this->actor.velocity.y *= 0.8f; - if ((this->actor.speedXZ * 1.5f) + 1.0f > 4.8f) { + if ((this->actor.speed * 1.5f) + 1.0f > 4.8f) { this->skelAnime.playSpeed = 4.8f; } else { - this->skelAnime.playSpeed = (this->actor.speedXZ * 1.5f) + 1.0f; + this->skelAnime.playSpeed = (this->actor.speed * 1.5f) + 1.0f; } } @@ -804,7 +804,7 @@ void func_8091F3BC(Actor* thisx, PlayState* play) { func_8091DD48(this); Math_StepToF(&this->actor.world.pos.y, this->actor.home.pos.y, 2.0f); - Math_SmoothStepToF(&this->actor.speedXZ, sp3C->x, sp3C->y, sp3C->z, 0.0f); + Math_SmoothStepToF(&this->actor.speed, sp3C->x, sp3C->y, sp3C->z, 0.0f); this->unk_24C = 0.0f; if (func_8091D630(&this->actor.world.pos, &this->actor.home.pos) > SQ(15.0f)) { @@ -820,7 +820,7 @@ void func_8091F3BC(Actor* thisx, PlayState* play) { phi_f0 = 0.0f; } - temp_f2 = this->actor.speedXZ + 0.4f + phi_f0; + temp_f2 = this->actor.speed + 0.4f + phi_f0; this->skelAnime.playSpeed = CLAMP(temp_f2, 0.5f, 1.6f); if (this->unk_240 <= 0) { diff --git a/src/overlays/actors/ovl_En_Fish2/z_en_fish2.c b/src/overlays/actors/ovl_En_Fish2/z_en_fish2.c index 110a596b0b..55b6bfca06 100644 --- a/src/overlays/actors/ovl_En_Fish2/z_en_fish2.c +++ b/src/overlays/actors/ovl_En_Fish2/z_en_fish2.c @@ -235,7 +235,7 @@ void func_80B287F4(EnFish2* this, s32 arg1) { if (arg1 == 0) { this->unk_338 = 410.0f - this->unk_2C4; } - Math_ApproachF(&this->unk_350->speedXZ, (D_80B2B380[0] - this->unk_330) * this->unk_338, 0.1f, 0.4f); + Math_ApproachF(&this->unk_350->speed, (D_80B2B380[0] - this->unk_330) * this->unk_338, 0.1f, 0.4f); } Math_Vec3f_Copy(&sp2C, &this->unk_350->world.pos); this->unk_34A = Math_Vec3f_Yaw(&this->actor.world.pos, &sp2C); @@ -377,14 +377,14 @@ void func_80B28C14(EnFish2* this, PlayState* play) { } if (this->unk_2B4 == 0) { - Math_ApproachF(&this->actor.speedXZ, (D_80B2B380[0] - this->unk_330) * 400.0f, 0.3f, 0.3f); - if (this->actor.speedXZ > 3.0f) { - this->actor.speedXZ = 3.0f; - } else if (this->actor.speedXZ < 1.5f) { - this->actor.speedXZ = 1.5f; + Math_ApproachF(&this->actor.speed, (D_80B2B380[0] - this->unk_330) * 400.0f, 0.3f, 0.3f); + if (this->actor.speed > 3.0f) { + this->actor.speed = 3.0f; + } else if (this->actor.speed < 1.5f) { + this->actor.speed = 1.5f; } } else { - Math_ApproachZeroF(&this->actor.speedXZ, 0.3f, 0.3f); + Math_ApproachZeroF(&this->actor.speed, 0.3f, 0.3f); } if ((D_80B2B2E8 == 0) && (D_80B2B2E0 != 2)) { @@ -448,7 +448,7 @@ void func_80B29194(EnFish2* this) { } this->unk_2C4 = 0; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; if (this->unk_2C8 == 0) { this->unk_34C = 400; Math_Vec3f_Copy(&this->actor.world.pos, &this->unk_324); @@ -463,12 +463,12 @@ void func_80B29194(EnFish2* this) { void func_80B29250(EnFish2* this, PlayState* play) { if (!func_80B28478(this)) { - Math_ApproachF(&this->actor.speedXZ, (D_80B2B380[0] - this->unk_330) * 1000.0f, 0.3f, 0.3f); + Math_ApproachF(&this->actor.speed, (D_80B2B380[0] - this->unk_330) * 1000.0f, 0.3f, 0.3f); - if (this->actor.speedXZ > 4.0f) { - this->actor.speedXZ = 4.0f; - } else if (this->actor.speedXZ < 2.0f) { - this->actor.speedXZ = 2.0f; + if (this->actor.speed > 4.0f) { + this->actor.speed = 4.0f; + } else if (this->actor.speed < 2.0f) { + this->actor.speed = 2.0f; } func_80B287F4(this, 0); @@ -492,12 +492,12 @@ void func_80B293C4(EnFish2* this, PlayState* play) { if (func_80B28478(this) == 0) { func_80B287F4(this, 1); - Math_ApproachF(&this->actor.speedXZ, (*D_80B2B380 - this->unk_330) * 1000.0f, 0.3f, 0.3f); + Math_ApproachF(&this->actor.speed, (*D_80B2B380 - this->unk_330) * 1000.0f, 0.3f, 0.3f); - if (this->actor.speedXZ > 3.0f) { - this->actor.speedXZ = 3.0f; - } else if (this->actor.speedXZ < 1.0f) { - this->actor.speedXZ = 1.0f; + if (this->actor.speed > 3.0f) { + this->actor.speed = 3.0f; + } else if (this->actor.speed < 1.0f) { + this->actor.speed = 1.0f; } if (this->unk_2CC <= currentFrame) { @@ -526,7 +526,7 @@ void func_80B2951C(EnFish2* this) { } this->unk_2B4 = 10; - this->actor.speedXZ = 3.0f; + this->actor.speed = 3.0f; Actor_Kill(this->unk_350); this->unk_350 = NULL; D_80B2B2F4 = &this->actor; @@ -542,7 +542,7 @@ void func_80B295A4(EnFish2* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); Math_SmoothStepToS(&this->actor.world.rot.y, Math_Vec3f_Yaw(&this->actor.world.pos, &play->view.eye), 1, 0x1388, 0); - Math_ApproachZeroF(&this->actor.speedXZ, 0.3f, 0.3f); + Math_ApproachZeroF(&this->actor.speed, 0.3f, 0.3f); if (this->unk_2B4 != 0) { Math_Vec3f_Copy(&sp60, &this->unk_318); sp60.x += randPlusMinusPoint5Scaled(100.0f); @@ -576,7 +576,7 @@ void func_80B29778(EnFish2* this) { } this->actionFunc = func_80B297FC; this->unk_324.y = this->unk_2D4; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } void func_80B297FC(EnFish2* this, PlayState* play) { @@ -605,7 +605,7 @@ void func_80B297FC(EnFish2* this, PlayState* play) { if ((fabsf(this->actor.world.pos.x - this->unk_324.x) < 2.0f) && (this->actor.world.pos.y < (this->unk_2D4 + 3.0f)) && (fabsf(this->actor.world.pos.z - this->unk_324.z) < 2.0f)) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->unk_34A = BINANG_ROT180(this->actor.home.rot.y); this->unk_2C4++; this->actor.velocity.y = 0.0f; @@ -770,8 +770,8 @@ void func_80B29EE4(EnFish2* this, PlayState* play) { this->unk_2C4++; } this->unk_338 = 410.0f - this->unk_2C4; - Math_ApproachF(&this->actor.speedXZ, 2.0f, 0.3f, 0.3f); - Math_ApproachF(&this->unk_350->speedXZ, (D_80B2B380[0] - this->unk_330) * this->unk_338, 0.1f, 0.4f); + Math_ApproachF(&this->actor.speed, 2.0f, 0.3f, 0.3f); + Math_ApproachF(&this->unk_350->speed, (D_80B2B380[0] - this->unk_330) * this->unk_338, 0.1f, 0.4f); func_80B289DC(this, play); Math_Vec3f_Copy(&sp2C, &this->unk_350->world.pos); this->unk_34A = Math_Vec3f_Yaw(&this->actor.world.pos, &sp2C); @@ -887,7 +887,7 @@ void func_80B2A498(EnFish2* this, PlayState* play) { temp_v0 = Actor_Spawn(&play->actorCtx, play, ACTOR_EN_COL_MAN, sp80.x, sp80.y, sp80.z, 0, this->actor.world.rot.y, 0, 0); if (temp_v0 != NULL) { - temp_v0->speedXZ = 4.0f; + temp_v0->speed = 4.0f; temp_v0->velocity.y = 15.0f; Actor_PlaySfx(&this->actor, NA_SE_SY_PIECE_OF_HEART); CLEAR_WEEKEVENTREG(WEEKEVENTREG_81_10); diff --git a/src/overlays/actors/ovl_En_Fishing/z_en_fishing.c b/src/overlays/actors/ovl_En_Fishing/z_en_fishing.c index 79ca3a14b8..04b0752599 100644 --- a/src/overlays/actors/ovl_En_Fishing/z_en_fishing.c +++ b/src/overlays/actors/ovl_En_Fishing/z_en_fishing.c @@ -1574,7 +1574,7 @@ void EnFishing_DrawLureHook(PlayState* play, Vec3f* pos, Vec3f* refPos, u8 hookI Matrix_Translate(pos->x, pos->y, pos->z, MTXMODE_NEW); - if ((player->actor.speedXZ == 0.0f) && (D_809101B4 == 0.0f)) { + if ((player->actor.speed == 0.0f) && (D_809101B4 == 0.0f)) { Math_ApproachF(&sLureHookRotY[hookIndex], ry, 0.1f, 0.3f); } else { sLureHookRotY[hookIndex] = ry; @@ -1785,7 +1785,7 @@ void EnFishing_DrawLureAndLine(PlayState* play, Vec3f* linePos, Vec3f* lineRot) sLurePos = sReelLinePos[LINE_SEG_COUNT - 1]; sLureRot.x = sReelLineRot[LINE_SEG_COUNT - 2].x + M_PI; - if ((player->actor.speedXZ == 0.0f) && (D_80917200 == 0)) { + if ((player->actor.speed == 0.0f) && (D_80917200 == 0)) { Math_ApproachF(&sLureRot.y, sReelLineRot[LINE_SEG_COUNT - 2].y, 0.1f, 0.2f); } else { sLureRot.y = sReelLineRot[LINE_SEG_COUNT - 2].y; @@ -2871,9 +2871,9 @@ void EnFishing_UpdateFish(Actor* thisx, PlayState* play2) { this->actor.uncullZoneScale = 50.0f; if (this->unk_148 == 0) { - sp118 = (player->actor.speedXZ * 0.15f) + 0.25f; + sp118 = (player->actor.speed * 0.15f) + 0.25f; } else { - sp118 = (player->actor.speedXZ * 0.3f) + 0.25f; + sp118 = (player->actor.speed * 0.3f) + 0.25f; } if ((D_80917200 != 0) || (sSubCamId != SUB_CAM_ID_DONE) || @@ -3018,7 +3018,7 @@ void EnFishing_UpdateFish(Actor* thisx, PlayState* play2) { case 10: this->unk_1AC = this->actor.home.pos; - Math_ApproachF(&this->actor.speedXZ, 2.0f, 1.0f, 0.5f); + Math_ApproachF(&this->actor.speed, 2.0f, 1.0f, 0.5f); Math_ApproachF(&this->unk_1A8, 4096.0f, 1.0f, 256.0f); if (sp124 < 40.0f) { @@ -3040,7 +3040,7 @@ void EnFishing_UpdateFish(Actor* thisx, PlayState* play2) { case 11: this->unk_1AC = this->actor.home.pos; - Math_ApproachF(&this->actor.speedXZ, 0.0f, 1.0f, 0.05f); + Math_ApproachF(&this->actor.speed, 0.0f, 1.0f, 0.05f); Math_ApproachF(&this->unk_1A8, 0.0f, 1.0f, 256.0f); if (sp124 >= 40.0f) { @@ -3070,7 +3070,7 @@ void EnFishing_UpdateFish(Actor* thisx, PlayState* play2) { break; case 0: - Math_ApproachF(&this->actor.speedXZ, 1.0f, 1.0f, 0.05f); + Math_ApproachF(&this->actor.speed, 1.0f, 1.0f, 0.05f); Math_ApproachF(&this->unk_1A8, 0.0f, 1.0f, 256.0f); if (this->unk_172[0] == 0) { @@ -3107,14 +3107,14 @@ void EnFishing_UpdateFish(Actor* thisx, PlayState* play2) { if ((this->actor.xzDistToPlayer < (250.0f * sp118)) || (this->unk_172[1] != 0)) { Math_ApproachF(&this->unk_1A8, 8192.0f, 1.0f, 768.0f); - Math_ApproachF(&this->actor.speedXZ, 4.2f, 1.0f, 0.75); + Math_ApproachF(&this->actor.speed, 4.2f, 1.0f, 0.75); this->unk_188 = 1.2f; this->unk_18C = 4000.0f; this->unk_172[0] = 20; } else { this->unk_188 = 1.0f; this->unk_18C = 2000.0f; - Math_ApproachF(&this->actor.speedXZ, 1.5f, 1.0f, 0.1f); + Math_ApproachF(&this->actor.speed, 1.5f, 1.0f, 0.1f); } if ((this->unk_172[0] == 0) || (sp124 < 50.0f)) { @@ -3136,7 +3136,7 @@ void EnFishing_UpdateFish(Actor* thisx, PlayState* play2) { Math_ApproachS(&this->unk_15E, 0, 0x14, 0x20); if ((this->actor.xzDistToPlayer < (250.0f * sp118)) || (this->unk_172[1] != 0)) { - Math_ApproachF(&this->actor.speedXZ, 3.0f, 1.0f, 0.75); + Math_ApproachF(&this->actor.speed, 3.0f, 1.0f, 0.75); this->unk_188 = 1.0f; this->unk_172[0] = 20; this->unk_18C = 4000.0f; @@ -3150,12 +3150,12 @@ void EnFishing_UpdateFish(Actor* thisx, PlayState* play2) { } else if (sp124 > 50.0f) { this->unk_188 = 0.8f; this->unk_18C = 1500.0f; - Math_ApproachF(&this->actor.speedXZ, 1.0f, 1.0f, 0.1f); + Math_ApproachF(&this->actor.speed, 1.0f, 1.0f, 0.1f); Math_ApproachF(&this->unk_1A8, 2048.0f, 1.0f, 128.0f); } else { this->unk_188 = 0.4f; this->unk_18C = 500.0f; - Math_ApproachZeroF(&this->actor.speedXZ, 1.0f, 0.02f); + Math_ApproachZeroF(&this->actor.speed, 1.0f, 0.02f); Math_ApproachF(&this->unk_1A8, 0.0f, 1.0f, 256.0f); } @@ -3184,11 +3184,11 @@ void EnFishing_UpdateFish(Actor* thisx, PlayState* play2) { Math_ApproachS(&this->unk_15E, -0x1000, 0x14, 0x100); if (this->actor.world.pos.y < (WATER_SURFACE_Y(play) - 20.0f)) { - Math_ApproachF(&this->actor.speedXZ, 0.5f, 1.0f, 0.1f); + Math_ApproachF(&this->actor.speed, 0.5f, 1.0f, 0.1f); } else { - Math_ApproachZeroF(&this->actor.speedXZ, 1.0f, 0.01f); + Math_ApproachZeroF(&this->actor.speed, 1.0f, 0.01f); - if ((this->actor.speedXZ == 0.0f) || (this->actor.world.pos.y > (WATER_SURFACE_Y(play) - 5.0f))) { + if ((this->actor.speed == 0.0f) || (this->actor.world.pos.y > (WATER_SURFACE_Y(play) - 5.0f))) { this->unk_1AC.x = Rand_ZeroFloat(300.0f); this->unk_1AC.z = Rand_ZeroFloat(300.0f); this->unk_1AC.y = this->actor.floorHeight + 10.0f; @@ -3222,7 +3222,7 @@ void EnFishing_UpdateFish(Actor* thisx, PlayState* play2) { if (sp124 > 40.0f) { this->unk_188 = 0.7f; this->unk_18C = 1200.0f; - Math_ApproachF(&this->actor.speedXZ, 0.5f, 1.0f, 0.01f); + Math_ApproachF(&this->actor.speed, 0.5f, 1.0f, 0.01f); Math_ApproachF(&this->unk_1A8, 2048.0f, 1.0f, 128.0f); } else { this->unk_150 = -1; @@ -3285,7 +3285,7 @@ void EnFishing_UpdateFish(Actor* thisx, PlayState* play2) { this->unk_18C = 500.0f; this->unk_172[0] = Rand_ZeroFloat(10.0f) + 2.0f; } - Math_ApproachF(&this->actor.speedXZ, -0.2f, 1.0f, 0.1f); + Math_ApproachF(&this->actor.speed, -0.2f, 1.0f, 0.1f); this->unk_156 = 1; } else { if (this->unk_156 != 0) { @@ -3293,7 +3293,7 @@ void EnFishing_UpdateFish(Actor* thisx, PlayState* play2) { this->unk_1A8 = 0.0f; this->unk_18C = 3000.0f; } - Math_ApproachF(&this->actor.speedXZ, 3.0f, 1.0f, 0.15f); + Math_ApproachF(&this->actor.speed, 3.0f, 1.0f, 0.15f); this->unk_156 = 0; } @@ -3377,7 +3377,7 @@ void EnFishing_UpdateFish(Actor* thisx, PlayState* play2) { this->unk_1AC.z = sLurePos.z + sp100.z; this->unk_1AC.y = sLurePos.y - 10.0f; this->unk_1A8 = 4096.0f; - Math_ApproachF(&this->actor.speedXZ, this->unk_180 * 0.8f, 1.0f, 1.0f); + Math_ApproachF(&this->actor.speed, this->unk_180 * 0.8f, 1.0f, 1.0f); if ((D_8090CD14 != 3) || (sLurePos.y > (WATER_SURFACE_Y(play) + 5.0f)) || (sqrtf(SQ(sLurePos.x) + SQ(sLurePos.z)) > 800.0f)) { @@ -3402,7 +3402,7 @@ void EnFishing_UpdateFish(Actor* thisx, PlayState* play2) { this->unk_149 = 50; sp134 = 2; this->unk_1AC = sLurePos; - Math_ApproachF(&this->actor.speedXZ, this->unk_180, 1.0f, 1.0f); + Math_ApproachF(&this->actor.speed, this->unk_180, 1.0f, 1.0f); if ((D_8090CD14 != 3) || (this->unk_172[0] == 0) || (sLurePos.y > (WATER_SURFACE_Y(play) + 5.0f)) || (sqrtf(SQ(sLurePos.x) + SQ(sLurePos.z)) > 800.0f)) { @@ -3467,7 +3467,7 @@ void EnFishing_UpdateFish(Actor* thisx, PlayState* play2) { case -3: this->unk_149 = 50; this->unk_1AC = sLurePos; - Math_ApproachF(&this->actor.speedXZ, 2.0f, 1.0f, 1.0f); + Math_ApproachF(&this->actor.speed, 2.0f, 1.0f, 1.0f); if ((D_8090CD14 != 3) || (this->unk_172[0] == 0) || (sLurePos.y > (WATER_SURFACE_Y(play) + 5.0f)) || (sqrtf(SQ(sLurePos.x) + SQ(sLurePos.z)) > 800.0f)) { @@ -3641,17 +3641,17 @@ void EnFishing_UpdateFish(Actor* thisx, PlayState* play2) { D_8091726C = 0.0f; this->unk_188 = 1.6f; this->unk_18C = 6000.0f; - Math_ApproachF(&this->actor.speedXZ, 7.5f, 1.0f, 1.0f); + Math_ApproachF(&this->actor.speed, 7.5f, 1.0f, 1.0f); Math_ApproachS(&this->unk_168, 0x4E20, 2, 0xFA0); } else { if ((D_80917274 == 0) && (D_80917206 == 2)) { this->unk_188 = 1.0f; this->unk_18C = 2000.0f; - Math_ApproachF(&this->actor.speedXZ, 3.0f, 1.0f, 0.2f); + Math_ApproachF(&this->actor.speed, 3.0f, 1.0f, 0.2f); } else { this->unk_188 = 1.4f; this->unk_18C = 5000.0f; - Math_ApproachF(&this->actor.speedXZ, 5.0f, 1.0f, 0.5f); + Math_ApproachF(&this->actor.speed, 5.0f, 1.0f, 0.5f); } if (this->unk_148 == 0) { @@ -3676,7 +3676,7 @@ void EnFishing_UpdateFish(Actor* thisx, PlayState* play2) { D_8091726C = 1.3f - (this->unk_1A4 * 0.00899f * 1.4f); } - Math_ApproachF(&this->actor.speedXZ, 2.0f, 1.0f, 0.5f); + Math_ApproachF(&this->actor.speed, 2.0f, 1.0f, 0.5f); if (this->unk_172[1] == 0) { this->unk_14A = 0; @@ -3697,7 +3697,7 @@ void EnFishing_UpdateFish(Actor* thisx, PlayState* play2) { } if (D_80917274 || (D_80917206 != 2)) { - if (this->actor.speedXZ < 3.0f) { + if (this->actor.speed < 3.0f) { if (D_809171FE & 8) { sp100.x = -0.8f; } else { @@ -3720,11 +3720,11 @@ void EnFishing_UpdateFish(Actor* thisx, PlayState* play2) { if ((SQ(sp10C.x) + SQ(sp10C.y) + SQ(sp10C.z)) > SQ(20.0f)) { Math_ApproachF(&this->actor.world.pos.x, sReelLinePos[LINE_SEG_COUNT - 2].x, 0.2f, - 2.0f * (this->actor.speedXZ * 1.5f)); + 2.0f * (this->actor.speed * 1.5f)); Math_ApproachF(&this->actor.world.pos.y, sReelLinePos[LINE_SEG_COUNT - 2].y, 0.2f, - 2.0f * (this->actor.speedXZ * 1.5f) * 5.0f * 0.1f); + 2.0f * (this->actor.speed * 1.5f) * 5.0f * 0.1f); Math_ApproachF(&this->actor.world.pos.z, sReelLinePos[LINE_SEG_COUNT - 2].z, 0.2f, - 2.0f * (this->actor.speedXZ * 1.5f)); + 2.0f * (this->actor.speed * 1.5f)); } if (CHECK_BTN_ALL(input->cur.button, BTN_A) || (input->rel.stick_y < -30)) { @@ -3955,7 +3955,7 @@ void EnFishing_UpdateFish(Actor* thisx, PlayState* play2) { D_8090CF18 = 3; } - Math_ApproachF(&this->actor.speedXZ, 5.0f, 1.0f, 1.0f); + Math_ApproachF(&this->actor.speed, 5.0f, 1.0f, 1.0f); if (sp124 < 20.0f) { Math_ApproachS(&this->unk_168, 0x4E20, 2, 0xFA0); @@ -4014,7 +4014,7 @@ void EnFishing_UpdateFish(Actor* thisx, PlayState* play2) { spF6 = -0x1F40; } - if (this->actor.speedXZ >= 3.2f) { + if (this->actor.speed >= 3.2f) { Math_ApproachS(&this->unk_166, spF6, 2, 0x4E20); } else { Math_ApproachS(&this->unk_166, spF6, 3, 0xBB8); @@ -4050,7 +4050,7 @@ void EnFishing_UpdateFish(Actor* thisx, PlayState* play2) { Math_ApproachS(&this->unk_15A, this->unk_160, spF0, spEE); Math_ApproachS(&this->unk_15C, this->unk_162, spFA, 0x2000); - if (this->actor.speedXZ <= 0.5f) { + if (this->actor.speed <= 0.5f) { Math_ApproachS(&this->actor.shape.rot.x, 0, 10, this->unk_170); Math_ApproachS(&this->unk_170, 0x500, 1, 0x20); } else { @@ -4081,14 +4081,14 @@ void EnFishing_UpdateFish(Actor* thisx, PlayState* play2) { if ((this->actor.world.pos.y < WATER_SURFACE_Y(play)) && (this->actor.world.pos.y > (WATER_SURFACE_Y(play) - 10.0f)) && !(this->unk_154 & 1) && - (this->actor.speedXZ > 0.0f)) { + (this->actor.speed > 0.0f)) { Vec3f pos = this->actor.world.pos; pos.y = WATER_SURFACE_Y(play); EnFishing_SpawnRipple(&this->actor.projectedPos, play->specialEffects, &pos, 80.0f, 500.0f, 150, 90); } - if ((this->actor.speedXZ > 0.0f) || (this->unk_150 == 5)) { + if ((this->actor.speed > 0.0f) || (this->unk_150 == 5)) { f32 velocityY = this->actor.velocity.y; spD8 = this->unk_1A4 * 0.1f; @@ -5133,7 +5133,7 @@ void EnFishing_UpdateOwner(Actor* thisx, PlayState* play2) { if ((D_809171FC != 0) && (D_8090CD4C == 0) && (player->actor.world.pos.z > 1360.0f) && (fabsf(player->actor.world.pos.x) < 25.0f)) { player->actor.world.pos.z = 1360.0f; - player->actor.speedXZ = 0.0f; + player->actor.speed = 0.0f; if (D_8090CD50 == 0) { D_8090CD4C = 10; @@ -5306,7 +5306,7 @@ void EnFishing_UpdateOwner(Actor* thisx, PlayState* play2) { // fallthrough case 11: player->actor.world.pos.z = 1360.0f; - player->actor.speedXZ = 0.0f; + player->actor.speed = 0.0f; if (Message_GetState(&play->msgCtx) == TEXT_STATE_NONE) { Camera* mainCam = Play_GetCamera(play, CAM_ID_MAIN); @@ -5455,7 +5455,7 @@ void EnFishing_UpdateOwner(Actor* thisx, PlayState* play2) { } if ((player->actor.floorHeight < (WATER_SURFACE_Y(play) - 3.0f)) && - (player->actor.world.pos.y < (player->actor.floorHeight + 3.0f)) && (player->actor.speedXZ > 1.0f) && + (player->actor.world.pos.y < (player->actor.floorHeight + 3.0f)) && (player->actor.speed > 1.0f) && ((play->gameplayFrames % 2) == 0)) { Vec3f pos; @@ -5466,7 +5466,7 @@ void EnFishing_UpdateOwner(Actor* thisx, PlayState* play2) { } if ((player->actor.floorHeight < WATER_SURFACE_Y(play)) && - (player->actor.floorHeight > (WATER_SURFACE_Y(play) - 10.0f)) && (player->actor.speedXZ >= 4.0f) && + (player->actor.floorHeight > (WATER_SURFACE_Y(play) - 10.0f)) && (player->actor.speed >= 4.0f) && ((play->gameplayFrames % 4) == 0)) { s16 i; diff --git a/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c b/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c index 04e9631388..eeb1a6bc31 100644 --- a/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c +++ b/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c @@ -259,7 +259,7 @@ void func_808D0A48(EnFloormas* this, PlayState* play) { void func_808D0B08(EnFloormas* this) { Animation_PlayOnce(&this->skelAnime, &gWallmasterIdleAnim); - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actionFunc = func_808D0B50; } @@ -301,7 +301,7 @@ void func_808D0CE4(EnFloormas* this) { } this->unk_18E = Rand_S16Offset(2, 4); - this->actor.speedXZ = 1.5f; + this->actor.speed = 1.5f; this->actionFunc = func_808D0D70; } @@ -334,7 +334,7 @@ void func_808D0D70(EnFloormas* this, PlayState* play) { void func_808D0ECC(EnFloormas* this) { Animation_PlayOnce(&this->skelAnime, &gWallmasterStopWalkAnim); - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actionFunc = func_808D0F14; } @@ -346,7 +346,7 @@ void func_808D0F14(EnFloormas* this, PlayState* play) { void func_808D0F50(EnFloormas* this) { this->unk_18E = 0; - this->actor.speedXZ = 5.0f; + this->actor.speed = 5.0f; this->skelAnime.playSpeed = 3.0f; this->actionFunc = func_808D0F80; } @@ -370,7 +370,7 @@ void func_808D0F80(EnFloormas* this, PlayState* play) { void func_808D108C(EnFloormas* this) { s16 sp36 = this->unk_190 - this->actor.shape.rot.y; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; if (sp36 > 0) { Animation_MorphToPlayOnce(&this->skelAnime, &gFloormasterTurnAnim, -3.0f); } else { @@ -419,7 +419,7 @@ void func_808D11BC(EnFloormas* this, PlayState* play) { void func_808D1380(EnFloormas* this, PlayState* play) { Animation_Change(&this->skelAnime, &gWallmasterHoverAnim, 3.0f, 0.0f, Animation_GetLastFrame(&gWallmasterHoverAnim), ANIMMODE_ONCE, -3.0f); - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.gravity = 0.0f; func_808D08D0(this); Actor_SpawnFloorDustRing(play, &this->actor, &this->actor.world.pos, 15.0f, 6, 20.0f, 300, 100, 1); @@ -460,7 +460,7 @@ void func_808D14DC(EnFloormas* this, PlayState* play) { void func_808D161C(EnFloormas* this) { this->unk_18E = 25; this->actor.gravity = -0.15f; - this->actor.speedXZ = 0.5f; + this->actor.speed = 0.5f; this->actionFunc = func_808D1650; } @@ -471,7 +471,7 @@ void func_808D1650(EnFloormas* this, PlayState* play) { this->unk_18E--; } - Math_StepToF(&this->actor.speedXZ, 15.0f, SQ(this->actor.speedXZ) * (1.0f / 3.0f)); + Math_StepToF(&this->actor.speed, 15.0f, SQ(this->actor.speed) * (1.0f / 3.0f)); Math_ScaledStepToS(&this->actor.shape.rot.x, -0x1680, 0x140); temp_f0_2 = this->actor.world.pos.y - this->actor.floorHeight; @@ -492,7 +492,7 @@ void func_808D1650(EnFloormas* this, PlayState* play) { void func_808D1740(EnFloormas* this) { Animation_Change(&this->skelAnime, &gWallmasterJumpAnim, 1.0f, 41.0f, 42.0f, ANIMMODE_ONCE, 5.0f); - if ((this->actor.speedXZ < 0.0f) || (this->actionFunc != func_808D1650)) { + if ((this->actor.speed < 0.0f) || (this->actionFunc != func_808D1650)) { this->unk_18E = 30; } else { this->unk_18E = 45; @@ -519,14 +519,14 @@ void func_808D17EC(EnFloormas* this, PlayState* play) { } if (this->actor.bgCheckFlags & 8) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } if (sp24 != 0) { - Math_StepToF(&this->actor.speedXZ, 0.0f, 2.0f); + Math_StepToF(&this->actor.speed, 0.0f, 2.0f); } - if ((this->actor.speedXZ > 0.0f) && ((this->actor.world.pos.y - this->actor.floorHeight) < 12.0f)) { + if ((this->actor.speed > 0.0f) && ((this->actor.world.pos.y - this->actor.floorHeight) < 12.0f)) { func_808D14DC(this, play); } @@ -575,7 +575,7 @@ void func_808D19D4(EnFloormas* this) { this->actor.flags &= ~ACTOR_FLAG_400; this->actor.flags |= ACTOR_FLAG_200; this->actor.colChkInfo.health = 1; - this->actor.speedXZ = 4.0f; + this->actor.speed = 4.0f; this->actor.velocity.y = 7.0f; this->actionFunc = func_808D1B44; } @@ -587,7 +587,7 @@ void func_808D1B44(EnFloormas* this, PlayState* play) { this->unk_194 = 50; func_808D0C14(this); } - Math_StepToF(&this->actor.speedXZ, 0.0f, 1.0f); + Math_StepToF(&this->actor.speed, 0.0f, 1.0f); } if (this->actor.bgCheckFlags & 2) { Actor_PlaySfx(&this->actor, NA_SE_EN_FLOORMASTER_SM_LAND); @@ -596,7 +596,7 @@ void func_808D1B44(EnFloormas* this, PlayState* play) { void func_808D1BCC(EnFloormas* this) { Animation_PlayLoopSetSpeed(&this->skelAnime, &gWallmasterWalkAnim, 4.5f); - this->actor.speedXZ = 5.0f; + this->actor.speed = 5.0f; this->actionFunc = func_808D1C1C; } @@ -624,7 +624,7 @@ void func_808D1D0C(EnFloormas* this) { if (this->actionFunc != func_808D1C1C) { Animation_PlayLoopSetSpeed(&this->skelAnime, &gWallmasterWalkAnim, 4.5f); } - this->actor.speedXZ = 5.0f; + this->actor.speed = 5.0f; this->actionFunc = func_808D1D6C; } @@ -667,7 +667,7 @@ void func_808D1D6C(EnFloormas* this, PlayState* play) { void func_808D1ED4(EnFloormas* this, PlayState* play) { Vec3f sp34; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.velocity.y = 0.0f; sp34.x = this->actor.world.pos.x; sp34.y = this->actor.world.pos.y + 15.0f; @@ -686,7 +686,7 @@ void func_808D1F7C(EnFloormas* this, PlayState* play) { void func_808D1FD4(EnFloormas* this) { Animation_Change(&this->skelAnime, &gWallmasterJumpAnim, 2.0f, 0.0f, 41.0f, ANIMMODE_ONCE, 0.0f); - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actionFunc = func_808D2040; } @@ -697,11 +697,11 @@ void func_808D2040(EnFloormas* this, PlayState* play) { if (this->skelAnime.curFrame < 20.0f) { Math_ApproachS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 2, 0xE38); } else if (Animation_OnFrame(&this->skelAnime, 20.0f)) { - this->actor.speedXZ = 5.0f; + this->actor.speed = 5.0f; this->actor.velocity.y = 7.0f; } else if (this->actor.bgCheckFlags & 2) { this->unk_18E = 50; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; Actor_PlaySfx(&this->actor, NA_SE_EN_FLOORMASTER_SM_LAND); func_808D1740(this); } else if ((this->actor.playerHeightRel < -10.0f) && (this->collider.base.ocFlags1 & OC1_HIT) && @@ -716,7 +716,7 @@ void func_808D217C(EnFloormas* this, Player* player) { Animation_Change(&this->skelAnime, &gWallmasterJumpAnim, 1.0f, 36.0f, 45.0f, ANIMMODE_ONCE, -3.0f); this->actor.flags &= ~ACTOR_FLAG_1; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.velocity.y = 0.0f; func_808D08D0(this); ptr = &D_808D3900[GET_PLAYER_FORM]; @@ -759,7 +759,7 @@ void func_808D22C8(EnFloormas* this, PlayState* play) { this->actor.shape.rot.x = 0; this->actor.velocity.y = 6.0f; this->actor.flags |= ACTOR_FLAG_1; - this->actor.speedXZ = -3.0f; + this->actor.speed = -3.0f; func_808D1740(this); } else if ((this->unk_190 % 20) == 0) { Player_PlaySfx(player, NA_SE_VO_LI_DAMAGE_S + player->ageProperties->voiceSfxIdOffset); @@ -770,7 +770,7 @@ void func_808D22C8(EnFloormas* this, PlayState* play) { void func_808D2484(EnFloormas* this) { Animation_Change(&this->skelAnime, &gWallmasterJumpAnim, 2.0f, 0.0f, 41.0f, ANIMMODE_ONCE, 0.0f); - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actionFunc = func_808D24F0; } @@ -791,7 +791,7 @@ void func_808D24F0(EnFloormas* this, PlayState* play) { } if (Animation_OnFrame(&this->skelAnime, 20.0f)) { - this->actor.speedXZ = 5.0f; + this->actor.speed = 5.0f; this->actor.velocity.y = 7.0f; } else if (this->skelAnime.curFrame < 20.0f) { Math_ApproachS(&this->actor.shape.rot.y, Actor_WorldYawTowardActor(&this->actor, phi_s1), 2, 0xE38); @@ -801,14 +801,14 @@ void func_808D24F0(EnFloormas* this, PlayState* play) { func_808D2A20(this); this->collider.base.ocFlags1 |= OC1_ON; } else if (this->actor.bgCheckFlags & 2) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; Actor_PlaySfx(&this->actor, NA_SE_EN_FLOORMASTER_SM_LAND); func_808D1740(this); } if ((fabsf(this->actor.world.pos.x - phi_s1->world.pos.x) < 5.0f) && (fabsf(this->actor.world.pos.z - phi_s1->world.pos.z) < 5.0f)) { - Math_StepToF(&this->actor.speedXZ, 0.0f, 2.0f); + Math_StepToF(&this->actor.speed, 0.0f, 2.0f); } } @@ -817,7 +817,7 @@ void func_808D2700(EnFloormas* this) { this->unk_18E = 0; this->unk_194 = 1500; this->actor.params = ENFLOORMAS_GET_7FFF_40; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; func_808D08D0(this); this->actionFunc = func_808D2764; } @@ -924,7 +924,7 @@ void func_808D2B18(EnFloormas* this) { Animation_MorphToPlayOnce(&this->skelAnime, &gWallmasterDamageAnim, -3.0f); func_800BE504(&this->actor, &this->collider); Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 20); - this->actor.speedXZ = 5.0f; + this->actor.speed = 5.0f; this->actor.velocity.y = 5.5f; if (this->actor.params == ENFLOORMAS_GET_7FFF_40) { EnFloormas* parent = (EnFloormas*)this->actor.parent; @@ -960,12 +960,12 @@ void func_808D2C08(EnFloormas* this, PlayState* play) { } } - Math_StepToF(&this->actor.speedXZ, 0.0f, 0.2f); + Math_StepToF(&this->actor.speed, 0.0f, 0.2f); } void func_808D2CDC(EnFloormas* this) { Animation_PlayOnce(&this->skelAnime, &gWallmasterRecoverFromDamageAnim); - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.velocity.y = 0.0f; this->actor.world.rot.y = this->actor.shape.rot.y; this->actionFunc = func_808D2D30; @@ -978,7 +978,7 @@ void func_808D2D30(EnFloormas* this, PlayState* play) { } void func_808D2D6C(EnFloormas* this) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; if (this->actor.velocity.y > 0.0f) { this->actor.velocity.y = 0.0f; } @@ -1085,8 +1085,8 @@ void EnFloormas_Update(Actor* thisx, PlayState* play) { if (this->actionFunc != func_808D2AA8) { if (this->collider.base.atFlags & AT_HIT) { this->collider.base.atFlags &= ~AT_HIT; - this->actor.speedXZ *= -0.5f; - this->actor.speedXZ = CLAMP_MAX(this->actor.speedXZ, -5.0f); + this->actor.speed *= -0.5f; + this->actor.speed = CLAMP_MAX(this->actor.speed, -5.0f); this->actor.velocity.y = 5.0f; func_808D1740(this); } diff --git a/src/overlays/actors/ovl_En_Fu_Mato/z_en_fu_mato.c b/src/overlays/actors/ovl_En_Fu_Mato/z_en_fu_mato.c index 0fa4927a97..712a20428d 100644 --- a/src/overlays/actors/ovl_En_Fu_Mato/z_en_fu_mato.c +++ b/src/overlays/actors/ovl_En_Fu_Mato/z_en_fu_mato.c @@ -156,7 +156,7 @@ void func_80ACE51C(EnFuMato* this, PlayState* play) { } } - this->dyna.actor.speedXZ = 2.0f; + this->dyna.actor.speed = 2.0f; this->dyna.actor.shape.rot.y = Math_Vec3f_Yaw(&this->dyna.actor.world.pos, &this->dyna.actor.parent->world.pos); Actor_MoveWithGravity(&this->dyna.actor); diff --git a/src/overlays/actors/ovl_En_Fz/z_en_fz.c b/src/overlays/actors/ovl_En_Fz/z_en_fz.c index 171c6a397c..9158009935 100644 --- a/src/overlays/actors/ovl_En_Fz/z_en_fz.c +++ b/src/overlays/actors/ovl_En_Fz/z_en_fz.c @@ -188,7 +188,7 @@ void EnFz_Init(Actor* thisx, PlayState* play) { this->unk_BCE = 0; this->unk_BD7 = 1; this->unk_BD8 = 0; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.uncullZoneScale = 400.0f; this->unk_BAC = this->actor.world.pos.y; this->unk_BB4 = this->actor.world.pos.y; @@ -364,7 +364,7 @@ void func_80932C98(EnFz* this, PlayState* play) { this->actor.bgCheckFlags &= ~0x8; this->unk_BCD = 0; this->unk_BBC = 0.0f; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } } @@ -405,7 +405,7 @@ void func_80932C98(EnFz* this, PlayState* play) { this->unk_BCD = 0; this->unk_BBC = 0.0f; this->collider1.base.acFlags &= ~AC_HIT; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->unk_BCA = 10; func_809330D4(this); } else if (this->collider2.base.acFlags & AC_BOUNCED) { @@ -572,7 +572,7 @@ void func_809333D8(EnFz* this, PlayState* play) { void func_80933414(EnFz* this) { this->unk_BD6 = 1; this->unk_BBC = 0.0f; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->unk_BCA = 40; this->actionFunc = func_80933444; } @@ -649,7 +649,7 @@ void func_809336C0(EnFz* this, PlayState* play) { this->unk_BBC = 0.0f; this->actor.gravity = 0.0f; this->actor.velocity.y = 0.0f; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->unk_BCC = 1; this->unk_BCE = 0; this->unk_BD8 = 1; @@ -672,7 +672,7 @@ void func_80933790(EnFz* this) { this->unk_BCE = 0; this->unk_BD8 = 1; this->actor.flags &= ~ACTOR_FLAG_1; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->unk_BBC = 0.0f; this->actionFunc = func_809337D4; } @@ -821,7 +821,7 @@ void EnFz_Update(Actor* thisx, PlayState* play) { } } - Math_StepToF(&this->actor.speedXZ, this->unk_BBC, 0.2f); + Math_StepToF(&this->actor.speed, this->unk_BBC, 0.2f); Actor_MoveWithGravity(&this->actor); if (this->unk_BCC != 0) { Actor_UpdateBgCheckInfo(play, &this->actor, 20.0f, 20.0f, 20.0f, 5); diff --git a/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c b/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c index b9c81ebad5..d94267b382 100644 --- a/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c +++ b/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c @@ -202,7 +202,7 @@ void EnGe1_SetupPath(EnGe1* this, PlayState* play) { this->picto.actor.world.rot.y = Math_Vec3f_Yaw(&this->picto.actor.world.pos, &nextPoint); this->picto.actor.world.rot.x = Math_Vec3f_Pitch(&this->picto.actor.world.pos, &nextPoint); - this->picto.actor.speedXZ = 15.0f; + this->picto.actor.speed = 15.0f; } } else { this->path = NULL; diff --git a/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c b/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c index bcbed04115..403a160660 100644 --- a/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c +++ b/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c @@ -104,7 +104,7 @@ void EnGe2_Init(Actor* thisx, PlayState* play) { this->picto.actor.terminalVelocity = -9.0f; this->picto.actor.gravity = -1.0f; - this->picto.actor.speedXZ = 1.5f; + this->picto.actor.speed = 1.5f; this->actionFunc = EnGe2_Walk; this->picto.validationFunc = EnGe2_ValidatePictograph; @@ -121,7 +121,7 @@ void EnGe2_Init(Actor* thisx, PlayState* play) { Animation_Change(&this->skelAnime, &gGerudoPurpleLookingAboutAnim, 1.0f, 0.0f, Animation_GetLastFrame(&gGerudoPurpleLookingAboutAnim), 0, 0.0f); this->actionFunc = EnGe2_GuardStationary; - this->picto.actor.speedXZ = 0.0f; + this->picto.actor.speed = 0.0f; this->picto.actor.uncullZoneForward = 4000.0f; break; @@ -263,7 +263,7 @@ void EnGe2_SetupBlownAwayPath(EnGe2* this, PlayState* play) { this->picto.actor.world.rot.y = Math_Vec3f_Yaw(&this->picto.actor.world.pos, &nextPoint); this->picto.actor.world.rot.x = Math_Vec3f_Pitch(&this->picto.actor.world.pos, &nextPoint); - this->picto.actor.speedXZ = 15.0f; + this->picto.actor.speed = 15.0f; } } else { this->path = NULL; @@ -328,7 +328,7 @@ s32 EnGe2_FollowPathWithoutGravity(EnGe2* this) { pitchTarget = Math_Vec3f_Pitch(&this->picto.actor.world.pos, &point); Math_SmoothStepToS(&this->picto.actor.world.rot.y, yawTarget, 0xA, 0x3E8, 0x64); Math_SmoothStepToS(&this->picto.actor.world.rot.x, pitchTarget, 6, 0x7D0, 0xC8); - this->picto.actor.speedXZ = 15.0f; + this->picto.actor.speed = 15.0f; Actor_MoveWithoutGravityReverse(&this->picto.actor); @@ -392,7 +392,7 @@ void EnGe2_CapturePlayer(EnGe2* this, PlayState* play) { } void EnGe2_SetupCapturePlayer(EnGe2* this) { - this->picto.actor.speedXZ = 0.0f; + this->picto.actor.speed = 0.0f; this->actionFunc = EnGe2_CapturePlayer; Animation_Change(&this->skelAnime, &gGerudoPurpleLookingAboutAnim, 1.0f, 0.0f, Animation_GetLastFrame(&gGerudoPurpleLookingAboutAnim), 0, -8.0f); @@ -430,7 +430,7 @@ void EnGe2_SetupCharge(EnGe2* this, PlayState* play) { Animation_Change(&this->skelAnime, &gGerudoPurpleChargingAnim, 1.0f, 0.0f, Animation_GetLastFrame(&gGerudoPurpleChargingAnim), 0, -8.0f); this->timer = 50; - this->picto.actor.speedXZ = 4.0f; + this->picto.actor.speed = 4.0f; this->actionFunc = EnGe2_Charge; } } @@ -439,7 +439,7 @@ void EnGe2_SetupLookAround(EnGe2* this) { Animation_Change(&this->skelAnime, &gGerudoPurpleLookingAboutAnim, 1.0f, 0.0f, Animation_GetLastFrame(&gGerudoPurpleLookingAboutAnim), 0, -8.0f); this->timer = 60; - this->picto.actor.speedXZ = 0.0f; + this->picto.actor.speed = 0.0f; this->actionFunc = EnGe2_LookAround; } @@ -479,20 +479,20 @@ void EnGe2_PatrolDuties(EnGe2* this, PlayState* play) { f32 visionRange = gSaveContext.save.isNight ? 200.0f : 280.0f; if (player->csMode == 0x1A) { - this->picto.actor.speedXZ = 0.0f; + this->picto.actor.speed = 0.0f; this->actionFunc = EnGe2_SetupCharge; Animation_Change(&this->skelAnime, &gGerudoPurpleLookingAboutAnim, 1.0f, 0.0f, Animation_GetLastFrame(&gGerudoPurpleLookingAboutAnim), 0, -8.0f); this->stateFlags |= GERUDO_PURPLE_STATE_CAPTURING; } else if (CHECK_WEEKEVENTREG(WEEKEVENTREG_80_08)) { - this->picto.actor.speedXZ = 0.0f; + this->picto.actor.speed = 0.0f; this->actionFunc = EnGe2_TurnToPlayerFast; Animation_Change(&this->skelAnime, &gGerudoPurpleLookingAboutAnim, 1.0f, 0.0f, Animation_GetLastFrame(&gGerudoPurpleLookingAboutAnim), 0, -8.0f); } else if (EnGe2_LookForPlayer(play, &this->picto.actor, &this->picto.actor.focus.pos, this->picto.actor.shape.rot.y, 0x1800, visionRange, this->verticalDetectRange)) { if ((GERUDO_PURPLE_GET_EXIT(&this->picto.actor) != GERUDO_PURPLE_EXIT_NONE) && !Play_InCsMode(play)) { - this->picto.actor.speedXZ = 0.0f; + this->picto.actor.speed = 0.0f; func_800B7298(play, &this->picto.actor, 0x1A); func_801000A4(NA_SE_SY_FOUND); Message_StartTextbox(play, 0x1194, &this->picto.actor); @@ -504,14 +504,14 @@ void EnGe2_PatrolDuties(EnGe2* this, PlayState* play) { if ((this->collider.info.acHitInfo != NULL) && (this->collider.info.acHitInfo->toucher.dmgFlags & DMG_DEKU_NUT)) { Actor_SetColorFilter(&this->picto.actor, 0, 120, 0, 400); - this->picto.actor.speedXZ = 0.0f; + this->picto.actor.speed = 0.0f; this->actionFunc = EnGe2_Stunned; this->stateFlags |= GERUDO_PURPLE_STATE_STUNNED; } else { Animation_Change(&this->skelAnime, &gGerudoPurpleFallingToGroundAnim, 1.0f, 0.0f, Animation_GetLastFrame(&gGerudoPurpleFallingToGroundAnim), 2, -8.0f); this->timer = 200; - this->picto.actor.speedXZ = 0.0f; + this->picto.actor.speed = 0.0f; this->actionFunc = EnGe2_KnockedOut; Actor_PlaySfx(&this->picto.actor, NA_SE_EN_PIRATE_DEAD); this->picto.actor.flags &= ~ACTOR_FLAG_1; @@ -566,7 +566,7 @@ void EnGe2_LookAround(EnGe2* this, PlayState* play) { void EnGe2_Walk(EnGe2* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); - this->picto.actor.speedXZ = 1.5f; + this->picto.actor.speed = 1.5f; switch (EnGe2_FollowPath(this)) { case GERUDO_PURPLE_PATHSTATUS_END: @@ -634,7 +634,7 @@ void EnGe2_PerformCutsceneActions(EnGe2* this, PlayState* play) { switch (this->csAction) { case ENGE2_CSACTION_BEEHIVE_RUN_AWAY: EnGe2_FollowPath(this); - this->picto.actor.speedXZ = 5.0f; + this->picto.actor.speed = 5.0f; if (Animation_OnFrame(&this->skelAnime, 2.0f) || Animation_OnFrame(&this->skelAnime, 6.0f)) { Actor_PlaySfx(&this->picto.actor, NA_SE_EV_PIRATE_WALK); @@ -708,7 +708,7 @@ void EnGe2_Update(Actor* thisx, PlayState* play) { this->stateFlags &= ~GERUDO_PURPLE_STATE_KO; this->stateFlags &= ~GERUDO_PURPLE_STATE_PATH_REVERSE; this->picto.actor.flags |= ACTOR_FLAG_20; - this->picto.actor.speedXZ = 0.0f; + this->picto.actor.speed = 0.0f; } this->actionFunc(this, play); diff --git a/src/overlays/actors/ovl_En_Geg/z_en_geg.c b/src/overlays/actors/ovl_En_Geg/z_en_geg.c index 2d0b819152..ba84c4f56e 100644 --- a/src/overlays/actors/ovl_En_Geg/z_en_geg.c +++ b/src/overlays/actors/ovl_En_Geg/z_en_geg.c @@ -228,7 +228,7 @@ s32 func_80BB18FC(EnGeg* this, Actor* actor) { if ((sp24 < 150.0f) && (fabsf(sp20) < 5.0f)) { this->unk_230 |= 0x20; - actor->speedXZ = 0.0f; + actor->speed = 0.0f; actor->velocity.y = 0.0f; this->actor.child = actor; actor->parent = &this->actor; @@ -741,13 +741,13 @@ void func_80BB2F7C(EnGeg* this, PlayState* play) { if ((this->actor.xzDistToPlayer < 150.0f) && (fabsf(this->actor.playerHeightRel) < 10.0f) && (this->actor.bgCheckFlags & 1)) { this->unk_4AC = 2; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->unk_230 &= ~1; this->actor.shape.yOffset = 0.0f; func_80BB2020(this, play); this->actionFunc = func_80BB2E00; } else { - this->actor.speedXZ = 5.0f; + this->actor.speed = 5.0f; Actor_MoveWithGravity(&this->actor); } @@ -841,7 +841,7 @@ void func_80BB3318(EnGeg* this, PlayState* play) { func_800AEF44(Effect_GetByIndex(this->unk_4DC)); Actor_Kill(&this->actor); } else { - Math_ApproachF(&this->actor.speedXZ, 10.0f, 0.2f, 1.0f); + Math_ApproachF(&this->actor.speed, 10.0f, 0.2f, 1.0f); Actor_MoveWithGravity(&this->actor); } @@ -1058,7 +1058,7 @@ void func_80BB3BE0(EnGeg* this, PlayState* play) { } void func_80BB3CB4(EnGeg* this, PlayState* play) { - f32 sp24 = play->state.frames * this->actor.speedXZ * 1400.0f; + f32 sp24 = play->state.frames * this->actor.speed * 1400.0f; OPEN_DISPS(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_En_Gg2/z_en_gg2.c b/src/overlays/actors/ovl_En_Gg2/z_en_gg2.c index b2f35c49e9..fe3e2fb463 100644 --- a/src/overlays/actors/ovl_En_Gg2/z_en_gg2.c +++ b/src/overlays/actors/ovl_En_Gg2/z_en_gg2.c @@ -192,17 +192,17 @@ void func_80B3B120(EnGg2* this, PlayState* play) { if (func_80B3B648(this, this->unk_1D8, this->unk_1DC) != 0) { if (this->unk_1DC >= (this->unk_1D8->count - 2)) { this->actionFunc = func_80B3AE60; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } else { this->unk_1DC++; } } - Math_ApproachF(&this->actor.speedXZ, 5.0f, 0.2f, 1.0f); + Math_ApproachF(&this->actor.speed, 5.0f, 0.2f, 1.0f); } } void func_80B3B21C(EnGg2* this, PlayState* play) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; if ((this->actor.xzDistToPlayer < 100.0f) && CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_REACT_TO_LENS)) { this->unk_2E4 = ActorCutscene_GetAdditionalCutscene(this->unk_2E4); this->actionFunc = func_80B3B5D4; @@ -256,7 +256,7 @@ void func_80B3B294(EnGg2* this, PlayState* play) { } } } - Math_ApproachF(&this->actor.speedXZ, 5.0f, 0.2f, 1.0f); + Math_ApproachF(&this->actor.speed, 5.0f, 0.2f, 1.0f); } void func_80B3B4B0(EnGg2* this, PlayState* play) { diff --git a/src/overlays/actors/ovl_En_Gk/z_en_gk.c b/src/overlays/actors/ovl_En_Gk/z_en_gk.c index 7312cbbc86..f0c8508853 100644 --- a/src/overlays/actors/ovl_En_Gk/z_en_gk.c +++ b/src/overlays/actors/ovl_En_Gk/z_en_gk.c @@ -821,7 +821,7 @@ void func_80B51EA4(EnGk* this, PlayState* play) { } if (ABS_ALT(sp36) < 0x2AAA) { - Math_ApproachF(&this->actor.speedXZ, 3.0f, 0.2f, 0.5f); + Math_ApproachF(&this->actor.speed, 3.0f, 0.2f, 0.5f); } Actor_MoveWithGravity(&this->actor); } diff --git a/src/overlays/actors/ovl_En_Go/z_en_go.c b/src/overlays/actors/ovl_En_Go/z_en_go.c index f5f36e5240..8e62b499b9 100644 --- a/src/overlays/actors/ovl_En_Go/z_en_go.c +++ b/src/overlays/actors/ovl_En_Go/z_en_go.c @@ -1770,7 +1770,7 @@ void func_80A153FC(EnGo* this, PlayState* play) { func_80A118F8(this->unk_3F8, this->actor.world.pos); this->actor.shape.rot.x = 0; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; Actor_PlaySfx(&this->actor, NA_SE_EN_GOLON_COLD); @@ -1809,8 +1809,8 @@ void func_80A153FC(EnGo* this, PlayState* play) { func_800AEF44(Effect_GetByIndex(this->unk_3E8)); } - this->actor.speedXZ = 4.0f; - this->actor.shape.rot.x += (s16)(this->actor.speedXZ * 546.0f); + this->actor.speed = 4.0f; + this->actor.shape.rot.x += (s16)(this->actor.speed * 546.0f); Actor_MoveWithGravity(&this->actor); } } diff --git a/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c b/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c index a081c68edc..9ba8582786 100644 --- a/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c +++ b/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c @@ -358,7 +358,7 @@ s32 func_8093F34C(EnGoroiwa* this) { f32 x; f32 z; - Math_StepToF(&this->actor.speedXZ, D_80942DFC[this->unk_1E4], 0.3f); + Math_StepToF(&this->actor.speed, D_80942DFC[this->unk_1E4], 0.3f); Actor_UpdateVelocityWithGravity(&this->actor); temp_v0 = &this->unk_1D0[this->unk_1D8]; this->actor.velocity.y *= 0.97f; @@ -368,7 +368,7 @@ s32 func_8093F34C(EnGoroiwa* this) { tempX = x - this->actor.world.pos.x; tempZ = z - this->actor.world.pos.z; - if (SQ(this->actor.speedXZ + 1.0f) < (SQ(tempX) + SQ(tempZ))) { + if (SQ(this->actor.speed + 1.0f) < (SQ(tempX) + SQ(tempZ))) { this->actor.world.pos.x += this->actor.velocity.x; this->actor.world.pos.y += this->actor.velocity.y; this->actor.world.pos.z += this->actor.velocity.z; @@ -393,12 +393,12 @@ s32 func_8093F498(EnGoroiwa* this) { sp2C.y = temp_v0->y; sp2C.z = temp_v0->z; - Math_StepToF(&this->actor.speedXZ, D_80942DFC[this->unk_1E4], 0.3f); + Math_StepToF(&this->actor.speed, D_80942DFC[this->unk_1E4], 0.3f); Math_Vec3f_Diff(&sp2C, &this->actor.world.pos, &this->actor.velocity); temp_f0 = Math3D_Vec3fMagnitude(&this->actor.velocity); - if ((this->actor.speedXZ + 1.0f) < temp_f0) { - Math_Vec3f_Scale(&this->actor.velocity, this->actor.speedXZ / temp_f0); + if ((this->actor.speed + 1.0f) < temp_f0) { + Math_Vec3f_Scale(&this->actor.velocity, this->actor.speed / temp_f0); this->actor.world.pos.x += this->actor.velocity.x; this->actor.world.pos.y += this->actor.velocity.y; this->actor.world.pos.z += this->actor.velocity.z; @@ -894,7 +894,7 @@ void func_80940E38(EnGoroiwa* this, PlayState* play) { if (this->actor.flags & ACTOR_FLAG_40) { if (this->actor.xzDistToPlayer < 1000.0f) { - sp5C = (1000.0f - this->actor.xzDistToPlayer) * 0.0012f * (this->actor.speedXZ * 0.1f); + sp5C = (1000.0f - this->actor.xzDistToPlayer) * 0.0012f * (this->actor.speed * 0.1f); if (Rand_ZeroOne() < sp5C) { this->unk_1CE += 20000; sp46 = (s32)Rand_ZeroFloat(20000.0f) + this->unk_1CE; @@ -1049,7 +1049,7 @@ s32 func_8094156C(EnGoroiwa* this, PlayState* play) { temp2 = Math_SinS(ptr->unk_1E); temp3 = Math_SinS(this->actor.world.rot.y); - ptr->unk_0C = ((1.0f / D_80942DFC[this->unk_1E4]) * (temp3 * 14.0f * this->actor.speedXZ)) + + ptr->unk_0C = ((1.0f / D_80942DFC[this->unk_1E4]) * (temp3 * 14.0f * this->actor.speed)) + (temp2 * (temp + 5.0f)); ptr->unk_10 = (Rand_ZeroOne() * 11.0f) + 20.0f; @@ -1057,7 +1057,7 @@ s32 func_8094156C(EnGoroiwa* this, PlayState* play) { temp = Rand_ZeroOne(); temp2 = Math_CosS(ptr->unk_1E); temp3 = Math_CosS(this->actor.world.rot.y); - ptr->unk_14 = ((1.0f / D_80942DFC[this->unk_1E4]) * ((temp3 * 14.0f) * this->actor.speedXZ)) + + ptr->unk_14 = ((1.0f / D_80942DFC[this->unk_1E4]) * ((temp3 * 14.0f) * this->actor.speed)) + (temp2 * (temp + 5.0f)); ptr->unk_1C = 0; @@ -1218,7 +1218,7 @@ void func_80941DB4(EnGoroiwa* this) { func_8093EAB0(this, 6); this->actor.gravity = -0.86f; this->actor.terminalVelocity = -15.0f; - this->actor.speedXZ *= 0.15f; + this->actor.speed *= 0.15f; this->actor.velocity.y = 5.0f; this->unk_1C4 = 1.0f; } @@ -1237,7 +1237,7 @@ void func_80941EB4(EnGoroiwa* this) { static s16 D_80942EAC[] = { 20, 6, 20 }; this->actionFunc = func_80941F10; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; func_8093EAB0(this, 6); this->unk_1C8 = D_80942EAC[this->actor.home.rot.z & 3]; this->unk_1C4 = 0.0f; @@ -1257,7 +1257,7 @@ void func_80941F54(EnGoroiwa* this) { this->actionFunc = func_80941FA4; func_8093EAB0(this, 7); this->unk_1C4 = 0.0f; - this->actor.velocity.y = fabsf(this->actor.speedXZ) * 0.1f; + this->actor.velocity.y = fabsf(this->actor.speed) * 0.1f; } void func_80941FA4(EnGoroiwa* this, PlayState* play) { @@ -1273,7 +1273,7 @@ void func_80941FA4(EnGoroiwa* this, PlayState* play) { } else if (func_8093F5EC(this)) { func_8093FC00(this); func_809419D0(this); - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } } } @@ -1283,7 +1283,7 @@ void func_80942084(EnGoroiwa* this) { func_8093EAB0(this, 7); this->unk_1C4 = 0.3f; this->unk_1CA = 0; - this->actor.velocity.y = fabsf(this->actor.speedXZ) * -0.3f; + this->actor.velocity.y = fabsf(this->actor.speed) * -0.3f; this->unk_1E5 |= 0x10; this->unk_1E5 &= ~0x20; } @@ -1302,7 +1302,7 @@ void func_809420F0(EnGoroiwa* this, PlayState* play) { func_8093FC00(this); func_809419D0(this); this->unk_1E5 &= ~0x10; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } } } @@ -1441,7 +1441,7 @@ void EnGoroiwa_Update(Actor* thisx, PlayState* play) { } if ((ENGOROIWA_GET_3000(&this->actor) == ENGOROIWA_3000_2) && (this->actor.bgCheckFlags & 1) && - (this->actionFunc == func_80941A10) && (this->actor.speedXZ > 2.0f)) { + (this->actionFunc == func_80941A10) && (this->actor.speed > 2.0f)) { Math_StepToF(&this->actor.scale.x, 0.16f, (this->actor.xzDistToPlayer < 400.0f) ? this->unk_1E0 * 1.4f : this->unk_1E0); diff --git a/src/overlays/actors/ovl_En_Grasshopper/z_en_grasshopper.c b/src/overlays/actors/ovl_En_Grasshopper/z_en_grasshopper.c index 6600aa2bbb..9a506c0ba5 100644 --- a/src/overlays/actors/ovl_En_Grasshopper/z_en_grasshopper.c +++ b/src/overlays/actors/ovl_En_Grasshopper/z_en_grasshopper.c @@ -397,11 +397,11 @@ void EnGrasshopper_Fly(EnGrasshopper* this, PlayState* play) { Math_SmoothStepToS(&this->actor.world.rot.z, this->targetRot.z, 5, 0x3E8, 5); this->targetRot.z *= 0.8f; if (this->waitTimer != 0) { - Math_ApproachZeroF(&this->actor.speedXZ, 0.2f, 0.5f); + Math_ApproachZeroF(&this->actor.speed, 0.2f, 0.5f); } else { this->targetRot.z = (this->actor.world.rot.y - this->targetRot.y) * 0.2f; targetSpeed = (this->index * 0.1f) + 4.0f; - Math_ApproachF(&this->actor.speedXZ, targetSpeed, 0.4f, 0.7f); + Math_ApproachF(&this->actor.speed, targetSpeed, 0.4f, 0.7f); Math_ApproachF(&this->rotationalVelocity, 2000.0f, 1.0f, 50.0f); Math_SmoothStepToS(&this->actor.world.rot.y, this->targetRot.y, 5, this->rotationalVelocity, 5); if (this->timer == 0) { @@ -464,7 +464,7 @@ void EnGrasshopper_RoamInCircles(EnGrasshopper* this, PlayState* play) { rotationSpeed = this->index + 70; targetSpeed = (this->index * 0.05f) + 4.0f; this->targetRot.y = Math_Atan2S(diffX, diffZ); - Math_ApproachF(&this->actor.speedXZ, targetSpeed, 0.4f, 0.8f); + Math_ApproachF(&this->actor.speed, targetSpeed, 0.4f, 0.8f); Math_SmoothStepToS(&this->actor.world.rot.y, this->targetRot.y, rotationSpeed, 0xFA0, 0xA); } } @@ -478,7 +478,7 @@ void EnGrasshopper_SetupBank(EnGrasshopper* this) { this->targetBankRot.y = this->actor.world.rot.y + 0x8000; this->action = EN_GRASSHOPPER_ACTION_BANK; this->bankState = EN_GRASSHOPPER_BANK_STATE_BANKING; - this->actor.speedXZ = 2.0f; + this->actor.speed = 2.0f; this->actionFunc = EnGrasshopper_Bank; } @@ -531,7 +531,7 @@ void EnGrasshopper_Bounced(EnGrasshopper* this, PlayState* play) { Actor_PlaySfx(&this->actor, NA_SE_EN_BATTA_FLY - SFX_FLAG); targetSpeed = (this->index * 0.05f) + 7.0f; - Math_ApproachF(&this->actor.speedXZ, targetSpeed, 0.4f, 0.8f); + Math_ApproachF(&this->actor.speed, targetSpeed, 0.4f, 0.8f); Math_SmoothStepToS(&this->actor.world.rot.z, this->targetRot.z, 5, 0x3E8, 5); this->targetRot.z *= 0.8f; Math_SmoothStepToS(&this->actor.world.rot.y, this->targetRot.y, 5, this->rotationalVelocity, 5); @@ -603,7 +603,7 @@ void EnGrasshopper_SetupAttack(EnGrasshopper* this) { EnGrasshopper_ChangeAnim(this, EN_GRASSHOPPER_ANIM_ATTACK); this->approachSpeed = 0.0f; Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 0xA, 0xFA0, 0xA); - this->actor.speedXZ = 3.0f; + this->actor.speed = 3.0f; this->baseFlyHeight = this->actor.world.pos.y; this->collider.elements[0].info.toucherFlags &= ~(TOUCH_ON | TOUCH_SFX_WOOD); this->collider.elements[1].info.toucherFlags |= (TOUCH_ON | TOUCH_SFX_WOOD); @@ -675,7 +675,7 @@ void EnGrasshopper_SetupWaitAfterAttack(EnGrasshopper* this) { Math_ApproachF(&this->actor.world.pos.y, this->targetPosY, 0.1f, 10.0f); this->action = EN_GRASSHOPPER_ACTION_WAIT_AFTER_ATTACK; this->waitTimer = 20; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->collider.elements[1].info.toucherFlags &= ~(TOUCH_ON | TOUCH_SFX_WOOD); this->actionFunc = EnGrasshopper_WaitAfterAttack; } @@ -697,7 +697,7 @@ void EnGrasshopper_SetupDamaged(EnGrasshopper* this, PlayState* play) { Vec3f damagedVelocity; EnGrasshopper_ChangeAnim(this, EN_GRASSHOPPER_ANIM_DAMAGE); - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.flags |= ACTOR_FLAG_1; this->approachSpeed = 0.0f; this->collider.elements[1].info.toucherFlags &= ~(TOUCH_ON | TOUCH_SFX_WOOD); @@ -727,7 +727,7 @@ void EnGrasshopper_Damaged(EnGrasshopper* this, PlayState* play) { void EnGrasshopper_SetupDead(EnGrasshopper* this, PlayState* play) { EnGrasshopper_ChangeAnim(this, EN_GRASSHOPPER_ANIM_DEAD); this->actor.flags |= ACTOR_FLAG_8000000; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->approachSpeed = 0.0f; this->actor.velocity.y = 5.0f; this->actor.gravity = -0.5f; @@ -768,7 +768,7 @@ void EnGrasshopper_Dead(EnGrasshopper* this, PlayState* play) { void EnGrasshopper_SetupFall(EnGrasshopper* this) { EnGrasshopper_ChangeAnim(this, EN_GRASSHOPPER_ANIM_FALL); this->action = EN_GRASSHOPPER_ACTION_FALL; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->approachSpeed = 0.0f; this->actionFunc = EnGrasshopper_Fall; } diff --git a/src/overlays/actors/ovl_En_Hakurock/z_en_hakurock.c b/src/overlays/actors/ovl_En_Hakurock/z_en_hakurock.c index 7703520523..a540da68a4 100644 --- a/src/overlays/actors/ovl_En_Hakurock/z_en_hakurock.c +++ b/src/overlays/actors/ovl_En_Hakurock/z_en_hakurock.c @@ -186,7 +186,7 @@ void func_80B22040(EnHakurock* this, PlayState* play) { void func_80B220A8(EnHakurock* this) { this->actor.params = EN_HAKUROCK_TYPE_BOULDER; this->actor.draw = func_80B228F4; - this->actor.speedXZ = Rand_ZeroFloat(3.5f) + 2.5f; + this->actor.speed = Rand_ZeroFloat(3.5f) + 2.5f; this->actor.velocity.y = Rand_ZeroFloat(4.5f) + 18.0f; Actor_SetScale(&this->actor, (Rand_ZeroFloat(5.0f) + 15.0f) * 0.001f); this->actor.world.rot.y = ((s32)Rand_Next() >> 0x12) + this->actor.parent->shape.rot.y + 0x8000; diff --git a/src/overlays/actors/ovl_En_Hg/z_en_hg.c b/src/overlays/actors/ovl_En_Hg/z_en_hg.c index a576cc8f4a..eb41fc0457 100644 --- a/src/overlays/actors/ovl_En_Hg/z_en_hg.c +++ b/src/overlays/actors/ovl_En_Hg/z_en_hg.c @@ -191,7 +191,7 @@ void EnHg_ChasePlayer(EnHg* this, PlayState* play) { Player* player = GET_PLAYER(play); s32 pad; - this->actor.speedXZ = 1.6f; + this->actor.speed = 1.6f; if (!(player->stateFlags2 & PLAYER_STATE2_8000000) && Message_GetState(&play->msgCtx) == TEXT_STATE_NONE) { if (((this->skelAnime.curFrame > 9.0f) && (this->skelAnime.curFrame < 16.0f)) || ((this->skelAnime.curFrame > 44.0f) && (this->skelAnime.curFrame < 51.0f))) { diff --git a/src/overlays/actors/ovl_En_Hidden_Nuts/z_en_hidden_nuts.c b/src/overlays/actors/ovl_En_Hidden_Nuts/z_en_hidden_nuts.c index 67637d532d..c0ba3a8fd6 100644 --- a/src/overlays/actors/ovl_En_Hidden_Nuts/z_en_hidden_nuts.c +++ b/src/overlays/actors/ovl_En_Hidden_Nuts/z_en_hidden_nuts.c @@ -316,7 +316,7 @@ void func_80BDBA28(EnHiddenNuts* this, PlayState* play) { Actor_Kill(&this->actor); } - this->actor.speedXZ = 2.0f; + this->actor.speed = 2.0f; this->actor.gravity = -2.0f; this->actor.velocity.y = 4.0f; this->actor.world.rot.y = Math_Vec3f_Yaw(&this->actor.world.pos, &this->unk_20C); @@ -360,7 +360,7 @@ void func_80BDBB48(EnHiddenNuts* this, PlayState* play) { if (this->unk_220 == 2) { if (this->unk_22C <= sp58) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.velocity.y = 0.0f; func_80BDB1B4(this, 6); } diff --git a/src/overlays/actors/ovl_En_Hint_Skb/z_en_hint_skb.c b/src/overlays/actors/ovl_En_Hint_Skb/z_en_hint_skb.c index 10e3138f42..d9df702ce0 100644 --- a/src/overlays/actors/ovl_En_Hint_Skb/z_en_hint_skb.c +++ b/src/overlays/actors/ovl_En_Hint_Skb/z_en_hint_skb.c @@ -182,7 +182,7 @@ void func_80C1FE20(EnHintSkb* this, PlayState* play) { void func_80C1FE30(EnHintSkb* this) { Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 0); - this->actor.speedXZ = 1.6f; + this->actor.speed = 1.6f; this->actionFunc = func_80C1FE80; } @@ -199,7 +199,7 @@ void func_80C1FE80(EnHintSkb* this, PlayState* play) { void func_80C1FF30(EnHintSkb* this) { this->collider.base.atFlags &= ~AT_BOUNCED; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 2); this->actionFunc = func_80C1FF88; } @@ -242,7 +242,7 @@ void func_80C200B8(EnHintSkb* this, PlayState* play) { void func_80C2011C(EnHintSkb* this) { if (this->actor.bgCheckFlags & 1) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } Actor_PlaySfx(&this->actor, NA_SE_EN_COMMON_FREEZE); this->actionFunc = func_80C2016C; @@ -250,10 +250,10 @@ void func_80C2011C(EnHintSkb* this) { void func_80C2016C(EnHintSkb* this, PlayState* play) { if (this->actor.bgCheckFlags & 2) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } else if (this->actor.bgCheckFlags & 1) { - if (this->actor.speedXZ < 0.0f) { - this->actor.speedXZ += 0.05f; + if (this->actor.speed < 0.0f) { + this->actor.speed += 0.05f; } } @@ -276,12 +276,12 @@ void func_80C20274(EnHintSkb* this) { this->actor.world.rot.y = this->actor.yawTowardsPlayer; Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 8); this->actor.gravity = -1.0f; - this->actor.speedXZ = 1.0f; + this->actor.speed = 1.0f; } else { this->actor.world.rot.y = this->actor.yawTowardsPlayer; Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 3); if (this->actor.bgCheckFlags & 1) { - this->actor.speedXZ = -4.0f; + this->actor.speed = -4.0f; } } Actor_PlaySfx(&this->actor, NA_SE_EN_STALKID_DAMAGE); @@ -295,14 +295,14 @@ void func_80C20334(EnHintSkb* this, PlayState* play) { for (i = 0; i < 10; i++) { func_80C215E4(play, this, &this->actor.world.pos); } - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } if (this->actor.bgCheckFlags & 1) { - if (this->actor.speedXZ < 0.0f) { - this->actor.speedXZ += 0.05f; - } else if (this->actor.speedXZ != 0.0f) { - this->actor.speedXZ -= 0.05f; + if (this->actor.speed < 0.0f) { + this->actor.speed += 0.05f; + } else if (this->actor.speed != 0.0f) { + this->actor.speed -= 0.05f; } Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 1, 2500, 0); } @@ -319,7 +319,7 @@ void func_80C20484(EnHintSkb* this) { Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 4); this->unk_3E8 |= 4; if (this->actor.bgCheckFlags & 1) { - this->actor.speedXZ = -6.0f; + this->actor.speed = -6.0f; } this->actionFunc = func_80C204F0; } @@ -335,7 +335,7 @@ void func_80C204F0(EnHintSkb* this, PlayState* play) { void func_80C20540(EnHintSkb* this) { if (this->actor.bgCheckFlags & 1) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } Actor_PlaySfx(&this->actor, NA_SE_EN_COMMON_FREEZE); this->actionFunc = func_80C20590; @@ -363,7 +363,7 @@ void func_80C20590(EnHintSkb* this, PlayState* play) { void func_80C2066C(EnHintSkb* this) { if (this->actor.bgCheckFlags & 1) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } this->actionFunc = func_80C2069C; } @@ -388,7 +388,7 @@ void func_80C2069C(EnHintSkb* this, PlayState* play) { void func_80C2075C(EnHintSkb* this) { this->unk_3E0 = 0; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actionFunc = func_80C2077C; } @@ -401,7 +401,7 @@ void func_80C2077C(EnHintSkb* this, PlayState* play) { this->unk_3E6 = 0x1147; if (this->skelAnime.animation == &object_skb_Anim_00697C) { play->msgCtx.msgMode = 0x44; - this->actor.speedXZ = 2.4f; + this->actor.speed = 2.4f; this->actor.gravity = -1.0f; this->actor.velocity.y = 3.0f; Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 8); @@ -455,7 +455,7 @@ void func_80C208D0(EnHintSkb* this, PlayState* play) { if (this->actor.bgCheckFlags & 2) { s32 i; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; for (i = 0; i < 10; i++) { func_80C215E4(play, this, &this->actor.world.pos); diff --git a/src/overlays/actors/ovl_En_Horse/z_en_horse.c b/src/overlays/actors/ovl_En_Horse/z_en_horse.c index 1c17e4058b..8e5d7a06f1 100644 --- a/src/overlays/actors/ovl_En_Horse/z_en_horse.c +++ b/src/overlays/actors/ovl_En_Horse/z_en_horse.c @@ -402,8 +402,8 @@ void func_8087B7C0(EnHorse* this, PlayState* play, Path* path) { this->unk_58C = 0x2B; } this->unk_58C--; - if (this->actor.speedXZ > 5.0f) { - this->actor.speedXZ -= 0.5f; + if (this->actor.speed > 5.0f) { + this->actor.speed -= 0.5f; } } else if (this->unk_590 > 0) { if (this->unk_590 == 0x1F4) { @@ -412,19 +412,19 @@ void func_8087B7C0(EnHorse* this, PlayState* play, Path* path) { } } this->unk_590--; - if (this->actor.speedXZ < this->unk_398) { - this->actor.speedXZ += 1.0f; + if (this->actor.speed < this->unk_398) { + this->actor.speed += 1.0f; } else { - this->actor.speedXZ -= 0.5f; + this->actor.speed -= 0.5f; } } else if (this->actor.params == ENHORSE_5) { s16 sp4A; if (sp68 >= this->curRaceWaypoint) { - if (this->actor.speedXZ < this->unk_398) { - this->actor.speedXZ += 0.5f; + if (this->actor.speed < this->unk_398) { + this->actor.speed += 0.5f; } else { - this->actor.speedXZ -= 0.5f; + this->actor.speed -= 0.5f; } this->unk_394 |= 1; return; @@ -433,50 +433,50 @@ void func_8087B7C0(EnHorse* this, PlayState* play, Path* path) { sp4A = Actor_WorldYawTowardActor(&this->actor, &GET_PLAYER(play)->actor) - this->actor.world.rot.y; if ((fabsf(Math_SinS(sp4A)) < 0.9f) && (Math_CosS(sp4A) > 0.0f)) { - if (this->actor.speedXZ < this->unk_398) { - this->actor.speedXZ += 0.5f; + if (this->actor.speed < this->unk_398) { + this->actor.speed += 0.5f; } else { - this->actor.speedXZ -= 0.25f; + this->actor.speed -= 0.25f; } this->unk_394 |= 1; } else { - if (this->actor.speedXZ < 13.0f) { - this->actor.speedXZ += 0.4f; + if (this->actor.speed < 13.0f) { + this->actor.speed += 0.4f; } else { - this->actor.speedXZ -= 0.2f; + this->actor.speed -= 0.2f; } this->unk_394 &= ~1; } } else if (sp68 >= this->curRaceWaypoint) { - if (this->actor.speedXZ < this->unk_398) { - this->actor.speedXZ += 0.5f; + if (this->actor.speed < this->unk_398) { + this->actor.speed += 0.5f; } else { - this->actor.speedXZ -= 0.5f; + this->actor.speed -= 0.5f; } this->unk_394 |= 1; } else if ((sp68 + 1) == this->curRaceWaypoint) { s16 sp48 = Actor_WorldYawTowardActor(&this->actor, &GET_PLAYER(play)->actor) - this->actor.world.rot.y; if ((fabsf(Math_SinS(sp48)) < 0.9f) && (Math_CosS(sp48) > 0.0f)) { - if (this->actor.speedXZ < this->unk_398) { - this->actor.speedXZ += 0.5f; + if (this->actor.speed < this->unk_398) { + this->actor.speed += 0.5f; } else { - this->actor.speedXZ -= 0.25f; + this->actor.speed -= 0.25f; } this->unk_394 |= 1; } else { - if (this->actor.speedXZ < 12.0f) { - this->actor.speedXZ += 0.4f; + if (this->actor.speed < 12.0f) { + this->actor.speed += 0.4f; } else { - this->actor.speedXZ -= 0.2f; + this->actor.speed -= 0.2f; } this->unk_394 &= ~1; } } else { - if (this->actor.speedXZ < 13.0f) { - this->actor.speedXZ += 0.4f; + if (this->actor.speed < 13.0f) { + this->actor.speed += 0.4f; } else { - this->actor.speedXZ -= 0.2f; + this->actor.speed -= 0.2f; } this->unk_394 &= ~1; } @@ -800,7 +800,7 @@ void EnHorse_Init(Actor* thisx, PlayState* play2) { thisx->gravity = -3.5f; ActorShape_Init(&thisx->shape, 0.0f, ActorShadow_DrawHorse, 20.0f); this->action = ENHORSE_ACTION_IDLE; - thisx->speedXZ = 0.0f; + thisx->speed = 0.0f; if (this->type == HORSE_TYPE_2) { sJntSphInit.elements[0].dim.limb = 13; @@ -989,7 +989,7 @@ void EnHorse_Freeze(EnHorse* this, PlayState* play) { } void EnHorse_Frozen(EnHorse* this, PlayState* play) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->noInputTimer--; if (this->noInputTimer < 0) { this->colliderCylinder1.base.ocFlags1 |= OC1_ON; @@ -1004,7 +1004,7 @@ void EnHorse_Frozen(EnHorse* this, PlayState* play) { if (play->csCtx.state != CS_STATE_0) { EnHorse_StartMountedIdle(this); } else { - this->actor.speedXZ = 8.0f; + this->actor.speed = 8.0f; EnHorse_StartGalloping(this); } } else if (this->prevAction == ENHORSE_ACTION_IDLE) { @@ -1035,10 +1035,10 @@ void EnHorse_UpdateSpeed(EnHorse* this, PlayState* play, f32 brakeDecel, f32 bra f32 temp_f12; if (!EnHorse_PlayerCanMove(this, play)) { - if (this->actor.speedXZ > 8.0f) { - this->actor.speedXZ -= decel; - } else if (this->actor.speedXZ < 0.0f) { - this->actor.speedXZ = 0.0f; + if (this->actor.speed > 8.0f) { + this->actor.speed -= decel; + } else if (this->actor.speed < 0.0f) { + this->actor.speed = 0.0f; } return; } @@ -1047,63 +1047,62 @@ void EnHorse_UpdateSpeed(EnHorse* this, PlayState* play, f32 brakeDecel, f32 bra EnHorse_StickDirection(&this->curStick, &stickMag, &stickAngle); if (Math_CosS(stickAngle) <= brakeAngle) { - this->actor.speedXZ -= brakeDecel; - this->actor.speedXZ = CLAMP_MIN(this->actor.speedXZ, 0.0f); + this->actor.speed -= brakeDecel; + this->actor.speed = CLAMP_MIN(this->actor.speed, 0.0f); return; } if (stickMag < minStickMag) { this->stateFlags &= ~ENHORSE_BOOST; this->stateFlags &= ~ENHORSE_BOOST_DECEL; - this->actor.speedXZ -= decel; - if (this->actor.speedXZ < 0.0f) { - this->actor.speedXZ = 0.0f; + this->actor.speed -= decel; + if (this->actor.speed < 0.0f) { + this->actor.speed = 0.0f; } return; } if (this->stateFlags & ENHORSE_BOOST) { if ((16 - this->boostTimer) > 0) { - this->actor.speedXZ = - (((EnHorse_SlopeSpeedMultiplier(this, play) * this->boostSpeed) - this->actor.speedXZ) / - (16.0f - this->boostTimer)) + - this->actor.speedXZ; + this->actor.speed = (((EnHorse_SlopeSpeedMultiplier(this, play) * this->boostSpeed) - this->actor.speed) / + (16.0f - this->boostTimer)) + + this->actor.speed; } else { - this->actor.speedXZ = EnHorse_SlopeSpeedMultiplier(this, play) * this->boostSpeed; + this->actor.speed = EnHorse_SlopeSpeedMultiplier(this, play) * this->boostSpeed; } - if ((EnHorse_SlopeSpeedMultiplier(this, play) * this->boostSpeed) <= this->actor.speedXZ) { + if ((EnHorse_SlopeSpeedMultiplier(this, play) * this->boostSpeed) <= this->actor.speed) { this->stateFlags &= ~ENHORSE_BOOST; this->stateFlags |= ENHORSE_BOOST_DECEL; } } else if (this->stateFlags & ENHORSE_BOOST_DECEL) { - if (this->actor.speedXZ > baseSpeed) { - this->actor.speedXZ -= 0.06f; - } else if (this->actor.speedXZ < baseSpeed) { - this->actor.speedXZ = baseSpeed; + if (this->actor.speed > baseSpeed) { + this->actor.speed -= 0.06f; + } else if (this->actor.speed < baseSpeed) { + this->actor.speed = baseSpeed; this->stateFlags &= ~ENHORSE_BOOST_DECEL; } } else { - if (this->actor.speedXZ <= (baseSpeed * (1.0f / 54.0f) * stickMag)) { + if (this->actor.speed <= (baseSpeed * (1.0f / 54.0f) * stickMag)) { phi_f0 = 1.0f; } else { phi_f0 = -1.0f; } - this->actor.speedXZ += phi_f0 * 50.0f * 0.01f; + this->actor.speed += phi_f0 * 50.0f * 0.01f; - if (this->actor.speedXZ > baseSpeed) { - this->actor.speedXZ -= decel; - if (this->actor.speedXZ < baseSpeed) { - this->actor.speedXZ = baseSpeed; + if (this->actor.speed > baseSpeed) { + this->actor.speed -= decel; + if (this->actor.speed < baseSpeed) { + this->actor.speed = baseSpeed; } } } temp_f12 = stickAngle * (1 / 32236.f); - turn = stickAngle * temp_f12 * temp_f12 * (2.2f - (this->actor.speedXZ * (1.0f / this->boostSpeed))); - turn = CLAMP(turn, -turnSpeed * (2.2f - (1.7f * this->actor.speedXZ * (1.0f / this->boostSpeed))), - turnSpeed * (2.2f - (1.7f * this->actor.speedXZ * (1.0f / this->boostSpeed)))); + turn = stickAngle * temp_f12 * temp_f12 * (2.2f - (this->actor.speed * (1.0f / this->boostSpeed))); + turn = CLAMP(turn, -turnSpeed * (2.2f - (1.7f * this->actor.speed * (1.0f / this->boostSpeed))), + turnSpeed * (2.2f - (1.7f * this->actor.speed * (1.0f / this->boostSpeed)))); this->actor.world.rot.y += turn; this->actor.shape.rot.y = this->actor.world.rot.y; } @@ -1141,7 +1140,7 @@ void EnHorse_MountedIdle(EnHorse* this, PlayState* play) { f32 mag; s16 angle = 0; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; EnHorse_StickDirection(&this->curStick, &mag, &angle); if (mag > 10.0f) { if (EnHorse_PlayerCanMove(this, play) == true) { @@ -1188,7 +1187,7 @@ void EnHorse_MountedIdleWhinnying(EnHorse* this, PlayState* play) { f32 stickMag; s16 stickAngle = 0; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; EnHorse_StickDirection(&this->curStick, &stickMag, &stickAngle); if (stickMag > 10.0f) { if (EnHorse_PlayerCanMove(this, play) == true) { @@ -1222,7 +1221,7 @@ void EnHorse_MountedTurn(EnHorse* this, PlayState* play) { s16 clampedYaw; s16 stickAngle; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; EnHorse_PlayWalkingSound(this); if (EnHorse_PlayerCanMove(this, play) == true) { EnHorse_StickDirection(&this->curStick, &stickMag, &stickAngle); @@ -1300,15 +1299,15 @@ void EnHorse_MountedWalk(EnHorse* this, PlayState* play) { ((this->noInputTimer > 0) && (this->noInputTimer < (this->noInputTimerMax - 20)))) { EnHorse_UpdateSpeed(this, play, 0.3f, -0.5f, 10.0f, 0.06f, 3.0f, 0x320); } else { - this->actor.speedXZ = 3.0f; + this->actor.speed = 3.0f; } - if (this->actor.speedXZ == 0.0f) { + if (this->actor.speed == 0.0f) { this->stateFlags &= ~ENHORSE_FLAG_9; EnHorse_StartMountedIdleResetAnim(this); this->noInputTimer = 0; this->noInputTimerMax = 0; - } else if (this->actor.speedXZ > 3.0f) { + } else if (this->actor.speed > 3.0f) { this->stateFlags &= ~ENHORSE_FLAG_9; EnHorse_StartTrotting(this); this->noInputTimer = 0; @@ -1324,9 +1323,9 @@ void EnHorse_MountedWalk(EnHorse* this, PlayState* play) { if (this->waitTimer <= 0) { this->stateFlags &= ~ENHORSE_FLAG_9; - this->skin.skelAnime.playSpeed = this->actor.speedXZ * 0.75f; - if ((SkelAnime_Update(&this->skin.skelAnime) || (this->actor.speedXZ == 0.0f)) && (this->noInputTimer <= 0)) { - if (this->actor.speedXZ > 3.0f) { + this->skin.skelAnime.playSpeed = this->actor.speed * 0.75f; + if ((SkelAnime_Update(&this->skin.skelAnime) || (this->actor.speed == 0.0f)) && (this->noInputTimer <= 0)) { + if (this->actor.speed > 3.0f) { EnHorse_StartTrotting(this); this->noInputTimer = 0; this->noInputTimerMax = 0; @@ -1340,7 +1339,7 @@ void EnHorse_MountedWalk(EnHorse* this, PlayState* play) { } } else { this->waitTimer--; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } } @@ -1363,18 +1362,18 @@ void EnHorse_MountedTrot(EnHorse* this, PlayState* play) { EnHorse_UpdateSpeed(this, play, 0.3f, -0.5f, 10.0f, 0.06f, 6.0f, 800); EnHorse_StickDirection(&this->curStick, &stickMag, &stickAngle); - if (this->actor.speedXZ < 3.0f) { + if (this->actor.speed < 3.0f) { EnHorse_StartWalkingInterruptable(this); } - this->skin.skelAnime.playSpeed = this->actor.speedXZ * 0.375f; + this->skin.skelAnime.playSpeed = this->actor.speed * 0.375f; if (SkelAnime_Update(&this->skin.skelAnime)) { func_8087C178(this); Rumble_Request(0.0f, 60, 8, 255); - if (this->actor.speedXZ >= 6.0f) { + if (this->actor.speed >= 6.0f) { EnHorse_StartGallopingInterruptable(this); - } else if (this->actor.speedXZ < 3.0f) { + } else if (this->actor.speed < 3.0f) { EnHorse_StartWalkingInterruptable(this); } else { EnHorse_MountedTrotReset(this); @@ -1428,14 +1427,14 @@ void EnHorse_MountedGallop(EnHorse* this, PlayState* play) { EnHorse_UpdateSpeed(this, play, 0.3f, -0.5f, 10.0f, 0.06f, 8.0f, 800); } else if (this->noInputTimer > 0) { this->noInputTimer--; - this->actor.speedXZ = 8.0f; + this->actor.speed = 8.0f; } - if (this->actor.speedXZ < 6.0f) { + if (this->actor.speed < 6.0f) { EnHorse_StartTrotting(this); } - this->skin.skelAnime.playSpeed = this->actor.speedXZ * 0.3f; + this->skin.skelAnime.playSpeed = this->actor.speed * 0.3f; if (SkelAnime_Update(&this->skin.skelAnime)) { func_8087C1C0(this); @@ -1443,7 +1442,7 @@ void EnHorse_MountedGallop(EnHorse* this, PlayState* play) { if (EnHorse_PlayerCanMove(this, play) == true) { if ((stickMag >= 10.0f) && (Math_CosS(stickAngle) <= -0.5f)) { EnHorse_StartBraking(this, play); - } else if (this->actor.speedXZ < 6.0f) { + } else if (this->actor.speed < 6.0f) { EnHorse_StartTrotting(this); } else { EnHorse_MountedGallopReset(this); @@ -1491,7 +1490,7 @@ void EnHorse_MountedRearing(EnHorse* this, PlayState* play) { f32 stickMag; s16 stickAngle; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; if (this->curFrame > 25.0f) { if (!(this->stateFlags & ENHORSE_LAND2_SOUND)) { this->stateFlags |= ENHORSE_LAND2_SOUND; @@ -1560,15 +1559,15 @@ void EnHorse_StartBraking(EnHorse* this, PlayState* play) { } void EnHorse_Stopping(EnHorse* this, PlayState* play) { - if (this->actor.speedXZ > 0.0f) { - this->actor.speedXZ -= 0.6f; - if (this->actor.speedXZ < 0.0f) { - this->actor.speedXZ = 0.0f; + if (this->actor.speed > 0.0f) { + this->actor.speed -= 0.6f; + if (this->actor.speed < 0.0f) { + this->actor.speed = 0.0f; } } if ((this->stateFlags & ENHORSE_STOPPING_NEIGH_SOUND) && (this->skin.skelAnime.curFrame > 29.0f)) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; if ((Rand_ZeroOne() > 0.5f) && ((gSaveContext.save.entrance != ENTRANCE(ROMANI_RANCH, 0)) || (Cutscene_GetSceneLayer(play) == 0))) { if (this->stateFlags & ENHORSE_DRAW) { @@ -1586,9 +1585,9 @@ void EnHorse_Stopping(EnHorse* this, PlayState* play) { } if (this->skin.skelAnime.curFrame > 29.0f) { - this->actor.speedXZ = 0.0f; - } else if ((this->actor.speedXZ > 3.0f) && (this->stateFlags & ENHORSE_FORCE_REVERSING)) { - this->actor.speedXZ = 3.0f; + this->actor.speed = 0.0f; + } else if ((this->actor.speed > 3.0f) && (this->stateFlags & ENHORSE_FORCE_REVERSING)) { + this->actor.speed = 3.0f; } if (SkelAnime_Update(&this->skin.skelAnime)) { @@ -1630,14 +1629,14 @@ void EnHorse_Reverse(EnHorse* this, PlayState* play) { ((this->noInputTimer > 0) && (this->noInputTimer < (this->noInputTimerMax - 20)))) { if ((stickMag < 10.0f) && (this->noInputTimer <= 0)) { EnHorse_StartMountedIdleResetAnim(this); - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; return; } else if (stickMag < 10.0f) { stickAngle = -0x7FFF; } else if (Math_CosS(stickAngle) > -0.5f) { this->noInputTimerMax = 0; EnHorse_StartMountedIdleResetAnim(this); - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; return; } } else if (stickMag < 10.0f) { @@ -1646,13 +1645,13 @@ void EnHorse_Reverse(EnHorse* this, PlayState* play) { } else if ((player->actor.flags & ACTOR_FLAG_100) || (play->csCtx.state != CS_STATE_0) || (ActorCutscene_GetCurrentIndex() != -1) || (player->stateFlags1 & PLAYER_STATE1_20)) { EnHorse_StartMountedIdleResetAnim(this); - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; return; } else { stickAngle = -0x7FFF; } - this->actor.speedXZ = -2.0f; + this->actor.speed = -2.0f; turnAmount = -0x8000 - stickAngle; turnAmount = CLAMP(turnAmount, -2400.0f, 2400.0f); this->actor.world.rot.y += turnAmount; @@ -1665,7 +1664,7 @@ void EnHorse_Reverse(EnHorse* this, PlayState* play) { } } - this->skin.skelAnime.playSpeed = this->actor.speedXZ * 0.5f * 1.5f; + this->skin.skelAnime.playSpeed = this->actor.speed * 0.5f * 1.5f; if (SkelAnime_Update(&this->skin.skelAnime) && (this->noInputTimer <= 0) && (EnHorse_PlayerCanMove(this, play) == true)) { @@ -1724,8 +1723,8 @@ void EnHorse_LowJump(EnHorse* this, PlayState* play) { this->stateFlags |= ENHORSE_JUMPING; - if (this->actor.speedXZ < 12.0f) { - this->actor.speedXZ = 12.0f; + if (this->actor.speed < 12.0f) { + this->actor.speed = 12.0f; } if (this->actor.floorHeight != BGCHECK_Y_MIN) { @@ -1822,8 +1821,8 @@ void EnHorse_HighJump(EnHorse* this, PlayState* play) { this->stateFlags |= ENHORSE_JUMPING; - if (this->actor.speedXZ < 13.0f) { - this->actor.speedXZ = 13.0f; + if (this->actor.speed < 13.0f) { + this->actor.speed = 13.0f; } if (this->actor.floorHeight != BGCHECK_Y_MIN) { @@ -1908,7 +1907,7 @@ void EnHorse_Inactive(EnHorse* this, PlayState* play) { void EnHorse_PlayIdleAnimation(EnHorse* this, s32 anim, f32 morphFrames, f32 startFrames) { this->action = ENHORSE_ACTION_IDLE; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; if ((anim != ENHORSE_ANIM_IDLE) && (anim != ENHORSE_ANIM_WHINNY) && (anim != ENHORSE_ANIM_REARING)) { anim = ENHORSE_ANIM_IDLE; @@ -1963,7 +1962,7 @@ void EnHorse_StartIdleRidable(EnHorse* this) { } void EnHorse_Idle(EnHorse* this, PlayState* play) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; EnHorse_IdleAnimSounds(this, play); if ((D_801BDAA4 != 0) && (this->type == HORSE_TYPE_2)) { @@ -2102,18 +2101,18 @@ void EnHorse_FollowPlayer(EnHorse* this, PlayState* play) { } if (this->animIndex == ENHORSE_ANIM_GALLOP) { - this->actor.speedXZ = 8.0f; - this->skin.skelAnime.playSpeed = this->actor.speedXZ * 0.3f; + this->actor.speed = 8.0f; + this->skin.skelAnime.playSpeed = this->actor.speed * 0.3f; } else { if (this->animIndex == ENHORSE_ANIM_TROT) { - this->actor.speedXZ = 6.0f; - this->skin.skelAnime.playSpeed = this->actor.speedXZ * 0.375f; + this->actor.speed = 6.0f; + this->skin.skelAnime.playSpeed = this->actor.speed * 0.375f; } else if (this->animIndex == ENHORSE_ANIM_WALK) { - this->actor.speedXZ = 3.0f; + this->actor.speed = 3.0f; EnHorse_PlayWalkingSound(this); - this->skin.skelAnime.playSpeed = this->actor.speedXZ * 0.75f; + this->skin.skelAnime.playSpeed = this->actor.speed * 0.75f; } else { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->skin.skelAnime.playSpeed = 1.0f; } } @@ -2152,7 +2151,7 @@ void EnHorse_FollowPlayer(EnHorse* this, PlayState* play) { void EnHorse_InitIngoHorse(EnHorse* this) { this->curRaceWaypoint = 0; this->soundTimer = 0; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; EnHorse_UpdateIngoHorseAnim(this); if (this->stateFlags & ENHORSE_DRAW) { Audio_PlaySfxAtPos(&this->unk_218, NA_SE_IT_INGO_HORSE_NEIGH); @@ -2177,17 +2176,17 @@ void EnHorse_UpdateIngoHorseAnim(EnHorse* this) { this->action = ENHORSE_ACTION_INGO_RACE; this->stateFlags &= ~ENHORSE_SANDDUST_SOUND; - if (this->actor.speedXZ == 0.0f) { + if (this->actor.speed == 0.0f) { if (this->animIndex != ENHORSE_ANIM_IDLE) { animChanged = true; } this->animIndex = ENHORSE_ANIM_IDLE; - } else if (this->actor.speedXZ <= 3.0f) { + } else if (this->actor.speed <= 3.0f) { if (this->animIndex != ENHORSE_ANIM_WALK) { animChanged = true; } this->animIndex = ENHORSE_ANIM_WALK; - } else if (this->actor.speedXZ <= 6.0f) { + } else if (this->actor.speed <= 6.0f) { if (this->animIndex != ENHORSE_ANIM_TROT) { animChanged = true; } @@ -2200,16 +2199,16 @@ void EnHorse_UpdateIngoHorseAnim(EnHorse* this) { } if (this->animIndex == ENHORSE_ANIM_WALK) { - animSpeed = this->actor.speedXZ * 0.5f; + animSpeed = this->actor.speed * 0.5f; } else if (this->animIndex == ENHORSE_ANIM_TROT) { - animSpeed = this->actor.speedXZ * 0.25f; + animSpeed = this->actor.speed * 0.25f; if (this->type == HORSE_TYPE_2) { Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_RUN); } else { Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_RUN); } } else if (this->animIndex == ENHORSE_ANIM_GALLOP) { - animSpeed = this->actor.speedXZ * 0.2f; + animSpeed = this->actor.speed * 0.2f; if (this->type == HORSE_TYPE_2) { Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_RUN); } else { @@ -2240,26 +2239,26 @@ void EnHorse_UpdateIngoRace(EnHorse* this, PlayState* play) { } if (!this->inRace) { - this->actor.speedXZ = 0.0f; - this->rider->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; + this->rider->actor.speed = 0.0f; if (this->animIndex != ENHORSE_ANIM_IDLE) { EnHorse_UpdateIngoHorseAnim(this); } } if (this->animIndex == ENHORSE_ANIM_WALK) { - playSpeed = this->actor.speedXZ * 0.5f; + playSpeed = this->actor.speed * 0.5f; } else if (this->animIndex == ENHORSE_ANIM_TROT) { - playSpeed = this->actor.speedXZ * 0.25f; + playSpeed = this->actor.speed * 0.25f; } else if (this->animIndex == ENHORSE_ANIM_GALLOP) { - playSpeed = this->actor.speedXZ * 0.2f; + playSpeed = this->actor.speed * 0.2f; } else { playSpeed = 1.0f; } this->skin.skelAnime.playSpeed = playSpeed; if (SkelAnime_Update(&this->skin.skelAnime) || - ((this->animIndex == ENHORSE_ANIM_IDLE) && (this->actor.speedXZ != 0.0f))) { + ((this->animIndex == ENHORSE_ANIM_IDLE) && (this->actor.speed != 0.0f))) { EnHorse_UpdateIngoHorseAnim(this); } } @@ -2296,8 +2295,8 @@ void func_80881398(EnHorse* this, PlayState* play) { f32 curFrame; this->stateFlags |= ENHORSE_JUMPING; - if (this->actor.speedXZ < 14.0f) { - this->actor.speedXZ = 14.0f; + if (this->actor.speed < 14.0f) { + this->actor.speed = 14.0f; } animeUpdated = SkelAnime_Update(&this->skin.skelAnime); @@ -2352,7 +2351,7 @@ void func_8088159C(EnHorse* this, PlayState* play) { void func_80881634(EnHorse* this) { this->curRaceWaypoint = 0; this->soundTimer = 0; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; func_8088168C(this); if (this->stateFlags & ENHORSE_DRAW) { Audio_PlaySfxAtPos(&this->unk_218, NA_SE_IT_INGO_HORSE_NEIGH); @@ -2367,17 +2366,17 @@ void func_8088168C(EnHorse* this) { this->action = ENHORSE_ACTION_5; this->stateFlags &= ~ENHORSE_SANDDUST_SOUND; - if (this->actor.speedXZ == 0.0f) { + if (this->actor.speed == 0.0f) { if (this->animIndex != ENHORSE_ANIM_IDLE) { animChanged = true; } this->animIndex = ENHORSE_ANIM_IDLE; - } else if (this->actor.speedXZ <= 3.0f) { + } else if (this->actor.speed <= 3.0f) { if (this->animIndex != ENHORSE_ANIM_WALK) { animChanged = true; } this->animIndex = ENHORSE_ANIM_WALK; - } else if (this->actor.speedXZ <= 6.0f) { + } else if (this->actor.speed <= 6.0f) { if (this->animIndex != ENHORSE_ANIM_TROT) { animChanged = true; } @@ -2390,16 +2389,16 @@ void func_8088168C(EnHorse* this) { } if (this->animIndex == ENHORSE_ANIM_WALK) { - animSpeed = this->actor.speedXZ * 0.5f; + animSpeed = this->actor.speed * 0.5f; } else if (this->animIndex == ENHORSE_ANIM_TROT) { - animSpeed = this->actor.speedXZ * 0.25f; + animSpeed = this->actor.speed * 0.25f; if (this->type == HORSE_TYPE_2) { Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_RUN); } else { Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_RUN); } } else if (this->animIndex == ENHORSE_ANIM_GALLOP) { - animSpeed = this->actor.speedXZ * 0.2f; + animSpeed = this->actor.speed * 0.2f; if (this->type == HORSE_TYPE_2) { Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_RUN); } else { @@ -2434,8 +2433,8 @@ void func_808819D8(EnHorse* this, PlayState* play) { } if (!this->inRace) { - this->actor.speedXZ = 0.0f; - this->rider->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; + this->rider->actor.speed = 0.0f; if (this->animIndex != ENHORSE_ANIM_IDLE) { EnHorse_UpdateIngoHorseAnim(this); } @@ -2450,25 +2449,25 @@ void func_808819D8(EnHorse* this, PlayState* play) { } if (!this->inRace) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; if (this->animIndex != ENHORSE_ANIM_IDLE) { func_8088168C(this); } } if (this->animIndex == ENHORSE_ANIM_WALK) { - animSpeed = this->actor.speedXZ * 0.5f; + animSpeed = this->actor.speed * 0.5f; } else if (this->animIndex == ENHORSE_ANIM_TROT) { - animSpeed = this->actor.speedXZ * 0.25f; + animSpeed = this->actor.speed * 0.25f; } else if (this->animIndex == ENHORSE_ANIM_GALLOP) { - animSpeed = this->actor.speedXZ * 0.2f; + animSpeed = this->actor.speed * 0.2f; } else { animSpeed = 1.0f; } this->skin.skelAnime.playSpeed = animSpeed; if (SkelAnime_Update(&this->skin.skelAnime) || - ((this->animIndex == ENHORSE_ANIM_IDLE) && (this->actor.speedXZ != 0.0f))) { + ((this->animIndex == ENHORSE_ANIM_IDLE) && (this->actor.speed != 0.0f))) { func_8088168C(this); } @@ -2484,7 +2483,7 @@ void EnHorse_CsMoveInit(EnHorse* this, PlayState* play, CsCmdActorAction* action this->animIndex = ENHORSE_ANIM_GALLOP; this->cutsceneAction = 1; Animation_PlayOnceSetSpeed(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex], - this->actor.speedXZ * 0.2f * 1.5f); + this->actor.speed * 0.2f * 1.5f); } void EnHorse_CsMoveToPoint(EnHorse* this, PlayState* play, CsCmdActorAction* action) { @@ -2497,18 +2496,18 @@ void EnHorse_CsMoveToPoint(EnHorse* this, PlayState* play, CsCmdActorAction* act if (Math3D_Distance(&endPos, &this->actor.world.pos) > 8.0f) { EnHorse_RotateToPoint(this, play, &endPos, 0x320); - this->actor.speedXZ = 8.0f; - this->skin.skelAnime.playSpeed = this->actor.speedXZ * 0.3f; + this->actor.speed = 8.0f; + this->skin.skelAnime.playSpeed = this->actor.speed * 0.3f; } else { this->actor.world.pos = endPos; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } if (SkelAnime_Update(&this->skin.skelAnime)) { func_8087C1C0(this); Rumble_Request(0.0f, 120, 8, 255); Animation_PlayOnceSetSpeed(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex], - this->actor.speedXZ * 0.3f); + this->actor.speed * 0.3f); } } @@ -2562,7 +2561,7 @@ void EnHorse_CsJump(EnHorse* this, PlayState* play, CsCmdActorAction* action) { } curFrame = this->skin.skelAnime.curFrame; - this->actor.speedXZ = 13.0f; + this->actor.speed = 13.0f; this->stateFlags |= ENHORSE_JUMPING; if (curFrame > 19.0f) { @@ -2626,7 +2625,7 @@ void EnHorse_CsRearingInit(EnHorse* this, PlayState* play, CsCmdActorAction* act } void EnHorse_CsRearing(EnHorse* this, PlayState* play, CsCmdActorAction* action) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; if (this->curFrame > 25.0f) { if (!(this->stateFlags & ENHORSE_LAND2_SOUND)) { this->stateFlags |= ENHORSE_LAND2_SOUND; @@ -2665,7 +2664,7 @@ void EnHorse_WarpMoveInit(EnHorse* this, PlayState* play, CsCmdActorAction* acti this->animIndex = ENHORSE_ANIM_GALLOP; this->cutsceneAction = 4; Animation_PlayOnceSetSpeed(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex], - this->actor.speedXZ * 0.3f); + this->actor.speed * 0.3f); } void EnHorse_CsWarpMoveToPoint(EnHorse* this, PlayState* play, CsCmdActorAction* action) { @@ -2678,18 +2677,18 @@ void EnHorse_CsWarpMoveToPoint(EnHorse* this, PlayState* play, CsCmdActorAction* if (Math3D_Distance(&endPos, &this->actor.world.pos) > 8.0f) { EnHorse_RotateToPoint(this, play, &endPos, 0x320); - this->actor.speedXZ = 8.0f; - this->skin.skelAnime.playSpeed = this->actor.speedXZ * 0.3f; + this->actor.speed = 8.0f; + this->skin.skelAnime.playSpeed = this->actor.speed * 0.3f; } else { this->actor.world.pos = endPos; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } if (SkelAnime_Update(&this->skin.skelAnime)) { func_8087C1C0(this); Rumble_Request(0.0f, 120, 8, 255); Animation_PlayOnceSetSpeed(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex], - this->actor.speedXZ * 0.3f); + this->actor.speed * 0.3f); } } @@ -2719,7 +2718,7 @@ void EnHorse_CsWarpRearingInit(EnHorse* this, PlayState* play, CsCmdActorAction* } void EnHorse_CsWarpRearing(EnHorse* this, PlayState* play, CsCmdActorAction* action) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; if (this->curFrame > 25.0f) { if (!(this->stateFlags & ENHORSE_LAND2_SOUND)) { this->stateFlags |= ENHORSE_LAND2_SOUND; @@ -2750,7 +2749,7 @@ void EnHorse_InitCutscene(EnHorse* this, PlayState* play) { this->playerControlled = false; this->action = ENHORSE_ACTION_CS_UPDATE; this->cutsceneAction = 0; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } s32 EnHorse_GetCutsceneFunctionIndex(s32 csAction) { @@ -2829,12 +2828,12 @@ s32 EnHorse_UpdateHbaRaceInfo(EnHorse* this, PlayState* play, RaceInfo* raceInfo } this->actor.shape.rot.y = this->actor.world.rot.y; - if ((this->actor.speedXZ < raceInfo->waypoints[this->curRaceWaypoint].speed) && !(this->hbaFlags & 1)) { - this->actor.speedXZ += 0.4f; + if ((this->actor.speed < raceInfo->waypoints[this->curRaceWaypoint].speed) && !(this->hbaFlags & 1)) { + this->actor.speed += 0.4f; } else { - this->actor.speedXZ -= 0.4f; - if (this->actor.speedXZ < 0.0f) { - this->actor.speedXZ = 0.0f; + this->actor.speed -= 0.4f; + if (this->actor.speed < 0.0f) { + this->actor.speed = 0.0f; } } return false; @@ -2845,7 +2844,7 @@ void EnHorse_InitHorsebackArchery(EnHorse* this) { this->soundTimer = 0; this->curRaceWaypoint = 0; this->hbaTimer = 0; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; EnHorse_UpdateHbaAnim(this); } @@ -2854,17 +2853,17 @@ void EnHorse_UpdateHbaAnim(EnHorse* this) { f32 animSpeed; this->action = ENHORSE_ACTION_HBA; - if (this->actor.speedXZ == 0.0f) { + if (this->actor.speed == 0.0f) { if (this->animIndex != ENHORSE_ANIM_IDLE) { animChanged = true; } this->animIndex = ENHORSE_ANIM_IDLE; - } else if (this->actor.speedXZ <= 3.0f) { + } else if (this->actor.speed <= 3.0f) { if (this->animIndex != ENHORSE_ANIM_WALK) { animChanged = true; } this->animIndex = ENHORSE_ANIM_WALK; - } else if (this->actor.speedXZ <= 6.0f) { + } else if (this->actor.speed <= 6.0f) { if (this->animIndex != ENHORSE_ANIM_TROT) { animChanged = true; } @@ -2877,9 +2876,9 @@ void EnHorse_UpdateHbaAnim(EnHorse* this) { } if (this->animIndex == ENHORSE_ANIM_WALK) { - animSpeed = this->actor.speedXZ * 0.5f; + animSpeed = this->actor.speed * 0.5f; } else if (this->animIndex == ENHORSE_ANIM_TROT) { - animSpeed = this->actor.speedXZ * 0.25f; + animSpeed = this->actor.speed * 0.25f; if (this->type == HORSE_TYPE_2) { Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_RUN); } else { @@ -2887,7 +2886,7 @@ void EnHorse_UpdateHbaAnim(EnHorse* this) { } Rumble_Request(0.0f, 60, 8, 255); } else if (this->animIndex == ENHORSE_ANIM_GALLOP) { - animSpeed = this->actor.speedXZ * 0.2f; + animSpeed = this->actor.speed * 0.2f; if (this->type == HORSE_TYPE_2) { Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_RUN); } else { @@ -2939,25 +2938,25 @@ void EnHorse_UpdateHorsebackArchery(EnHorse* this, PlayState* play) { } if (this->hbaStarted == 0) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; if (this->animIndex != ENHORSE_ANIM_IDLE) { EnHorse_UpdateHbaAnim(this); } } if (this->animIndex == ENHORSE_ANIM_WALK) { - playSpeed = this->actor.speedXZ * 0.5f; + playSpeed = this->actor.speed * 0.5f; } else if (this->animIndex == ENHORSE_ANIM_TROT) { - playSpeed = this->actor.speedXZ * 0.25f; + playSpeed = this->actor.speed * 0.25f; } else if (this->animIndex == ENHORSE_ANIM_GALLOP) { - playSpeed = this->actor.speedXZ * 0.2f; + playSpeed = this->actor.speed * 0.2f; } else { playSpeed = 1.0f; } this->skin.skelAnime.playSpeed = playSpeed; if (SkelAnime_Update(&this->skin.skelAnime) || - ((this->animIndex == ENHORSE_ANIM_IDLE) && (this->actor.speedXZ != 0.0f))) { + ((this->animIndex == ENHORSE_ANIM_IDLE) && (this->actor.speed != 0.0f))) { EnHorse_UpdateHbaAnim(this); } } @@ -2986,36 +2985,36 @@ void EnHorse_FleePlayer(EnHorse* this, PlayState* play) { if (playerDistToHome > 300.0f) { if (distToHome > 150.0f) { - this->actor.speedXZ += 0.4f; - if (this->actor.speedXZ > 8.0f) { - this->actor.speedXZ = 8.0f; + this->actor.speed += 0.4f; + if (this->actor.speed > 8.0f) { + this->actor.speed = 8.0f; } } else { - this->actor.speedXZ -= 0.5f; - if (this->actor.speedXZ < 0.0f) { - this->actor.speedXZ = 0.0f; + this->actor.speed -= 0.5f; + if (this->actor.speed < 0.0f) { + this->actor.speed = 0.0f; } } } else if (distToPlayer < 300.0f) { - this->actor.speedXZ += 0.4f; - if (this->actor.speedXZ > 8.0f) { - this->actor.speedXZ = 8.0f; + this->actor.speed += 0.4f; + if (this->actor.speed > 8.0f) { + this->actor.speed = 8.0f; } } else { - this->actor.speedXZ -= 0.5f; - if (this->actor.speedXZ < 0.0f) { - this->actor.speedXZ = 0.0f; + this->actor.speed -= 0.5f; + if (this->actor.speed < 0.0f) { + this->actor.speed = 0.0f; } } - if (this->actor.speedXZ >= 6.0f) { - this->skin.skelAnime.playSpeed = this->actor.speedXZ * 0.3f; + if (this->actor.speed >= 6.0f) { + this->skin.skelAnime.playSpeed = this->actor.speed * 0.3f; nextAnimIndex = ENHORSE_ANIM_GALLOP; - } else if (this->actor.speedXZ >= 3.0f) { - this->skin.skelAnime.playSpeed = this->actor.speedXZ * 0.375f; + } else if (this->actor.speed >= 3.0f) { + this->skin.skelAnime.playSpeed = this->actor.speed * 0.375f; nextAnimIndex = ENHORSE_ANIM_TROT; - } else if (this->actor.speedXZ > 0.1f) { - this->skin.skelAnime.playSpeed = this->actor.speedXZ * 0.75f; + } else if (this->actor.speed > 0.1f) { + this->skin.skelAnime.playSpeed = this->actor.speed * 0.75f; nextAnimIndex = ENHORSE_ANIM_WALK; EnHorse_PlayWalkingSound(this); } else { @@ -3283,7 +3282,7 @@ void func_808846F0(EnHorse* this, PlayState* play) { this->playerControlled = false; this->action = ENHORSE_ACTION_21; this->unk_3E0 = -1; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } void func_80884718(EnHorse* this, PlayState* play) { @@ -3329,9 +3328,9 @@ void func_808848C8(EnHorse* this, PlayState* play) { Vec3f sp24 = { -1916.0f, -106.0f, -523.0f }; EnHorse_PlayWalkingSound(this); - this->actor.speedXZ = 4.0f; + this->actor.speed = 4.0f; func_800F415C(&this->actor, &sp24, 2000); - this->skin.skelAnime.playSpeed = this->actor.speedXZ * 0.75f; + this->skin.skelAnime.playSpeed = this->actor.speed * 0.75f; SkelAnime_Update(&this->skin.skelAnime); if (Math3D_Distance(&sp24, &this->actor.world.pos) < 30.0f) { this->stateFlags &= ~ENHORSE_UNRIDEABLE; @@ -3397,12 +3396,12 @@ void func_80884A40(EnHorse* this, PlayState* play) { void func_80884D04(EnHorse* this, PlayState* play) { f32 playSpeed; - this->actor.speedXZ = 10.0f; + this->actor.speed = 10.0f; this->action = ENHORSE_ACTION_25; this->unk_540 = this->actor.world.pos; Actor_PlaySfx(&this->actor, NA_SE_IT_INGO_HORSE_NEIGH); this->animIndex = ENHORSE_ANIM_GALLOP; - playSpeed = this->actor.speedXZ * 0.2f; + playSpeed = this->actor.speed * 0.2f; Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex], sPlaybackSpeeds[this->animIndex] * playSpeed * 2.5f, 0.0f, Animation_GetLastFrame(sAnimationHeaders[this->type][this->animIndex]), ANIMMODE_ONCE, 0.0f); @@ -3493,13 +3492,13 @@ void EnHorse_ObstructMovement(EnHorse* this, PlayState* play, s32 obstacleType, if ((this->action == ENHORSE_ACTION_5) || (this->action == ENHORSE_ACTION_6)) { this->actor.world.pos = this->actor.prevPos; this->actor.world.rot.y -= 0x640; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.shape.rot.y = this->actor.world.rot.y; this->unk_1EC |= 4; } else if (this->action == ENHORSE_ACTION_25) { this->unk_1EC |= 0x80; this->actor.world.pos = this->actor.prevPos; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } else if ((play->sceneId != SCENE_KOEPONARACE) || (this->unk_1EC & 2)) { this->unk_1EC &= ~2; this->actor.world.pos = this->lastPos; @@ -3539,7 +3538,7 @@ void EnHorse_CheckFloors(EnHorse* this, PlayState* play) { f32 nx; f32 ny; f32 nz; - s32 galloping = this->actor.speedXZ > 8.0f; + s32 galloping = this->actor.speed > 8.0f; s32 status; f32 waterHeight; WaterBox* waterbox; @@ -3600,7 +3599,7 @@ void EnHorse_CheckFloors(EnHorse* this, PlayState* play) { pos.y = this->yFront; dist = Math3D_DistPlaneToPos(nx, ny, nz, this->actor.floorPoly->dist, &pos); - if ((frontFloor != this->actor.floorPoly) && (this->actor.speedXZ >= 0.0f) && + if ((frontFloor != this->actor.floorPoly) && (this->actor.speed >= 0.0f) && ((!(this->stateFlags & ENHORSE_JUMPING) && (dist < -40.0f)) || ((this->stateFlags & ENHORSE_JUMPING) && (dist < -200.0f)))) { EnHorse_ObstructMovement(this, play, 4, galloping); @@ -3611,7 +3610,7 @@ void EnHorse_CheckFloors(EnHorse* this, PlayState* play) { pos.y = this->yBack; dist = Math3D_DistPlaneToPos(nx, ny, nz, this->actor.floorPoly->dist, &pos); - if ((backFloor != this->actor.floorPoly) && (this->actor.speedXZ <= 0.0f) && + if ((backFloor != this->actor.floorPoly) && (this->actor.speed <= 0.0f) && ((!(this->stateFlags & ENHORSE_JUMPING) && (dist < -40.0f)) || ((this->stateFlags & ENHORSE_JUMPING) && (dist < -200.0f)))) { EnHorse_ObstructMovement(this, play, 5, galloping); @@ -3621,7 +3620,7 @@ void EnHorse_CheckFloors(EnHorse* this, PlayState* play) { if ((ny < 0.81915206f) || SurfaceType_IsHorseBlocked(&play->colCtx, this->actor.floorPoly, this->actor.floorBgId) || (func_800C99D4(&play->colCtx, this->actor.floorPoly, this->actor.floorBgId) == 7)) { - if (this->actor.speedXZ >= 0.0f) { + if (this->actor.speed >= 0.0f) { EnHorse_ObstructMovement(this, play, 4, galloping); } else { EnHorse_ObstructMovement(this, play, 5, galloping); @@ -3746,8 +3745,8 @@ void EnHorse_UpdateBgCheckInfo(EnHorse* this, PlayState* play) { } if ((this->actor.bgCheckFlags & 8) && (Math_CosS(this->actor.wallYaw - this->actor.world.rot.y) < -0.3f)) { - if (this->actor.speedXZ > 4.0f) { - this->actor.speedXZ -= 1.0f; + if (this->actor.speed > 4.0f) { + this->actor.speed -= 1.0f; if (this->type == HORSE_TYPE_2) { Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_SANDDUST); } else { @@ -3763,8 +3762,8 @@ void EnHorse_UpdateBgCheckInfo(EnHorse* this, PlayState* play) { ((horseJump->actor.params & 0xFF) == 5)) { this->stateFlags |= ENHORSE_FLAG_28; this->unk_3E8 += ((-10.0f / this->actor.scale.y) - this->unk_3E8) * 0.5f; - if (this->actor.speedXZ > 2.0f) { - this->actor.speedXZ -= 1.0f; + if (this->actor.speed > 2.0f) { + this->actor.speed -= 1.0f; if (this->type == HORSE_TYPE_2) { Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_SANDDUST); } else { @@ -3777,13 +3776,13 @@ void EnHorse_UpdateBgCheckInfo(EnHorse* this, PlayState* play) { } } - if ((this->stateFlags & ENHORSE_JUMPING) || (this->stateFlags & ENHORSE_FLAG_28) || (this->actor.speedXZ < 0.0f) || + if ((this->stateFlags & ENHORSE_JUMPING) || (this->stateFlags & ENHORSE_FLAG_28) || (this->actor.speed < 0.0f) || (this->action == ENHORSE_ACTION_STOPPING) || (this->action == ENHORSE_ACTION_MOUNTED_REARING)) { return; } - if (this->actor.speedXZ > 8.0f) { - if (this->actor.speedXZ < 12.8f) { + if (this->actor.speed > 8.0f) { + if (this->actor.speed < 12.8f) { intersectDist = 160.0f; movingFast = false; } else { @@ -3973,9 +3972,9 @@ void EnHorse_UpdateBgCheckInfo(EnHorse* this, PlayState* play) { EnHorse_Stub1(this); this->postDrawFunc = EnHorse_LowJumpInit; } else if ((movingFast == true) && - (((this->actor.speedXZ < 13.8f) && ((19.0f * temp_f0) < obstacleHeight) && + (((this->actor.speed < 13.8f) && ((19.0f * temp_f0) < obstacleHeight) && (obstacleHeight <= (72.0f * temp_f0))) || - ((this->actor.speedXZ > 13.8f) && (obstacleHeight <= (112.0f * temp_f0))))) { + ((this->actor.speed > 13.8f) && (obstacleHeight <= (112.0f * temp_f0))))) { EnHorse_Stub2(this); this->postDrawFunc = EnHorse_HighJumpInit; } @@ -4096,7 +4095,7 @@ void EnHorse_TiltBody(EnHorse* this, PlayState* play) { s32 targetRoll; s16 turnVel; - speed = this->actor.speedXZ / this->boostSpeed; + speed = this->actor.speed / this->boostSpeed; turnVel = this->actor.shape.rot.y - this->lastYaw; targetRoll = -((s16)((2730.0f * speed) * (turnVel / 960.00006f))); rollDiff = targetRoll - this->actor.world.rot.z; @@ -4224,7 +4223,7 @@ void EnHorse_Update(Actor* thisx, PlayState* play2) { } if (ActorCutscene_GetCurrentIndex() != -1) { - thisx->speedXZ = 0.0f; + thisx->speed = 0.0f; } if (this->action != ENHORSE_ACTION_25) { @@ -4252,8 +4251,8 @@ void EnHorse_Update(Actor* thisx, PlayState* play2) { } if (this->colliderJntSph.elements->info.ocElemFlags & OCELEM_HIT) { - if (thisx->speedXZ > 10.0f) { - thisx->speedXZ -= 1.0f; + if (thisx->speed > 10.0f) { + thisx->speed -= 1.0f; } } @@ -4351,13 +4350,13 @@ void EnHorse_Update(Actor* thisx, PlayState* play2) { } } - if ((thisx->speedXZ == 0.0f) && !(this->stateFlags & ENHORSE_FLAG_19)) { + if ((thisx->speed == 0.0f) && !(this->stateFlags & ENHORSE_FLAG_19)) { thisx->colChkInfo.mass = MASS_IMMOVABLE; } else { thisx->colChkInfo.mass = MASS_HEAVY; } - if (thisx->speedXZ >= 5.0f) { + if (thisx->speed >= 5.0f) { this->colliderCylinder1.base.atFlags |= AT_ON; } else { this->colliderCylinder1.base.atFlags &= ~AT_ON; diff --git a/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.c b/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.c index 9ec44193a2..0335085bd3 100644 --- a/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.c +++ b/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.c @@ -120,11 +120,11 @@ f32 func_808DE728(EnHorseLinkChild* this) { f32 phi_fv1; if (this->unk_148 == 2) { - phi_fv1 = D_808DFF18[this->unk_148] * this->actor.speedXZ * (1.0f / 2.0f); + phi_fv1 = D_808DFF18[this->unk_148] * this->actor.speed * (1.0f / 2.0f); } else if (this->unk_148 == 3) { - phi_fv1 = D_808DFF18[this->unk_148] * this->actor.speedXZ * (1.0f / 3.0f); + phi_fv1 = D_808DFF18[this->unk_148] * this->actor.speed * (1.0f / 3.0f); } else if (this->unk_148 == 4) { - phi_fv1 = D_808DFF18[this->unk_148] * this->actor.speedXZ * (1.0f / 5.0f); + phi_fv1 = D_808DFF18[this->unk_148] * this->actor.speed * (1.0f / 5.0f); } else { phi_fv1 = D_808DFF18[this->unk_148]; } @@ -142,7 +142,7 @@ void EnHorseLinkChild_Init(Actor* thisx, PlayState* play) { ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawHorse, 20.0f); this->unk_144 = 1; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.focus.pos = this->actor.world.pos; this->actor.focus.pos.y += 70.0f; @@ -186,7 +186,7 @@ void func_808DE9A8(EnHorseLinkChild* this) { } void func_808DEA0C(EnHorseLinkChild* this, PlayState* play) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; if (SkelAnime_Update(&this->skin.skelAnime)) { func_808DE9A8(this); } @@ -194,7 +194,7 @@ void func_808DEA0C(EnHorseLinkChild* this, PlayState* play) { void func_808DEA54(EnHorseLinkChild* this, s32 arg1) { this->unk_144 = 2; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; if ((arg1 != 0) && (arg1 != 1)) { arg1 = 0; @@ -237,7 +237,7 @@ void func_808DEB14(EnHorseLinkChild* this, PlayState* play) { void func_808DECA0(EnHorseLinkChild* this) { this->unk_144 = 1; this->unk_148 = 0; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; Animation_Change(&this->skin.skelAnime, D_808DFEC0[this->unk_148], func_808DE728(this), 0.0f, Animation_GetLastFrame(D_808DFEC0[this->unk_148]), ANIMMODE_ONCE, -5.0f); } @@ -268,14 +268,14 @@ void func_808DED40(EnHorseLinkChild* this, PlayState* play) { if ((temp_fv0 < 1000.0f) && (temp_fv0 >= 300.0f)) { phi_v0 = 4; - this->actor.speedXZ = 6.0f; + this->actor.speed = 6.0f; } else if ((temp_fv0 < 300.0f) && (temp_fv0 >= 150.0f)) { phi_v0 = 3; - this->actor.speedXZ = 4.0f; + this->actor.speed = 4.0f; } else if ((temp_fv0 < 150.0f) && (temp_fv0 >= 70.0f)) { phi_v0 = 2; this->unk_1E8 = 0; - this->actor.speedXZ = 2.0f; + this->actor.speed = 2.0f; } else { func_808DEA54(this, 1); return; @@ -295,7 +295,7 @@ void func_808DED40(EnHorseLinkChild* this, PlayState* play) { void func_808DEFE8(EnHorseLinkChild* this) { this->unk_144 = 3; this->unk_148 = 0; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; Animation_Change(&this->skin.skelAnime, D_808DFEC0[this->unk_148], func_808DE728(this), 0.0f, Animation_GetLastFrame(D_808DFEC0[this->unk_148]), ANIMMODE_ONCE, -5.0f); } @@ -353,16 +353,16 @@ void func_808DF194(EnHorseLinkChild* this, PlayState* play) { if (Math3D_Distance(&player->actor.world.pos, &this->actor.home.pos) > 250.0f) { if (sp44 >= 300.0f) { sp48 = 4; - this->actor.speedXZ = 6.0f; + this->actor.speed = 6.0f; } else if ((sp44 < 300.0f) && (sp44 >= 150.0f)) { sp48 = 3; - this->actor.speedXZ = 4.0f; + this->actor.speed = 4.0f; } else if ((sp44 < 150.0f) && (sp44 >= 70.0f)) { sp48 = 2; this->unk_1E8 = 0; - this->actor.speedXZ = 2.0f; + this->actor.speed = 2.0f; } else { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; if (this->unk_148 == 0) { sp48 = (sp4C == 1) ? 1 : 0; } else { @@ -371,16 +371,16 @@ void func_808DF194(EnHorseLinkChild* this, PlayState* play) { } } else if (sp50 < 200.0f) { sp48 = 4; - this->actor.speedXZ = 6.0f; + this->actor.speed = 6.0f; } else if (sp50 < 300.0f) { sp48 = 3; - this->actor.speedXZ = 4.0f; + this->actor.speed = 4.0f; } else if (sp50 < 400.0f) { sp48 = 2; this->unk_1E8 = 0; - this->actor.speedXZ = 2.0f; + this->actor.speed = 2.0f; } else { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; if (this->unk_148 == 0) { sp48 = (sp4C == 1) ? 1 : 0; } else { @@ -388,7 +388,7 @@ void func_808DF194(EnHorseLinkChild* this, PlayState* play) { } } } else { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; if (this->unk_148 == 0) { sp48 = (sp4C == 1) ? 1 : 0; } else { @@ -432,7 +432,7 @@ void func_808DF620(EnHorseLinkChild* this, PlayState* play) { return; } - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; sp36 = Actor_WorldYawTowardActor(&this->actor, &GET_PLAYER(play)->actor) - this->actor.world.rot.y; if ((Math_CosS(sp36) < 0.7071f) && (this->unk_148 == 2)) { @@ -455,7 +455,7 @@ void func_808DF788(EnHorseLinkChild* this) { this->unk_144 = 4; this->unk_148 = 2; this->unk_1E0 = 0; - this->actor.speedXZ = 2.0f; + this->actor.speed = 2.0f; Animation_Change(&this->skin.skelAnime, D_808DFEC0[this->unk_148], func_808DE728(this), 0.0f, Animation_GetLastFrame(D_808DFEC0[this->unk_148]), ANIMMODE_ONCE, -5.0f); } @@ -488,25 +488,25 @@ void func_808DF838(EnHorseLinkChild* this, PlayState* play) { if (this->unk_1E0 == 0) { if (phi_fv0 >= 300.0f) { phi_v0 = 4; - this->actor.speedXZ = 6.0f; + this->actor.speed = 6.0f; } else if (phi_fv0 >= 150.0f) { phi_v0 = 3; - this->actor.speedXZ = 4.0f; + this->actor.speed = 4.0f; } else { phi_v0 = 2; this->unk_1E8 = 0; - this->actor.speedXZ = 2.0f; + this->actor.speed = 2.0f; } } else if (phi_fv0 >= 300.0f) { phi_v0 = 4; - this->actor.speedXZ = 6.0f; + this->actor.speed = 6.0f; } else if (phi_fv0 >= 150.0f) { phi_v0 = 3; - this->actor.speedXZ = 4.0f; + this->actor.speed = 4.0f; } else if (phi_fv0 >= 70.0f) { phi_v0 = 2; this->unk_1E8 = 0; - this->actor.speedXZ = 2.0f; + this->actor.speed = 2.0f; } else { func_808DF560(this); return; diff --git a/src/overlays/actors/ovl_En_Ik/z_en_ik.c b/src/overlays/actors/ovl_En_Ik/z_en_ik.c index 7c22aa4111..727e0f782d 100644 --- a/src/overlays/actors/ovl_En_Ik/z_en_ik.c +++ b/src/overlays/actors/ovl_En_Ik/z_en_ik.c @@ -375,7 +375,7 @@ void EnIk_SetupIdle(EnIk* this) { Animation_Change(&this->skelAnime, &gIronKnuckleEndHorizontalAttackAnim, 1.0f, frameCount, frameCount, ANIMMODE_ONCE, this->timer); this->actionFunc = EnIk_Idle; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } void EnIk_Idle(EnIk* this, PlayState* play) { @@ -397,7 +397,7 @@ void EnIk_Idle(EnIk* this, PlayState* play) { void EnIk_SetupWalk(EnIk* this) { Animation_MorphToLoop(&this->skelAnime, &gIronKnuckleWalkAnim, -4.0f); - this->actor.speedXZ = 0.9f; + this->actor.speed = 0.9f; this->actor.world.rot.y = this->actor.shape.rot.y; this->actionFunc = EnIk_WalkTowardsPlayer; } @@ -425,7 +425,7 @@ void EnIk_WalkTowardsPlayer(EnIk* this, PlayState* play) { void EnIk_SetupRun(EnIk* this) { Animation_MorphToLoop(&this->skelAnime, &gIronKnuckleRunAnim, -4.0f); Actor_PlaySfx(&this->actor, NA_SE_EN_TWINROBA_SHOOT_VOICE); - this->actor.speedXZ = 2.5f; + this->actor.speed = 2.5f; this->actor.world.rot.y = this->actor.shape.rot.y; this->actionFunc = EnIk_RunTowardsPlayer; } @@ -454,7 +454,7 @@ void EnIk_SetupVerticalAttack(EnIk* this) { s32 pad; f32 playbackSpeed; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; if (this->drawArmorFlags) { playbackSpeed = 1.5f; } else { @@ -488,11 +488,11 @@ void EnIk_VerticalAttack(EnIk* this, PlayState* play) { if ((this->skelAnime.curFrame > 13.0f) && (this->skelAnime.curFrame < 23.0f)) { this->colliderQuad.base.atFlags |= AT_ON; if (this->drawArmorFlags) { - this->actor.speedXZ = sin_rad((this->skelAnime.curFrame - 13.0f) * (M_PI / 20)) * 10.0f; + this->actor.speed = sin_rad((this->skelAnime.curFrame - 13.0f) * (M_PI / 20)) * 10.0f; } } else { this->colliderQuad.base.atFlags &= ~AT_ON; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } if ((this->drawArmorFlags) && (this->skelAnime.curFrame < 13.0f)) { @@ -525,7 +525,7 @@ void EnIk_TakeOutAxe(EnIk* this, PlayState* play) { } void EnIk_SetupHorizontalDoubleAttack(EnIk* this) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; Animation_Change(&this->skelAnime, &gIronKnuckleHorizontalAttackAnim, (this->drawArmorFlags) ? 1.3f : 1.0f, 0.0f, Animation_GetLastFrame(&gIronKnuckleHorizontalAttackAnim.common), ANIMMODE_ONCE_INTERP, (this->drawArmorFlags) ? 4.0f : 10.0f); @@ -551,12 +551,12 @@ void EnIk_HorizontalDoubleAttack(EnIk* this, PlayState* play) { } else { phi_f2 = this->skelAnime.curFrame - 1.0f; } - this->actor.speedXZ = sin_rad((M_PI / 8) * phi_f2) * 4.5f; + this->actor.speed = sin_rad((M_PI / 8) * phi_f2) * 4.5f; } this->colliderQuad.base.atFlags |= AT_ON; } else { this->colliderQuad.base.atFlags &= ~AT_ON; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } if (SkelAnime_Update(&this->skelAnime)) { EnIk_SetupEndHorizontalAttack(this); @@ -566,7 +566,7 @@ void EnIk_HorizontalDoubleAttack(EnIk* this, PlayState* play) { void EnIk_SetupSingleHorizontalAttack(EnIk* this) { f32 playSpeed; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; if (this->drawArmorFlags) { this->actor.world.rot.z = 0x1000; playSpeed = 1.3f; @@ -611,7 +611,7 @@ void EnIk_EndHorizontalAttack(EnIk* this, PlayState* play) { } void EnIk_SetupBlock(EnIk* this) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; Animation_Change(&this->skelAnime, &gIronKnuckleBlockAnim, 2.0f, 0.0f, Animation_GetLastFrame(&gIronKnuckleBlockAnim), ANIMMODE_ONCE, -2.0f); this->timer = 20; @@ -634,7 +634,7 @@ void EnIk_SetupReactToAttack(EnIk* this, s32 arg1) { if (arg1) { func_800BE504(&this->actor, &this->colliderCylinder); } - this->actor.speedXZ = 6.0f; + this->actor.speed = 6.0f; temp_v0 = (this->actor.world.rot.y - this->actor.shape.rot.y) + 0x8000; if (ABS_ALT(temp_v0) <= 0x4000) { Animation_MorphToPlayOnce(&this->skelAnime, &gIronKnuckleFrontHitAnim, -4.0f); @@ -645,7 +645,7 @@ void EnIk_SetupReactToAttack(EnIk* this, s32 arg1) { } void EnIk_ReactToAttack(EnIk* this, PlayState* play) { - Math_StepToF(&this->actor.speedXZ, 0.0f, 1.0f); + Math_StepToF(&this->actor.speed, 0.0f, 1.0f); if (this->subCamId != SUB_CAM_ID_DONE) { Play_SetCameraAtEye(play, this->subCamId, &this->actor.focus.pos, &Play_GetCamera(play, this->subCamId)->eye); } @@ -664,7 +664,7 @@ void EnIk_ReactToAttack(EnIk* this, PlayState* play) { } void EnIk_SetupDie(EnIk* this) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; Animation_MorphToPlayOnce(&this->skelAnime, &gIronKnuckleDeathAnim, -4.0f); this->timer = 24; Actor_PlaySfx(&this->actor, NA_SE_EN_IRONNACK_DEAD); @@ -705,7 +705,7 @@ void EnIk_Die(EnIk* this, PlayState* play) { void EnIk_SetupFrozen(EnIk* this) { this->invincibilityFrames = 0; this->actionFunc = EnIk_Frozen; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } void EnIk_Frozen(EnIk* this, PlayState* play) { @@ -724,7 +724,7 @@ void EnIk_Frozen(EnIk* this, PlayState* play) { void EnIk_SetupCutscene(EnIk* this) { ActorCutscene_SetIntentToPlay(this->actor.cutscene); - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; if (this->actor.colChkInfo.health != 0) { func_800BE504(&this->actor, &this->colliderCylinder); } diff --git a/src/overlays/actors/ovl_En_In/z_en_in.c b/src/overlays/actors/ovl_En_In/z_en_in.c index df5c41b029..3da8062f40 100644 --- a/src/overlays/actors/ovl_En_In/z_en_in.c +++ b/src/overlays/actors/ovl_En_In/z_en_in.c @@ -287,8 +287,8 @@ void func_808F3690(EnIn* this, PlayState* play) { s16 sp36; Vec3f sp28; - Math_SmoothStepToF(&this->actor.speedXZ, 1.0f, 0.4f, 1000.0f, 0.0f); - sp36 = this->actor.speedXZ * 400.0f; + Math_SmoothStepToF(&this->actor.speed, 1.0f, 0.4f, 1000.0f, 0.0f); + sp36 = this->actor.speed * 400.0f; if (SubS_CopyPointFromPath(this->path, this->unk244, &sp28) && SubS_MoveActorToPoint(&this->actor, &sp28, sp36)) { this->unk244++; if (this->unk244 >= this->path->count) { diff --git a/src/overlays/actors/ovl_En_Insect/z_en_insect.c b/src/overlays/actors/ovl_En_Insect/z_en_insect.c index 9031e9ed34..69e3c8eb8d 100644 --- a/src/overlays/actors/ovl_En_Insect/z_en_insect.c +++ b/src/overlays/actors/ovl_En_Insect/z_en_insect.c @@ -181,9 +181,9 @@ void func_8091AC78(EnInsect* this) { void func_8091ACC4(EnInsect* this, PlayState* play) { f32 temp_f2; - Math_SmoothStepToF(&this->actor.speedXZ, 0.0f, 0.1f, 0.5f, 0.0f); + Math_SmoothStepToF(&this->actor.speed, 0.0f, 0.1f, 0.5f, 0.0f); - temp_f2 = (Rand_ZeroOne() * 0.8f) + (this->actor.speedXZ * 1.2f); + temp_f2 = (Rand_ZeroOne() * 0.8f) + (this->actor.speed * 1.2f); if (temp_f2 < 0.0f) { this->skelAnime.playSpeed = 0.0f; } else { @@ -218,7 +218,7 @@ void func_8091AE5C(EnInsect* this, PlayState* play) { s32 pad; f32 temp_f0; - Math_SmoothStepToF(&this->actor.speedXZ, 1.5f, 0.1f, 0.5f, 0.0f); + Math_SmoothStepToF(&this->actor.speed, 1.5f, 0.1f, 0.5f, 0.0f); if ((EnInsect_XZDistanceSquared(&this->actor.world.pos, &this->actor.home.pos) > SQ(40.0f)) || (this->unk_312 < 4)) { @@ -231,7 +231,7 @@ void func_8091AE5C(EnInsect* this, PlayState* play) { this->actor.shape.rot.y = this->actor.world.rot.y; - temp_f0 = this->actor.speedXZ * 1.4f; + temp_f0 = this->actor.speed * 1.4f; this->skelAnime.playSpeed = CLAMP(temp_f0, 0.7f, 1.9f); SkelAnime_Update(&this->skelAnime); @@ -261,7 +261,7 @@ void func_8091B07C(EnInsect* this, PlayState* play) { s16 yaw; s32 sp38 = this->actor.xzDistToPlayer < 40.0f; - Math_SmoothStepToF(&this->actor.speedXZ, 1.8f, 0.1f, 0.5f, 0.0f); + Math_SmoothStepToF(&this->actor.speed, 1.8f, 0.1f, 0.5f, 0.0f); if ((EnInsect_XZDistanceSquared(&this->actor.world.pos, &this->actor.home.pos) > SQ(160.0f)) || (this->unk_312 < 4)) { @@ -284,7 +284,7 @@ void func_8091B07C(EnInsect* this, PlayState* play) { this->actor.shape.rot.y = this->actor.world.rot.y; - speed = this->actor.speedXZ * 1.6f; + speed = this->actor.speed * 1.6f; this->skelAnime.playSpeed = CLAMP(speed, 0.8f, 1.9f); SkelAnime_Update(&this->skelAnime); @@ -299,7 +299,7 @@ void func_8091B274(EnInsect* this) { this->unk_312 = 200; Actor_SetScale(&this->actor, 0.001f); this->actor.draw = NULL; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->skelAnime.playSpeed = 0.3f; this->actionFunc = func_8091B2D8; this->unk_30C &= ~0x100; @@ -336,7 +336,7 @@ void func_8091B440(EnInsect* this, PlayState* play) { s32 pad[2]; Vec3f sp34; - Math_SmoothStepToF(&this->actor.speedXZ, 0.0f, 0.1f, 0.5f, 0.0f); + Math_SmoothStepToF(&this->actor.speed, 0.0f, 0.1f, 0.5f, 0.0f); Math_StepToS(&this->actor.shape.rot.x, 0x2AAA, 0x160); Actor_SetScale(&this->actor, CLAMP_MIN(this->actor.scale.x - 0.0002f, 0.001f)); @@ -373,9 +373,9 @@ void func_8091B670(EnInsect* this, PlayState* play) { Vec3f sp40; if (this->unk_312 > 80) { - Math_StepToF(&this->actor.speedXZ, 0.6f, 0.08f); + Math_StepToF(&this->actor.speed, 0.6f, 0.08f); } else { - Math_StepToF(&this->actor.speedXZ, 0.0f, 0.02f); + Math_StepToF(&this->actor.speed, 0.0f, 0.02f); } this->actor.velocity.y = 0.0f; @@ -417,7 +417,7 @@ void func_8091B670(EnInsect* this, PlayState* play) { void func_8091B928(EnInsect* this) { this->unk_312 = 100; this->actor.velocity.y = 0.0f; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.terminalVelocity = -0.8f; this->actor.gravity = -0.04f; this->unk_30C &= ~1; diff --git a/src/overlays/actors/ovl_En_Invadepoh/z_en_invadepoh.c b/src/overlays/actors/ovl_En_Invadepoh/z_en_invadepoh.c index 5d16c1fcde..ecc6a57c43 100644 --- a/src/overlays/actors/ovl_En_Invadepoh/z_en_invadepoh.c +++ b/src/overlays/actors/ovl_En_Invadepoh/z_en_invadepoh.c @@ -1078,13 +1078,13 @@ void func_80B447C0(EnInvadepoh* this, PlayState* play) { void func_80B44A90(EnInvadepoh* this, PlayState* play) { if (this->actor.bgCheckFlags & 1) { this->actor.velocity.y *= 0.3f; - this->actor.speedXZ *= 0.8f; + this->actor.speed *= 0.8f; } else if (this->actor.bgCheckFlags & 8) { this->actor.velocity.y *= 0.8f; - this->actor.speedXZ *= 0.3f; + this->actor.speed *= 0.3f; } else { this->actor.velocity.y *= 0.8f; - this->actor.speedXZ *= 0.8f; + this->actor.speed *= 0.8f; } Actor_MoveWithGravity(&this->actor); Actor_UpdateBgCheckInfo(play, &this->actor, 30.0f, 40.0f, 0.0f, 5); @@ -1151,7 +1151,7 @@ s32 func_80B44C80(EnInvadepoh* this, PlayState* play) { temp_f0_3 = temp_f0 - this->actor.world.pos.x; temp_f0_2 = temp_f2 - this->actor.world.pos.z; - if (this->actor.speedXZ > 0.0f) { + if (this->actor.speed > 0.0f) { if (Math3D_AngleBetweenVectors(&sp6C, &sp60, &sp44) != 0) { sp40 = 1; } else if (sp44 <= 0.0f) { @@ -2309,7 +2309,7 @@ void func_80B47D30(Actor* thisx, PlayState* play) { if (D_80B4E940 == 3) { if ((this->actionFunc == func_80B477B4) || (this->actionFunc == func_80B47600)) { - thisx->speedXZ = 0.0f; + thisx->speed = 0.0f; thisx->velocity.y = 0.0f; thisx->gravity = 0.0f; func_80B47830(this); @@ -2320,8 +2320,8 @@ void func_80B47D30(Actor* thisx, PlayState* play) { } else if (this->collider.base.acFlags & AC_HIT) { Actor* acAttached = this->collider.base.ac; - thisx->speedXZ = acAttached->speedXZ * 0.5f; - thisx->speedXZ = CLAMP(thisx->speedXZ, -60.0f, 60.0f); + thisx->speed = acAttached->speed * 0.5f; + thisx->speed = CLAMP(thisx->speed, -60.0f, 60.0f); thisx->world.rot.y = acAttached->world.rot.y; thisx->gravity = 0.0f; thisx->velocity.y = acAttached->velocity.y * 0.5f; @@ -2564,11 +2564,11 @@ void func_80B487B4(EnInvadepoh* this) { void func_80B48848(EnInvadepoh* this, PlayState* play) { s32 pad; - Math_StepToF(&this->actor.speedXZ, 1.6f, 0.1f); - if (func_80B44B84(this, play, this->actor.speedXZ, 50.0f)) { + Math_StepToF(&this->actor.speed, 1.6f, 0.1f); + if (func_80B44B84(this, play, this->actor.speed, 50.0f)) { func_80B44514(this); this->behaviorInfo.unk4C = 0xC8; - this->actor.speedXZ *= 0.25f; + this->actor.speed *= 0.25f; } else { Math_StepToS(&this->behaviorInfo.unk4C, 0x7D0, 0x46); } @@ -2628,8 +2628,8 @@ void func_80B48AD4(EnInvadepoh* this, PlayState* play) { s16 temp_v1; s32 temp_v1_3; - Math_StepToF(&this->actor.speedXZ, 0.0f, 0.2f); - if (func_80B44B84(this, play, this->actor.speedXZ, 50.0f)) { + Math_StepToF(&this->actor.speed, 0.0f, 0.2f); + if (func_80B44B84(this, play, this->actor.speed, 50.0f)) { func_80B44514(this); } @@ -2687,7 +2687,7 @@ void func_80B48AD4(EnInvadepoh* this, PlayState* play) { void func_80B48DE4(EnInvadepoh* this) { AlienBehaviorInfo* substruct = &this->behaviorInfo; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; Animation_MorphToLoop(&this->skelAnime, &gRomaniIdleAnim, -10.0f); this->behaviorInfo.unk4C = 0; substruct->unk30 = 0.05f; @@ -2836,13 +2836,13 @@ void func_80B49454(EnInvadepoh* this, PlayState* play) { Math_Vec3f_Sum(&D_80B4EDD0[this->unk3AC], &this->actor.home.pos, &sp30); if (Math3D_Vec3fDistSq(&this->actor.world.pos, &sp30) < SQ(400.0f)) { - this->actor.speedXZ *= 0.8f; + this->actor.speed *= 0.8f; } else { - Math_StepToF(&this->actor.speedXZ, 170.0f, 21.0f); - this->actor.speedXZ *= 0.98f; + Math_StepToF(&this->actor.speed, 170.0f, 21.0f); + this->actor.speed *= 0.98f; } - if (func_80B450C0(&this->actor.world.pos.x, &this->actor.world.pos.z, sp30.x, sp30.z, this->actor.speedXZ)) { - this->actor.speedXZ = 0.0f; + if (func_80B450C0(&this->actor.world.pos.x, &this->actor.world.pos.z, sp30.x, sp30.z, this->actor.speed)) { + this->actor.speed = 0.0f; } if (sp30.y < this->actor.world.pos.y) { Math_StepToF(&this->actor.gravity, -12.0f, 7.0f); @@ -2877,9 +2877,9 @@ void func_80B49670(EnInvadepoh* this, PlayState* play) { sp30.z = this->actor.home.pos.z; Math_SmoothStepToS(&this->actor.world.rot.y, Math_Vec3f_Yaw(&this->actor.world.pos, &sp30), 0xA, 0xBB8, 0x64); if ((play->gameplayFrames % 64) < 14) { - Math_StepToF(&this->actor.speedXZ, 5.0f, 1.0f); + Math_StepToF(&this->actor.speed, 5.0f, 1.0f); } else { - this->actor.speedXZ *= 0.97f; + this->actor.speed *= 0.97f; } if (sp30.y < this->actor.world.pos.y) { this->actor.gravity = -0.5f; @@ -2910,7 +2910,7 @@ void func_80B497EC(EnInvadepoh* this, PlayState* play) { sp30.y = this->actor.home.pos.y + D_80B4E934.y + 400.0f; sp30.z = this->actor.home.pos.z + D_80B4E934.z; Math_SmoothStepToS(&this->actor.world.rot.y, Math_Vec3f_Yaw(&this->actor.world.pos, &sp30), 4, 0x1F40, 0x64); - Math_StepToF(&this->actor.speedXZ, 70.0f, 3.0f); + Math_StepToF(&this->actor.speed, 70.0f, 3.0f); if (sp30.y < this->actor.world.pos.y) { this->actor.gravity = -2.0f; } else { @@ -2935,7 +2935,7 @@ void func_80B49904(EnInvadepoh* this) { } void func_80B4994C(EnInvadepoh* this, PlayState* play) { - Math_StepToF(&this->actor.speedXZ, 150.0f, 4.0f); + Math_StepToF(&this->actor.speed, 150.0f, 4.0f); this->actor.velocity.y *= 0.95f; Actor_MoveWithGravity(&this->actor); if (this->actionTimer > 0) { @@ -2950,7 +2950,7 @@ void func_80B499BC(EnInvadepoh* this) { this->scaleTarget = 0.2f; this->scaleStep = 0.01f; this->unk3AA = 3000; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actionFunc = func_80B49A00; } @@ -2962,7 +2962,7 @@ void func_80B49A00(EnInvadepoh* this, PlayState* play) { sp30.y = this->actor.home.pos.y + 800.0f; sp30.z = this->actor.home.pos.z; Math_SmoothStepToS(&this->actor.world.rot.y, Math_Vec3f_Yaw(&this->actor.world.pos, &sp30), 4, 0x1F40, 0x64); - Math_StepToF(&this->actor.speedXZ, 30.0f, 3.0f); + Math_StepToF(&this->actor.speed, 30.0f, 3.0f); this->actor.velocity.y *= 0.98f; if (sp30.y < this->actor.world.pos.y) { this->actor.gravity = -0.5f; @@ -3234,11 +3234,11 @@ void func_80B4A614(EnInvadepoh* this) { void func_80B4A67C(EnInvadepoh* this, PlayState* play) { s32 pad; - Math_StepToF(&this->actor.speedXZ, 5.0f, 1.0f); - if (func_80B44B84(this, play, this->actor.speedXZ, 50.0f)) { + Math_StepToF(&this->actor.speed, 5.0f, 1.0f); + if (func_80B44B84(this, play, this->actor.speed, 50.0f)) { func_80B44640(this); this->behaviorInfo.unk4C = 0x5DC; - this->actor.speedXZ *= 0.5f; + this->actor.speed *= 0.5f; } else { Math_StepToS(&this->behaviorInfo.unk4C, 0x190, 0x32); } @@ -3539,7 +3539,7 @@ void func_80B4B430(EnInvadepoh* this) { } void func_80B4B484(EnInvadepoh* this, PlayState* play) { - Math_StepToF(&this->actor.speedXZ, 1.1f, 0.5f); + Math_StepToF(&this->actor.speed, 1.1f, 0.5f); if (func_80B44C80(this, play)) { func_80B44690(this); } @@ -3566,17 +3566,17 @@ void func_80B4B564(EnInvadepoh* this, PlayState* play) { Vec3f sp28; f32 temp_f0; - Math_StepToF(&this->actor.speedXZ, 3.8f, 0.45f); + Math_StepToF(&this->actor.speed, 3.8f, 0.45f); if (this->unk3BC >= 0) { Math_Vec3s_ToVec3f(&sp28, &this->pathPoints[this->unk3BC]); temp_f0 = Math3D_Vec3fDistSq(&this->actor.world.pos, &sp28); if (temp_f0 < SQ(80.0f)) { - this->actor.speedXZ *= 0.85f; + this->actor.speed *= 0.85f; } else if (temp_f0 < SQ(150.0f)) { - this->actor.speedXZ *= 0.93f; + this->actor.speed *= 0.93f; } else if (temp_f0 < SQ(250.0f)) { - this->actor.speedXZ *= 0.96f; + this->actor.speed *= 0.96f; } if (this->pathIndex == this->unk3BC || temp_f0 < SQ(50.0f)) { this->actionTimer = 0; @@ -3607,7 +3607,7 @@ void func_80B4B724(EnInvadepoh* this) { void func_80B4B768(EnInvadepoh* this, PlayState* play) { s32 pad; - Math_StepToF(&this->actor.speedXZ, 0.0f, 1.0f); + Math_StepToF(&this->actor.speed, 0.0f, 1.0f); Math_SmoothStepToS(&this->actor.world.rot.y, Actor_WorldYawTowardActor(&this->actor, &D_80B5040C->actor), 5, 0x1388, 0x64); func_80B44E90(this, play); @@ -3625,7 +3625,7 @@ void func_80B4B820(EnInvadepoh* this) { } void func_80B4B864(EnInvadepoh* this, PlayState* play) { - Math_StepToF(&this->actor.speedXZ, 0.5f, 1.0f); + Math_StepToF(&this->actor.speed, 0.5f, 1.0f); func_80B44E90(this, play); if (this->animPlayFlag) { func_80B4B510(this); diff --git a/src/overlays/actors/ovl_En_Ishi/z_en_ishi.c b/src/overlays/actors/ovl_En_Ishi/z_en_ishi.c index f911bc4f4f..b27111ca01 100644 --- a/src/overlays/actors/ovl_En_Ishi/z_en_ishi.c +++ b/src/overlays/actors/ovl_En_Ishi/z_en_ishi.c @@ -554,8 +554,8 @@ void func_8095E95C(EnIshi* this, PlayState* play) { void func_8095EA70(EnIshi* this) { f32 sp24; - this->actor.velocity.x = Math_SinS(this->actor.world.rot.y) * this->actor.speedXZ; - this->actor.velocity.z = Math_CosS(this->actor.world.rot.y) * this->actor.speedXZ; + this->actor.velocity.x = Math_SinS(this->actor.world.rot.y) * this->actor.speed; + this->actor.velocity.z = Math_CosS(this->actor.world.rot.y) * this->actor.speed; if (!ENISHI_GET_1(&this->actor)) { sp24 = Rand_ZeroOne() - 0.9f; D_8095F690 = sp24 * 11000.0f; diff --git a/src/overlays/actors/ovl_En_Jg/z_en_jg.c b/src/overlays/actors/ovl_En_Jg/z_en_jg.c index e7c2ad78d0..6aea8641b8 100644 --- a/src/overlays/actors/ovl_En_Jg/z_en_jg.c +++ b/src/overlays/actors/ovl_En_Jg/z_en_jg.c @@ -434,7 +434,7 @@ void EnJg_AlternateTalkOrWalkInPlace(EnJg* this, PlayState* play) { this->actionFunc = EnJg_Walk; } } else if (this->animIndex == EN_JG_ANIM_WALK) { - Math_ApproachF(&this->actor.speedXZ, 0.0f, 0.2f, 1.0f); + Math_ApproachF(&this->actor.speed, 0.0f, 0.2f, 1.0f); EnJg_CheckIfTalkingToPlayerAndHandleFreezeTimer(this, play); } } @@ -459,10 +459,10 @@ void EnJg_Walk(EnJg* this, PlayState* play) { this->actionFunc = EnJg_AlternateTalkOrWalkInPlace; } else { this->currentPoint++; - Math_ApproachF(&this->actor.speedXZ, 0.5f, 0.2f, 1.0f); + Math_ApproachF(&this->actor.speed, 0.5f, 0.2f, 1.0f); } } else { - Math_ApproachF(&this->actor.speedXZ, 0.5f, 0.2f, 1.0f); + Math_ApproachF(&this->actor.speed, 0.5f, 0.2f, 1.0f); } } @@ -903,7 +903,7 @@ void EnJg_CheckIfTalkingToPlayerAndHandleFreezeTimer(EnJg* this, PlayState* play if (Actor_ProcessTalkRequest(&this->actor, &play->state)) { this->flags |= FLAG_LOOKING_AT_PLAYER; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; if (this->textId == 0xDAC) { this->action = EN_JG_ACTION_FIRST_THAW; diff --git a/src/overlays/actors/ovl_En_Js/z_en_js.c b/src/overlays/actors/ovl_En_Js/z_en_js.c index ecfaa6b8ba..5a5233d834 100644 --- a/src/overlays/actors/ovl_En_Js/z_en_js.c +++ b/src/overlays/actors/ovl_En_Js/z_en_js.c @@ -254,7 +254,7 @@ s32 func_80968CB8(EnJs* this) { return true; } - Math_StepToF(&this->actor.speedXZ, this->unk_2B4, 0.5f); + Math_StepToF(&this->actor.speed, this->unk_2B4, 0.5f); return false; } @@ -667,7 +667,7 @@ void func_80969B5C(EnJs* this, PlayState* play) { } if (Actor_ProcessTalkRequest(&this->actor, &play->state)) { this->actionFunc = func_80969898; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->unk_2B4 = 0.0f; func_80969AA0(this, play); } else if ((this->actor.xzDistToPlayer < 100.0f) && Player_IsFacingActor(&this->actor, 0x3000, play)) { diff --git a/src/overlays/actors/ovl_En_Kaizoku/z_en_kaizoku.c b/src/overlays/actors/ovl_En_Kaizoku/z_en_kaizoku.c index fbe97b109c..49928a3695 100644 --- a/src/overlays/actors/ovl_En_Kaizoku/z_en_kaizoku.c +++ b/src/overlays/actors/ovl_En_Kaizoku/z_en_kaizoku.c @@ -492,7 +492,7 @@ void func_80B85FA8(EnKaizoku* this, PlayState* play) { player->actor.world.pos.z = this->picto.actor.home.pos.z - 30.0f; } - player->actor.speedXZ = 0.0f; + player->actor.speed = 0.0f; this->picto.actor.world.pos.x = this->picto.actor.home.pos.x; this->picto.actor.world.pos.z = this->picto.actor.home.pos.z; Message_StartTextbox(play, D_80B8A8D0[sp54], &this->picto.actor); @@ -681,7 +681,7 @@ void func_80B86804(EnKaizoku* this, PlayState* play) { this->unk_2D8 = 0; this->action = KAIZOKU_ACTION_0; this->actionFunc = func_80B868B8; - this->picto.actor.speedXZ = 0.0f; + this->picto.actor.speed = 0.0f; } void func_80B868B8(EnKaizoku* this, PlayState* play) { @@ -888,7 +888,7 @@ void func_80B86B74(EnKaizoku* this, PlayState* play) { } void func_80B872A4(EnKaizoku* this) { - this->picto.actor.speedXZ = 0.0f; + this->picto.actor.speed = 0.0f; EnKaizoku_ChangeAnim(this, EN_KAIZOKU_ANIM_0); this->action = KAIZOKU_ACTION_1; this->actionFunc = func_80B872F4; @@ -928,13 +928,13 @@ void func_80B874D8(EnKaizoku* this, PlayState* play) { EnKaizoku_ChangeAnim(this, EN_KAIZOKU_ANIM_3); if (Math_SinS(player->actor.shape.rot.y - this->picto.actor.shape.rot.y) > 0.0f) { - this->picto.actor.speedXZ = -10.0f; + this->picto.actor.speed = -10.0f; } else if (Math_SinS(player->actor.shape.rot.y - this->picto.actor.shape.rot.y) < 0.0f) { - this->picto.actor.speedXZ = 10.0f; + this->picto.actor.speed = 10.0f; } else if (Rand_ZeroOne() > 0.5f) { - this->picto.actor.speedXZ = 10.0f; + this->picto.actor.speed = 10.0f; } else { - this->picto.actor.speedXZ = -10.0f; + this->picto.actor.speed = -10.0f; } this->skelAnime.playSpeed = 1.0f; @@ -952,17 +952,17 @@ void func_80B8760C(EnKaizoku* this, PlayState* play) { this->picto.actor.world.rot.y = this->picto.actor.yawTowardsPlayer + 0x3A98; if ((this->picto.actor.bgCheckFlags & 8) || - !Actor_TestFloorInDirection(&this->picto.actor, play, this->picto.actor.speedXZ, + !Actor_TestFloorInDirection(&this->picto.actor, play, this->picto.actor.speed, this->picto.actor.shape.rot.y + 0x4000)) { if (this->picto.actor.bgCheckFlags & 8) { - if (this->picto.actor.speedXZ >= 0.0f) { + if (this->picto.actor.speed >= 0.0f) { var_v0 = this->picto.actor.shape.rot.y + 0x4000; } else { var_v0 = this->picto.actor.shape.rot.y - 0x4000; } var_v0 = this->picto.actor.wallYaw - var_v0; } else { - this->picto.actor.speedXZ *= -0.8f; + this->picto.actor.speed *= -0.8f; var_v0 = 0; } @@ -1006,7 +1006,7 @@ void func_80B8760C(EnKaizoku* this, PlayState* play) { } } } else { - if (this->picto.actor.speedXZ >= 0.0f) { + if (this->picto.actor.speed >= 0.0f) { this->picto.actor.shape.rot.y += 0x4000; } else { this->picto.actor.shape.rot.y -= 0x4000; @@ -1021,7 +1021,7 @@ void func_80B87900(EnKaizoku* this) { this->swordState = -1; } this->unk_2D8 = 0; - this->picto.actor.speedXZ = 0.0f; + this->picto.actor.speed = 0.0f; this->unk_2B2 = Rand_S16Offset(10, 10); this->bodyCollider.base.acFlags |= AC_HARD; this->lookTimer = 12; @@ -1089,7 +1089,7 @@ void func_80B8798C(EnKaizoku* this, PlayState* play) { void func_80B87C7C(EnKaizoku* this) { EnKaizoku_ChangeAnim(this, EN_KAIZOKU_ANIM_8); - this->picto.actor.speedXZ = 6.5f; + this->picto.actor.speed = 6.5f; this->picto.actor.velocity.y = 15.0f; Actor_PlaySfx(&this->picto.actor, NA_SE_EN_TEKU_JUMP); this->picto.actor.world.rot.y = this->picto.actor.shape.rot.y; @@ -1126,7 +1126,7 @@ void func_80B87D3C(EnKaizoku* this, PlayState* play) { this->swordCollider.info.elemType = ELEMTYPE_UNK2; this->picto.actor.shape.rot.x = 0; this->picto.actor.world.rot.y = this->picto.actor.shape.rot.y = this->picto.actor.yawTowardsPlayer; - this->picto.actor.speedXZ = 0.0f; + this->picto.actor.speed = 0.0f; this->picto.actor.velocity.y = 0.0f; this->picto.actor.world.pos.y = this->picto.actor.floorHeight; func_80B87F70(this); @@ -1135,7 +1135,7 @@ void func_80B87D3C(EnKaizoku* this, PlayState* play) { void func_80B87E28(EnKaizoku* this) { EnKaizoku_ChangeAnim(this, EN_KAIZOKU_ANIM_8); - this->picto.actor.speedXZ = -8.0f; + this->picto.actor.speed = -8.0f; Actor_PlaySfx(&this->picto.actor, NA_SE_EN_TEKU_JUMP); this->bodyCollider.info.elemType = ELEMTYPE_UNK4; this->bodyCollider.base.colType = COLTYPE_NONE; @@ -1166,7 +1166,7 @@ void func_80B87F70(EnKaizoku* this) { EnKaizoku_ChangeAnim(this, EN_KAIZOKU_ANIM_9); this->unk_2D0 = 0; this->swordCollider.base.atFlags &= ~AT_BOUNCED; - this->picto.actor.speedXZ = 0.0f; + this->picto.actor.speed = 0.0f; AudioSfx_StopByPosAndId(&this->picto.actor.projectedPos, NA_SE_EN_PIRATE_BREATH); this->action = KAIZOKU_ACTION_9; this->actionFunc = func_80B87FDC; @@ -1182,7 +1182,7 @@ void func_80B87FDC(EnKaizoku* this, PlayState* play2) { curFrame = this->skelAnime.curFrame; sp2E = ABS_ALT(player->actor.shape.rot.y - this->picto.actor.shape.rot.y); sp2C = ABS_ALT(this->picto.actor.yawTowardsPlayer - this->picto.actor.shape.rot.y); - this->picto.actor.speedXZ = 0.0f; + this->picto.actor.speed = 0.0f; if (Animation_OnFrame(&this->skelAnime, 1.0f)) { Actor_PlaySfx(&this->picto.actor, NA_SE_EN_PIRATE_ATTACK); @@ -1233,7 +1233,7 @@ void func_80B87FDC(EnKaizoku* this, PlayState* play2) { void func_80B88214(EnKaizoku* this) { EnKaizoku_ChangeAnim(this, EN_KAIZOKU_ANIM_8); this->unk_2B2 = 0; - this->picto.actor.speedXZ = 10.0f; + this->picto.actor.speed = 10.0f; this->picto.actor.world.rot.y = this->picto.actor.shape.rot.y = this->picto.actor.yawTowardsPlayer; Actor_PlaySfx(&this->picto.actor, NA_SE_EN_TEKU_JUMP); this->action = KAIZOKU_ACTION_5; @@ -1245,7 +1245,7 @@ void func_80B88278(EnKaizoku* this, PlayState* play) { this->unk_2D8 = 0; if (this->frameCount <= curFrame) { - this->picto.actor.speedXZ = 0.0f; + this->picto.actor.speed = 0.0f; if (!Actor_IsFacingPlayer(&this->picto.actor, 0x1554)) { func_80B872A4(this); this->unk_2B2 = Rand_ZeroOne() * 5.0f + 5.0f; @@ -1274,11 +1274,11 @@ void func_80B88378(EnKaizoku* this, PlayState* play) { Math_SmoothStepToS(&this->picto.actor.shape.rot.y, this->picto.actor.yawTowardsPlayer, 1, 0x2EE, 0); this->picto.actor.world.rot.y = this->picto.actor.shape.rot.y; if (this->picto.actor.xzDistToPlayer <= 40.0f) { - Math_ApproachF(&this->picto.actor.speedXZ, -8.0f, 1.0f, 1.5f); + Math_ApproachF(&this->picto.actor.speed, -8.0f, 1.0f, 1.5f); } else if (this->picto.actor.xzDistToPlayer > 55.0f) { - Math_ApproachF(&this->picto.actor.speedXZ, 8.0f, 1.0f, 1.5f); + Math_ApproachF(&this->picto.actor.speed, 8.0f, 1.0f, 1.5f); } else { - Math_ApproachZeroF(&this->picto.actor.speedXZ, 2.0f, 6.65f); + Math_ApproachZeroF(&this->picto.actor.speed, 2.0f, 6.65f); } this->skelAnime.playSpeed = 1.0f; @@ -1375,7 +1375,7 @@ void func_80B88910(EnKaizoku* this) { this->unk_2D0 = 0; this->action = KAIZOKU_ACTION_11; this->actionFunc = func_80B88964; - this->picto.actor.speedXZ = 0.0f; + this->picto.actor.speed = 0.0f; } void func_80B88964(EnKaizoku* this, PlayState* play) { @@ -1400,10 +1400,10 @@ void func_80B88964(EnKaizoku* this, PlayState* play) { Actor_SpawnFloorDustRing(play, &this->picto.actor, &this->leftFootPos, 3.0f, 2, 2.0f, 0, 0, 0); Actor_SpawnFloorDustRing(play, &this->picto.actor, &this->rightFootPos, 3.0f, 2, 2.0f, 0, 0, 0); this->swordState = 1; - this->picto.actor.speedXZ = 10.0f; + this->picto.actor.speed = 10.0f; Actor_PlaySfx(&this->picto.actor, NA_SE_EN_PIRATE_ATTACK); } else if (Animation_OnFrame(&this->skelAnime, 21.0f)) { - this->picto.actor.speedXZ = 0.0f; + this->picto.actor.speed = 0.0f; } else if (Animation_OnFrame(&this->skelAnime, 24.0f)) { this->swordState = -1; } @@ -1453,7 +1453,7 @@ void func_80B88964(EnKaizoku* this, PlayState* play) { void func_80B88CD8(EnKaizoku* this) { EnKaizoku_ChangeAnim(this, EN_KAIZOKU_ANIM_3); - this->picto.actor.speedXZ = randPlusMinusPoint5Scaled(12.0f); + this->picto.actor.speed = randPlusMinusPoint5Scaled(12.0f); this->skelAnime.playSpeed = 1.0f; this->picto.actor.world.rot.y = this->picto.actor.shape.rot.y; this->unk_2B2 = Rand_ZeroOne() * 30.0f + 30.0f; @@ -1474,39 +1474,39 @@ void func_80B88D6C(EnKaizoku* this, PlayState* play) { this->picto.actor.world.rot.y = this->picto.actor.shape.rot.y + 0x4000; sp2A = player->actor.shape.rot.y + 0x8000; if (Math_SinS(sp2A - this->picto.actor.shape.rot.y) >= 0.0f) { - this->picto.actor.speedXZ -= 0.25f; - if (this->picto.actor.speedXZ < -8.0f) { - this->picto.actor.speedXZ = -8.0f; + this->picto.actor.speed -= 0.25f; + if (this->picto.actor.speed < -8.0f) { + this->picto.actor.speed = -8.0f; } } else if (Math_SinS((sp2A - this->picto.actor.shape.rot.y)) < 0.0f) { - this->picto.actor.speedXZ += 0.25f; - if (this->picto.actor.speedXZ > 8.0f) { - this->picto.actor.speedXZ = 8.0f; + this->picto.actor.speed += 0.25f; + if (this->picto.actor.speed > 8.0f) { + this->picto.actor.speed = 8.0f; } } if ((this->picto.actor.bgCheckFlags & 8) || - !Actor_TestFloorInDirection(&this->picto.actor, play, this->picto.actor.speedXZ, + !Actor_TestFloorInDirection(&this->picto.actor, play, this->picto.actor.speed, this->picto.actor.shape.rot.y + 0x4000)) { if (this->picto.actor.bgCheckFlags & 8) { - if (this->picto.actor.speedXZ >= 0.0f) { + if (this->picto.actor.speed >= 0.0f) { yaw = this->picto.actor.shape.rot.y + 0x4000; } else { yaw = this->picto.actor.shape.rot.y - 0x4000; } yaw = this->picto.actor.wallYaw - yaw; } else { - this->picto.actor.speedXZ *= -0.8f; + this->picto.actor.speed *= -0.8f; yaw = 0; } if (ABS_ALT(yaw) > 0x4000) { - this->picto.actor.speedXZ *= -0.8f; - if (this->picto.actor.speedXZ < 0.0f) { - this->picto.actor.speedXZ -= 0.5f; + this->picto.actor.speed *= -0.8f; + if (this->picto.actor.speed < 0.0f) { + this->picto.actor.speed -= 0.5f; } else { - this->picto.actor.speedXZ += 0.5f; + this->picto.actor.speed += 0.5f; } } } @@ -1551,7 +1551,7 @@ void func_80B88D6C(EnKaizoku* this, PlayState* play) { // EnKaizoku_SetupStunned void func_80B891B8(EnKaizoku* this) { if (this->picto.actor.bgCheckFlags & 1) { - this->picto.actor.speedXZ = 0.0f; + this->picto.actor.speed = 0.0f; } if (this->action == KAIZOKU_ACTION_11) { @@ -1586,12 +1586,12 @@ void func_80B89280(EnKaizoku* this, PlayState* play) { } if (this->picto.actor.bgCheckFlags & 2) { - this->picto.actor.speedXZ = 0.0f; + this->picto.actor.speed = 0.0f; } if (this->picto.actor.bgCheckFlags & 1) { - if (this->picto.actor.speedXZ < 0.0f) { - this->picto.actor.speedXZ += 0.05f; + if (this->picto.actor.speed < 0.0f) { + this->picto.actor.speed += 0.05f; } } @@ -1619,7 +1619,7 @@ void func_80B893CC(EnKaizoku* this, PlayState* play) { Math_Vec3f_Copy(&this->unk_3C4, &sp34); this->lookTimer = 0; this->unk_2D8 = 0; - this->picto.actor.speedXZ = 0.0f; + this->picto.actor.speed = 0.0f; EnKaizoku_ChangeAnim(this, EN_KAIZOKU_ANIM_5); if (((this->drawDmgEffType == ACTOR_DRAW_DMGEFF_FROZEN_SFX) || @@ -1674,7 +1674,7 @@ void func_80B8960C(EnKaizoku* this, PlayState* play) { (this->unk_2B8 == 0)) { this->drawDmgEffType = ACTOR_DRAW_DMGEFF_FIRE; } - this->picto.actor.speedXZ = 0.0f; + this->picto.actor.speed = 0.0f; this->unk_2D8 = 1; func_800B7298(play, &this->picto.actor, 0x7B); Enemy_StartFinishingBlow(play, &this->picto.actor); @@ -1693,11 +1693,11 @@ void func_80B8971C(EnKaizoku* this, PlayState* play) { Player* player; if (this->picto.actor.bgCheckFlags & 2) { - this->picto.actor.speedXZ = 0.0f; + this->picto.actor.speed = 0.0f; } if (this->picto.actor.bgCheckFlags & 1) { - Math_SmoothStepToF(&this->picto.actor.speedXZ, 0.0f, 1.0f, 0.5f, 0.0f); + Math_SmoothStepToF(&this->picto.actor.speed, 0.0f, 1.0f, 0.5f, 0.0f); } if ((this->drawDmgEffType == ACTOR_DRAW_DMGEFF_FROZEN_SFX) || diff --git a/src/overlays/actors/ovl_En_Kame/z_en_kame.c b/src/overlays/actors/ovl_En_Kame/z_en_kame.c index a54bfdc2da..234d865bde 100644 --- a/src/overlays/actors/ovl_En_Kame/z_en_kame.c +++ b/src/overlays/actors/ovl_En_Kame/z_en_kame.c @@ -185,7 +185,7 @@ void func_80AD7018(EnKame* this, PlayState* play) { void func_80AD70A0(EnKame* this) { Animation_MorphToPlayOnce(&this->skelAnime1, &object_tl_Anim_004210, -5.0f); - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actionFunc = func_80AD70EC; } @@ -207,7 +207,7 @@ void func_80AD70EC(EnKame* this, PlayState* play) { void func_80AD71B4(EnKame* this) { Animation_MorphToLoop(&this->skelAnime1, &object_tl_Anim_00823C, -5.0f); - this->actor.speedXZ = 0.5f; + this->actor.speed = 0.5f; this->unk_29E = Animation_GetLastFrame(&object_tl_Anim_00823C) * ((s32)Rand_ZeroFloat(5.0f) + 3); this->unk_2A4 = this->actor.shape.rot.y; this->collider.base.acFlags |= (AC_HARD | AC_ON); @@ -246,7 +246,7 @@ void func_80AD73A8(EnKame* this) { this->unk_29E = 0; this->unk_2AC = 1.0f; this->unk_2A8 = 1.0f; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; if (this->unk_2A0 == 0) { Actor_PlaySfx(&this->actor, NA_SE_EN_PAMET_VOICE); } @@ -278,7 +278,7 @@ void func_80AD7424(EnKame* this, PlayState* play) { } void func_80AD7568(EnKame* this) { - this->actor.speedXZ = this->unk_2A6 * (5.0f / 7552); + this->actor.speed = this->unk_2A6 * (5.0f / 7552); this->actor.shape.rot.z = this->unk_2A6 * 0.11016949f; } @@ -287,7 +287,7 @@ void func_80AD75A8(EnKame* this, PlayState* play) { static Color_RGBA8 D_80AD8E58 = { 180, 180, 180, 255 }; static Vec3f D_80AD8E5C = { 0.0f, 0.75f, 0.0f }; - if ((this->actor.bgCheckFlags & 1) && (this->actor.speedXZ >= 3.0f)) { + if ((this->actor.bgCheckFlags & 1) && (this->actor.speed >= 3.0f)) { if ((play->gameplayFrames % 2) == 0) { u32 temp_v0 = func_800C9BB8(&play->colCtx, this->actor.floorPoly, this->actor.floorBgId); @@ -312,7 +312,7 @@ void func_80AD76CC(EnKame* this) { this->unk_2AC = 0.5f; func_80AD7568(this); this->unk_29E = 15; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; Actor_PlaySfx(&this->actor, NA_SE_EN_PAMET_CUTTER_ON); this->unk_2BC.y = this->actor.home.pos.y - 100.0f; } else { @@ -401,7 +401,7 @@ void func_80AD7948(EnKame* this, PlayState* play) { void func_80AD7B18(EnKame* this) { this->actor.draw = EnKame_Draw; Animation_MorphToPlayOnce(&this->skelAnime1, &object_tl_Anim_0031DC, -3.0f); - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->unk_2AC = 0.1f; this->unk_2A8 = 1.0f; this->actor.world.rot.y = this->actor.shape.rot.y; @@ -434,7 +434,7 @@ void func_80AD7C54(EnKame* this) { } this->actor.draw = EnKame_Draw; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->collider.base.acFlags &= ~AC_ON; this->collider.base.atFlags &= ~AT_ON; this->collider.base.atFlags &= ~(AT_BOUNCED | AT_HIT); @@ -460,7 +460,7 @@ void func_80AD7DA4(EnKame* this) { this->collider.base.acFlags |= AC_ON; this->collider.base.acFlags &= ~AC_HARD; this->collider.base.colType = COLTYPE_HIT6; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actionFunc = func_80AD7E0C; } @@ -498,7 +498,7 @@ void func_80AD7F10(EnKame* this, PlayState* play) { } void func_80AD7FA4(EnKame* this) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; if (this->actor.velocity.y > 0.0f) { this->actor.velocity.y = 0.0f; } @@ -545,7 +545,7 @@ void func_80AD8148(EnKame* this, PlayState* play) { this->collider.base.atFlags &= ~AT_ON; this->collider.base.atFlags &= ~(AC_HARD | AC_HIT); this->actor.velocity.y = 15.0f; - this->actor.speedXZ = 1.5f; + this->actor.speed = 1.5f; if (play != NULL) { Enemy_StartFinishingBlow(play, &this->actor); if (this->actor.draw == func_80AD8D64) { @@ -581,7 +581,7 @@ void func_80AD825C(EnKame* this, PlayState* play) { void func_80AD8364(EnKame* this) { this->unk_29E = 20; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actionFunc = func_80AD8388; } diff --git a/src/overlays/actors/ovl_En_Kanban/z_en_kanban.c b/src/overlays/actors/ovl_En_Kanban/z_en_kanban.c index a718d141f5..ad14e2c189 100644 --- a/src/overlays/actors/ovl_En_Kanban/z_en_kanban.c +++ b/src/overlays/actors/ovl_En_Kanban/z_en_kanban.c @@ -359,10 +359,10 @@ void EnKanban_Update(Actor* thisx, PlayState* play) { if ((hitItem->toucher.dmgFlags & 0x10) || (hitItem->toucher.dmgFlags & 8) || (hitItem->toucher.dmgFlags & 0x80000000)) { piece->actor.velocity.y = Rand_ZeroFloat(3.0f) + 6.0f; - piece->actor.speedXZ = Rand_ZeroFloat(4.0f) + 6.0f; + piece->actor.speed = Rand_ZeroFloat(4.0f) + 6.0f; } else { piece->actor.velocity.y = Rand_ZeroFloat(2.0f) + 3.0f; - piece->actor.speedXZ = Rand_ZeroFloat(2.0f) + 3.0f; + piece->actor.speed = Rand_ZeroFloat(2.0f) + 3.0f; } if (piece->partCount >= 4) { @@ -499,7 +499,7 @@ void EnKanban_Update(Actor* thisx, PlayState* play) { if (!(this->actor.bgCheckFlags & 1)) { Actor_PlaySfx(&this->actor, NA_SE_EV_WOODPLATE_BOUND); } - this->actor.speedXZ *= -0.5f; + this->actor.speed *= -0.5f; } if (this->actor.bgCheckFlags & 0x40) { @@ -539,12 +539,12 @@ void EnKanban_Update(Actor* thisx, PlayState* play) { if (this->unk_197 != 0) { if (this->unk_197 > 0) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } else if ((this->floorRot.x > 0.1f) || (this->floorRot.z > 0.1f)) { this->airTimer = 10; if (this->actor.bgCheckFlags & 8) { this->actionState = ENKANBAN_GROUND; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; goto nextCase; } else { Vec3f spC8; @@ -556,14 +556,14 @@ void EnKanban_Update(Actor* thisx, PlayState* play) { Math_ApproachF(&this->actor.velocity.z, spC8.z, 0.5f, (KREG(21) * 0.01f) + 0.3f); this->actor.world.rot.y = Math_Atan2S(spC8.x, spC8.z); this->unk_198 = 1; - this->actor.speedXZ = sqrtf(SQXZ(this->actor.velocity)); + this->actor.speed = sqrtf(SQXZ(this->actor.velocity)); } } else { this->unk_198 = 0; - Math_ApproachZeroF(&this->actor.speedXZ, 1, 0.1f); + Math_ApproachZeroF(&this->actor.speed, 1, 0.1f); } } else { - this->actor.speedXZ *= 0.7f; + this->actor.speed *= 0.7f; } if (this->spinRot.x == 0) { @@ -687,38 +687,38 @@ void EnKanban_Update(Actor* thisx, PlayState* play) { s16 rippleDelay; s32 rippleScale; - if ((player->actor.speedXZ > 0.0f) && (player->actor.world.pos.y < this->actor.world.pos.y) && + if ((player->actor.speed > 0.0f) && (player->actor.world.pos.y < this->actor.world.pos.y) && (this->actor.xyzDistToPlayerSq < SQ(50.0f))) { - Math_ApproachF(&this->actor.speedXZ, player->actor.speedXZ, 1.0f, 0.2f); - if (this->actor.speedXZ > 1.0f) { - this->actor.speedXZ = 1.0f; + Math_ApproachF(&this->actor.speed, player->actor.speed, 1.0f, 0.2f); + if (this->actor.speed > 1.0f) { + this->actor.speed = 1.0f; } if (Math_SmoothStepToS(&this->actor.world.rot.y, BINANG_ROT180(this->actor.yawTowardsPlayer), 1, 0x1000, 0) > 0) { - this->spinVel.y = this->actor.speedXZ * 1000.0f; + this->spinVel.y = this->actor.speed * 1000.0f; } else { - this->spinVel.y = this->actor.speedXZ * -1000.0f; + this->spinVel.y = this->actor.speed * -1000.0f; } } if (this->actor.bgCheckFlags & 1) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } Actor_MoveWithGravity(&this->actor); - if (this->actor.speedXZ != 0.0f) { + if (this->actor.speed != 0.0f) { Actor_UpdateBgCheckInfo(play, &this->actor, 10.0f, 10.0f, 50.0f, 5); if (this->actor.bgCheckFlags & 8) { - this->actor.speedXZ *= -0.5f; + this->actor.speed *= -0.5f; if (this->spinVel.y > 0) { this->spinVel.y = -2000; } else { this->spinVel.y = 2000; } } - Math_ApproachZeroF(&this->actor.speedXZ, 1.0f, 0.15f); + Math_ApproachZeroF(&this->actor.speed, 1.0f, 0.15f); } this->actor.shape.rot.y += this->spinVel.y; Math_ApproachS(&this->spinVel.y, 0, 1, 0x3A); @@ -728,9 +728,9 @@ void EnKanban_Update(Actor* thisx, PlayState* play) { Math_ApproachZeroF(&this->floorRot.x, 0.5f, 0.2f); Math_ApproachZeroF(&this->floorRot.z, 0.5f, 0.2f); - if (fabsf(this->actor.speedXZ) > 1.0f) { + if (fabsf(this->actor.speed) > 1.0f) { rippleDelay = 0; - } else if (fabsf(this->actor.speedXZ) > 0.5f) { + } else if (fabsf(this->actor.speed) > 0.5f) { rippleDelay = 3; } else { rippleDelay = 7; @@ -756,12 +756,12 @@ void EnKanban_Update(Actor* thisx, PlayState* play) { this->bounceX = Rand_ZeroFloat(10.0f) + 6.0f; this->bounceZ = Rand_ZeroFloat(10.0f) + 6.0f; this->actor.velocity.y = 2.0f + hammerStrength; - this->actor.speedXZ = Rand_ZeroFloat(1.0f); + this->actor.speed = Rand_ZeroFloat(1.0f); } else { this->bounceX = Rand_ZeroFloat(7.0f) + 3.0f; this->bounceZ = Rand_ZeroFloat(7.0f) + 3.0f; this->actor.velocity.y = 3.0f + hammerStrength; - this->actor.speedXZ = Rand_ZeroFloat(1.5f); + this->actor.speed = Rand_ZeroFloat(1.5f); } this->spinVel.y = randPlusMinusPoint5Scaled(0x1800); @@ -801,12 +801,12 @@ void EnKanban_Update(Actor* thisx, PlayState* play) { this->bounceX = Rand_ZeroFloat(10.0f) + 6.0f; this->bounceZ = Rand_ZeroFloat(10.0f) + 6.0f; this->actor.velocity.y = 2.5f + bombStrength; - this->actor.speedXZ = 3.0f + bombStrength; + this->actor.speed = 3.0f + bombStrength; } else { this->bounceX = Rand_ZeroFloat(7.0f) + 3.0f; this->bounceZ = Rand_ZeroFloat(7.0f) + 3.0f; this->actor.velocity.y = 5.0f + bombStrength; - this->actor.speedXZ = 4.0f + bombStrength; + this->actor.speed = 4.0f + bombStrength; } this->spinVel.y = randPlusMinusPoint5Scaled(0x1800); diff --git a/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.c b/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.c index 354bcb630f..7a3658e2ae 100644 --- a/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.c +++ b/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.c @@ -380,7 +380,7 @@ void EnKarebaba_SetupDying(EnKarebaba* this) { this->actor.gravity = -0.8f; this->actor.velocity.y = 4.0f; this->actor.world.rot.y = BINANG_ROT180(this->actor.shape.rot.y); - this->actor.speedXZ = 3.0f; + this->actor.speed = 3.0f; } else { this->timer = 3; } @@ -401,13 +401,13 @@ void EnKarebaba_Dying(EnKarebaba* this, PlayState* play) { this->timer--; if (this->timer == 0) { this->actor.gravity = -0.8f; - this->actor.speedXZ = 3.0f; + this->actor.speed = 3.0f; this->actor.velocity.y = 4.0f; this->actor.world.rot.y = BINANG_ROT180(this->actor.shape.rot.y); EnKarebaba_SpawnIceEffects(this, play); } } else { - Math_StepToF(&this->actor.speedXZ, 0.0f, 0.1f); + Math_StepToF(&this->actor.speed, 0.0f, 0.1f); if (this->timer == 0) { Math_ScaledStepToS(&this->actor.shape.rot.x, 0x4800, 0x71C); @@ -417,7 +417,7 @@ void EnKarebaba_Dying(EnKarebaba* this, PlayState* play) { this->actor.scale.z = 0.0f; this->actor.scale.y = 0.0f; this->actor.scale.x = 0.0f; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.flags &= ~(ACTOR_FLAG_1 | ACTOR_FLAG_4); EffectSsHahen_SpawnBurst(play, &this->actor.world.pos, 3.0f, 0, 12, 5, 15, HAHEN_OBJECT_DEFAULT, 10, NULL); diff --git a/src/overlays/actors/ovl_En_Kusa/z_en_kusa.c b/src/overlays/actors/ovl_En_Kusa/z_en_kusa.c index 39d55f7f80..fb8c87cf1a 100644 --- a/src/overlays/actors/ovl_En_Kusa/z_en_kusa.c +++ b/src/overlays/actors/ovl_En_Kusa/z_en_kusa.c @@ -512,8 +512,8 @@ void EnKusa_LiftedUp(EnKusa* this, PlayState* play) { if (Actor_HasNoParent(&this->actor, play)) { this->actor.room = play->roomCtx.curRoom.num; EnKusa_SetupFall(this); - this->actor.velocity.x = this->actor.speedXZ * Math_SinS(this->actor.world.rot.y); - this->actor.velocity.z = this->actor.speedXZ * Math_CosS(this->actor.world.rot.y); + this->actor.velocity.x = this->actor.speed * Math_SinS(this->actor.world.rot.y); + this->actor.velocity.z = this->actor.speed * Math_CosS(this->actor.world.rot.y); this->actor.colChkInfo.mass = 80; this->actor.gravity = -0.1f; EnKusa_UpdateVelY(this); diff --git a/src/overlays/actors/ovl_En_Kusa2/z_en_kusa2.c b/src/overlays/actors/ovl_En_Kusa2/z_en_kusa2.c index 910bf49c3b..108b9e9ae7 100644 --- a/src/overlays/actors/ovl_En_Kusa2/z_en_kusa2.c +++ b/src/overlays/actors/ovl_En_Kusa2/z_en_kusa2.c @@ -1038,7 +1038,7 @@ void func_80A5D9C8(EnKusa2* this, PlayState* play) { this->actor.colChkInfo.mass = 80; this->actor.home.rot.y = this->actor.world.rot.y; this->actor.velocity.y = 12.5f; - this->actor.speedXZ += 3.0f; + this->actor.speed += 3.0f; Actor_MoveWithGravity(&this->actor); func_80A5BAFC(this, play); func_80A5CD0C(this); @@ -1137,10 +1137,10 @@ void func_80A5DEB4(EnKusa2* this, PlayState* play) { Math_StepToF(&this->actor.scale.x, 0.4f, 0.032f); this->unk_1C4 += 0x4650; this->actor.scale.z = this->actor.scale.x; - this->actor.speedXZ = fabsf(Math_CosS(this->unk_1C4) + 0.5f) * 1.5f; + this->actor.speed = fabsf(Math_CosS(this->unk_1C4) + 0.5f) * 1.5f; - if (this->actor.speedXZ < 0.0f) { - this->actor.speedXZ = 0.0f; + if (this->actor.speed < 0.0f) { + this->actor.speed = 0.0f; } Actor_MoveWithGravity(&this->actor); @@ -1165,7 +1165,7 @@ void func_80A5DEB4(EnKusa2* this, PlayState* play) { if (this->unk_1C8 <= 0) { func_80A5CD0C(this); func_80A5BB40(this, play, 4); - this->actor.speedXZ += 4.0f; + this->actor.speed += 4.0f; this->actor.velocity.y = (Rand_ZeroOne() * 4.0f) + 15.0f; func_80A5E1D8(this); } else if (this->actor.bgCheckFlags & 1) { @@ -1174,7 +1174,7 @@ void func_80A5DEB4(EnKusa2* this, PlayState* play) { func_80A5CD0C(this); func_80A5BB40(this, play, 2); this->actor.velocity.y = (Rand_ZeroOne() * 6.0f) + 7.0f; - this->actor.speedXZ += 2.0f; + this->actor.speed += 2.0f; if (this->actor.yawTowardsPlayer < this->actor.world.rot.y) { sp20 = 10000; } else { @@ -1201,7 +1201,7 @@ void func_80A5E210(EnKusa2* this, PlayState* play) { Math_StepToF(&this->actor.gravity, -4.0f, 0.5f); if (this->actor.bgCheckFlags & 1) { - this->actor.speedXZ *= 0.4f; + this->actor.speed *= 0.4f; if (this->actor.bgCheckFlags & 2) { func_80A5D178(this); SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 40, NA_SE_EN_KUSAMUSHI_HIDE); @@ -1253,7 +1253,7 @@ void func_80A5E418(EnKusa2* this) { this->actor.velocity.y *= 0.25f; this->actor.velocity.z *= 0.1f; this->actor.draw = func_80A5EA48; - this->actor.speedXZ *= 0.1f; + this->actor.speed *= 0.1f; this->actor.gravity *= 0.25f; this->unk_1CC = Rand_S16Offset(-800, 1600); this->actionFunc = func_80A5E4BC; diff --git a/src/overlays/actors/ovl_En_Lift_Nuts/z_en_lift_nuts.c b/src/overlays/actors/ovl_En_Lift_Nuts/z_en_lift_nuts.c index 9c0eafeb15..ae7ad360ce 100644 --- a/src/overlays/actors/ovl_En_Lift_Nuts/z_en_lift_nuts.c +++ b/src/overlays/actors/ovl_En_Lift_Nuts/z_en_lift_nuts.c @@ -674,7 +674,7 @@ void func_80AEACF8(EnLiftNuts* this, PlayState* play) { } void func_80AEAEAC(EnLiftNuts* this) { - this->actor.speedXZ = 2.0f; + this->actor.speed = 2.0f; Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 1); func_80AE9AC4(this, 1); func_80AE9B4C(1, 1); @@ -685,7 +685,7 @@ void func_80AEAF14(EnLiftNuts* this, PlayState* play) { f32 dist; Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.home.rot.y, 10, 0x1000, 0x500); - dist = Math_Vec3f_StepTo(&this->actor.world.pos, &this->vec_1D8, this->actor.speedXZ); + dist = Math_Vec3f_StepTo(&this->actor.world.pos, &this->vec_1D8, this->actor.speed); this->actor.world.pos.y += this->actor.gravity; if (dist == 0.0f) { @@ -739,7 +739,7 @@ void func_80AEB148(EnLiftNuts* this, PlayState* play) { Player* player = GET_PLAYER(play); if (player->stateFlags3 & PLAYER_STATE3_200) { - this->actor.speedXZ = 2.0f; + this->actor.speed = 2.0f; SET_EVENTINF(EVENTINF_34); Interface_StartTimer(4, 0); func_80AE9B4C(1, 2); @@ -749,7 +749,7 @@ void func_80AEB148(EnLiftNuts* this, PlayState* play) { } void func_80AEB1C8(EnLiftNuts* this) { - this->actor.speedXZ = 2.0f; + this->actor.speed = 2.0f; SET_EVENTINF(EVENTINF_34); Interface_StartTimer(4, 0); func_80AE9B4C(1, 2); diff --git a/src/overlays/actors/ovl_En_Look_Nuts/z_en_look_nuts.c b/src/overlays/actors/ovl_En_Look_Nuts/z_en_look_nuts.c index 1be03e655b..1df0d1a0c8 100644 --- a/src/overlays/actors/ovl_En_Look_Nuts/z_en_look_nuts.c +++ b/src/overlays/actors/ovl_En_Look_Nuts/z_en_look_nuts.c @@ -151,17 +151,17 @@ void EnLookNuts_Patrol(EnLookNuts* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); if (Play_InCsMode(play)) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; return; } - this->actor.speedXZ = 2.0f; + this->actor.speed = 2.0f; if (Animation_OnFrame(&this->skelAnime, 1.0f) || Animation_OnFrame(&this->skelAnime, 5.0f)) { Actor_PlaySfx(&this->actor, NA_SE_EN_NUTS_WALK); } if (D_80A6862C != 0) { - Math_ApproachZeroF(&this->actor.speedXZ, 0.3f, 1.0f); + Math_ApproachZeroF(&this->actor.speed, 0.3f, 1.0f); return; } @@ -207,7 +207,7 @@ void EnLookNuts_StandAndWait(EnLookNuts* this, PlayState* play) { s16 randOffset; SkelAnime_Update(&this->skelAnime); - Math_ApproachZeroF(&this->actor.speedXZ, 0.3f, 1.0f); + Math_ApproachZeroF(&this->actor.speed, 0.3f, 1.0f); if (!Play_InCsMode(play) && (D_80A6862C == 0) && (this->eventTimer == 0)) { this->eventTimer = 10; switch (this->waitTimer) { @@ -276,10 +276,10 @@ void EnLookNuts_RunToPlayer(EnLookNuts* this, PlayState* play) { Actor_PlaySfx(&this->actor, NA_SE_EN_NUTS_WALK); } - this->actor.speedXZ = 4.0f; + this->actor.speed = 4.0f; Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 1, 0xBB8, 0); if ((this->actor.xzDistToPlayer < 70.0f) || (this->eventTimer == 0)) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; EnLookNuts_SetupSendPlayerToSpawn(this); } } diff --git a/src/overlays/actors/ovl_En_Ma4/z_en_ma4.c b/src/overlays/actors/ovl_En_Ma4/z_en_ma4.c index 62d848dd9a..802d112629 100644 --- a/src/overlays/actors/ovl_En_Ma4/z_en_ma4.c +++ b/src/overlays/actors/ovl_En_Ma4/z_en_ma4.c @@ -260,7 +260,7 @@ void EnMa4_RunInCircles(EnMa4* this, PlayState* play) { sAnimIndex = 13; } } else { - this->actor.speedXZ = 2.7f; + this->actor.speed = 2.7f; EnMa4_ChangeAnim(this, 9); sAnimIndex = 9; } @@ -279,7 +279,7 @@ void EnMa4_RunInCircles(EnMa4* this, PlayState* play) { Math_SmoothStepToS(&this->actor.shape.rot.y, sp2E, 5, 0x3000, 0x100); } else { if ((D_80AC0254 == 0) && ((Rand_Next() % 4) == 0)) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; D_80AC0254 = 2; EnMa4_ChangeAnim(this, 3); sAnimIndex = 3; @@ -309,14 +309,14 @@ void EnMa4_SetupWait(EnMa4* this) { if ((this->state != MA4_STATE_AFTERHORSEBACKGAME) && (this->state != MA4_STATE_AFTERDESCRIBETHEMCS)) { if (this->type != MA4_TYPE_ALIENS_WON) { EnMa4_ChangeAnim(this, 9); - this->actor.speedXZ = 2.7f; + this->actor.speed = 2.7f; } else { EnMa4_ChangeAnim(this, 15); - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } } else { EnMa4_ChangeAnim(this, 1); - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } this->actor.gravity = -0.2f; diff --git a/src/overlays/actors/ovl_En_Minifrog/z_en_minifrog.c b/src/overlays/actors/ovl_En_Minifrog/z_en_minifrog.c index 9eed098866..bfe805cb1e 100644 --- a/src/overlays/actors/ovl_En_Minifrog/z_en_minifrog.c +++ b/src/overlays/actors/ovl_En_Minifrog/z_en_minifrog.c @@ -99,7 +99,7 @@ void EnMinifrog_Init(Actor* thisx, PlayState* play) { this->frogIndex = MINIFROG_YELLOW; } - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actionFunc = EnMinifrog_Idle; this->jumpState = MINIFROG_STATE_GROUND; this->flags = 0; diff --git a/src/overlays/actors/ovl_En_Minislime/z_en_minislime.c b/src/overlays/actors/ovl_En_Minislime/z_en_minislime.c index a18f712476..02a085e548 100644 --- a/src/overlays/actors/ovl_En_Minislime/z_en_minislime.c +++ b/src/overlays/actors/ovl_En_Minislime/z_en_minislime.c @@ -240,7 +240,7 @@ void EnMinislime_SetupFall(EnMinislime* this, PlayState* play) { this->collider.base.atFlags |= AT_ON; this->collider.base.acFlags |= AC_ON; this->collider.base.ocFlags1 |= OC1_ON; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.gravity = -2.0f; if (this->actionFunc != EnMinislime_GekkoThrow) { this->actor.scale.x = 0.095f; @@ -269,7 +269,7 @@ void EnMinislime_SetupBreakFromBigslime(EnMinislime* this) { this->actor.world.rot.y = Actor_WorldYawTowardActor(this->actor.parent, &this->actor); this->actor.shape.rot.y = this->actor.world.rot.y; - this->actor.speedXZ = Math_CosS(this->actor.world.rot.x) * 15.0f; + this->actor.speed = Math_CosS(this->actor.world.rot.x) * 15.0f; velY = Math_SinS(this->actor.world.rot.x) * 15.0f; this->actor.bgCheckFlags &= ~1; this->actor.velocity.y = velY + 2.0f; @@ -300,7 +300,7 @@ void EnMinislime_BreakFromBigslime(EnMinislime* this, PlayState* play) { void EnMinislime_SetupIceArrowDamage(EnMinislime* this) { this->collider.base.atFlags &= ~AT_ON; this->frozenTimer = 80; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->frozenScale = 0.1f; this->actionFunc = EnMinislime_IceArrowDamage; } @@ -354,7 +354,7 @@ void EnMinislime_SetupFireArrowDamage(EnMinislime* this) { this->actor.shape.rot.z = 0; this->actor.world.rot.x = 0; this->collider.base.acFlags &= ~AC_ON; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actionFunc = EnMinislime_FireArrowDamage; } @@ -385,7 +385,7 @@ void EnMinislime_SetupGrowAndShrink(EnMinislime* this) { this->actor.shape.rot.y = 0; this->actor.shape.rot.z = 0; this->actor.world.rot.x = 0; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; Math_Vec3f_Copy(&this->actor.home.pos, &this->actor.world.pos); this->growShrinkTimer = 42; this->actor.scale.x = 0.19f; @@ -425,8 +425,8 @@ void EnMinislime_Idle(EnMinislime* this, PlayState* play) { this->idleTimer--; speedXZ = sin_rad(this->idleTimer * (M_PI / 10)); - this->actor.speedXZ = speedXZ * 1.5f; - this->actor.speedXZ = CLAMP_MIN(this->actor.speedXZ, 0.0f); + this->actor.speed = speedXZ * 1.5f; + this->actor.speed = CLAMP_MIN(this->actor.speed, 0.0f); Math_StepToF(&this->actor.scale.x, ((0.14f * speedXZ) + 1.5f) * 0.1f, 0.010000001f); Math_StepToF(&this->actor.scale.y, ((cos_rad(this->idleTimer * (M_PI / 10)) * 0.07f) + 0.75f) * 0.1f, 0.010000001f); Math_StepToF(&this->actor.scale.z, 0.3f - this->actor.scale.x, 0.010000001f); @@ -451,7 +451,7 @@ void EnMinislime_Idle(EnMinislime* this, PlayState* play) { } void EnMinislime_SetupBounce(EnMinislime* this) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->bounceTimer = (this->actionFunc == EnMinislime_GrowAndShrink) ? 1 : 4; Actor_PlaySfx(&this->actor, NA_SE_EN_SLIME_JUMP1); this->actionFunc = EnMinislime_Bounce; @@ -466,7 +466,7 @@ void EnMinislime_Bounce(EnMinislime* this, PlayState* play) { if (this->bounceTimer == 0) { this->actor.gravity = -2.0f; this->actor.world.rot.y = this->actor.yawTowardsPlayer; - this->actor.speedXZ = 1.0f; + this->actor.speed = 1.0f; this->actor.velocity.y = 12.0f; this->actor.shape.rot.y = this->actor.world.rot.y; } @@ -490,7 +490,7 @@ void EnMinislime_Bounce(EnMinislime* this, PlayState* play) { void EnMinislime_SetupMoveToBigslime(EnMinislime* this) { this->actor.gravity = 0.0f; - this->actor.speedXZ = 15.0f; + this->actor.speed = 15.0f; this->actor.shape.rot.x = Actor_WorldPitchTowardPoint(&this->actor, &this->actor.parent->home.pos); this->actor.shape.rot.y = Actor_WorldYawTowardPoint(&this->actor, &this->actor.parent->home.pos); this->actor.world.rot.x = -this->actor.shape.rot.x; @@ -517,7 +517,7 @@ void EnMinislime_MoveToBigslime(EnMinislime* this, PlayState* play) { EnMinislime_SetupDisappear(this); } else if ((this->actor.scale.x > 0.0f) && (this->actor.world.pos.y > (GBT_ROOM_5_MAX_Y - 100.0f))) { this->actor.params = MINISLIME_SETUP_DISAPPEAR; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; Actor_SetScale(&this->actor, 0.0f); } } @@ -526,7 +526,7 @@ void EnMinislime_SetupKnockback(EnMinislime* this) { this->collider.base.acFlags &= ~AC_ON; this->collider.base.ocFlags1 |= OC1_ON; this->knockbackTimer = 30; - this->actor.speedXZ = 20.0f; + this->actor.speed = 20.0f; func_800BE504(&this->actor, &this->collider); this->actionFunc = EnMinislime_Knockback; } @@ -535,7 +535,7 @@ void EnMinislime_Knockback(EnMinislime* this, PlayState* play) { f32 sqrtFrozenTimer; this->knockbackTimer--; - Math_StepToF(&this->actor.speedXZ, 0.0f, 1.0f); + Math_StepToF(&this->actor.speed, 0.0f, 1.0f); sqrtFrozenTimer = sqrtf(this->knockbackTimer); this->actor.scale.x = ((cos_rad(this->knockbackTimer * (M_PI / 3)) * (0.05f * sqrtFrozenTimer)) + 1.0f) * 0.15f; this->actor.scale.z = this->actor.scale.x; @@ -556,7 +556,7 @@ void EnMinislime_SetupDefeatIdle(EnMinislime* this) { this->idleTimer = 20; this->collider.base.atFlags &= ~(AT_ON | AT_HIT); this->collider.base.acFlags &= ~(AC_ON | AC_HIT); - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; if (this->frozenAlpha > 20) { EnMinislime_AddIceShardEffect(this); } @@ -625,7 +625,7 @@ void EnMinislime_Despawn(EnMinislime* this, PlayState* play) { } void EnMinislime_SetupMoveToGekko(EnMinislime* this) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.gravity = 0.0f; this->actor.velocity.y = 0.0f; this->collider.base.acFlags &= ~AC_ON; @@ -657,7 +657,7 @@ void EnMinislime_SetupGekkoThrow(EnMinislime* this) { this->collider.base.acFlags |= AC_ON; this->collider.base.ocFlags1 |= OC1_ON; xzDistToPlayer = CLAMP_MIN(this->actor.xzDistToPlayer, 200.0f); - this->actor.speedXZ = 17.5f; + this->actor.speed = 17.5f; this->actor.world.rot.y = this->actor.yawTowardsPlayer; this->actor.gravity = -1.0f; this->actor.velocity.y = ((xzDistToPlayer - 200.0f) * 0.01f) + 3.0f; diff --git a/src/overlays/actors/ovl_En_Mkk/z_en_mkk.c b/src/overlays/actors/ovl_En_Mkk/z_en_mkk.c index 612e0d3db4..59cc5249fa 100644 --- a/src/overlays/actors/ovl_En_Mkk/z_en_mkk.c +++ b/src/overlays/actors/ovl_En_Mkk/z_en_mkk.c @@ -256,15 +256,15 @@ void func_80A4E2E8(EnMkk* this, PlayState* play) { s32 sp20; this->unk_14E--; - if ((this->actor.params == 1) && (this->actor.bgCheckFlags & 1) && (this->actor.speedXZ > 2.5f) && + if ((this->actor.params == 1) && (this->actor.bgCheckFlags & 1) && (this->actor.speed > 2.5f) && ((play->gameplayFrames % 3) == 0)) { func_80A4E22C(this, play); } if (this->unk_14E > 0) { - Math_StepToF(&this->actor.speedXZ, 5.0f, 0.7f); + Math_StepToF(&this->actor.speed, 5.0f, 0.7f); sp20 = false; } else { - sp20 = Math_StepToF(&this->actor.speedXZ, 0.0f, 0.7f); + sp20 = Math_StepToF(&this->actor.speed, 0.0f, 0.7f); } if ((player->stateFlags3 & 0x100) || (Player_GetMask(play) == PLAYER_MASK_STONE)) { Math_ScaledStepToS(&this->unk_150, Actor_WorldYawTowardPoint(&this->actor, &this->actor.home.pos), 0x400); @@ -274,7 +274,7 @@ void func_80A4E2E8(EnMkk* this, PlayState* play) { Math_ScaledStepToS(&this->unk_150, this->actor.yawTowardsPlayer, 0x400); } this->actor.shape.rot.y = - (s32)(sin_rad(this->unk_14E * ((2 * M_PI) / 15)) * (614.4f * this->actor.speedXZ)) + this->unk_150; + (s32)(sin_rad(this->unk_14E * ((2 * M_PI) / 15)) * (614.4f * this->actor.speed)) + this->unk_150; func_800B9010(&this->actor, NA_SE_EN_KUROSUKE_MOVE - SFX_FLAG); if (sp20) { this->unk_14B &= ~2; @@ -289,7 +289,7 @@ void func_80A4E2E8(EnMkk* this, PlayState* play) { void func_80A4E58C(EnMkk* this) { this->unk_14B |= 1; - this->actor.speedXZ = 3.0f; + this->actor.speed = 3.0f; this->actor.velocity.y = 5.0f; Actor_PlaySfx(&this->actor, NA_SE_EN_KUROSUKE_ATTACK); this->collider.base.atFlags |= AT_ON; @@ -316,7 +316,7 @@ void func_80A4E67C(EnMkk* this) { Actor_PlaySfx(&this->actor, NA_SE_EN_PO_DEAD); this->alpha = 254; func_800BE568(&this->actor, &this->collider); - this->actor.speedXZ = 7.0f; + this->actor.speed = 7.0f; this->actor.shape.rot.y = this->actor.world.rot.y; this->actor.velocity.y = 5.0f; this->actor.gravity = -1.3f; @@ -379,16 +379,16 @@ void func_80A4E84C(EnMkk* this) { this->unk_154.y = this->actor.world.pos.y; this->unk_154.x = this->actor.world.pos.x - 10.0f * Math_SinS(this->actor.shape.rot.y + - (s32)(1228.8f * this->actor.speedXZ * sin_rad(this->unk_14E * (M_PI / 5)))); + (s32)(1228.8f * this->actor.speed * sin_rad(this->unk_14E * (M_PI / 5)))); this->unk_154.z = this->actor.world.pos.z - 10.0f * Math_CosS(this->actor.shape.rot.y + - (s32)(1228.8f * this->actor.speedXZ * sin_rad(this->unk_14E * (M_PI / 5)))); + (s32)(1228.8f * this->actor.speed * sin_rad(this->unk_14E * (M_PI / 5)))); this->unk_160.x = this->unk_154.x - 12.0f * Math_SinS(this->actor.shape.rot.y - - (s32)(1228.8f * this->actor.speedXZ * sin_rad(this->unk_14E * (M_PI / 5)))); + (s32)(1228.8f * this->actor.speed * sin_rad(this->unk_14E * (M_PI / 5)))); this->unk_160.z = this->unk_154.z - 12.0f * Math_CosS(this->actor.shape.rot.y - - (s32)(1228.8f * this->actor.speedXZ * sin_rad(this->unk_14E * (M_PI / 5)))); + (s32)(1228.8f * this->actor.speed * sin_rad(this->unk_14E * (M_PI / 5)))); } } @@ -483,7 +483,7 @@ void func_80A4EF74(EnMkk* this, PlayState* play) { Math_Vec3f_Copy(&this->actor.world.pos, &this->actor.home.pos); Math_Vec3f_Copy(&this->unk_154, &this->actor.world.pos); Math_Vec3f_Copy(&this->unk_160, &this->actor.world.pos); - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.velocity.y = 0.0f; func_80A4EDF0(this); } else { diff --git a/src/overlays/actors/ovl_En_Mm/z_en_mm.c b/src/overlays/actors/ovl_En_Mm/z_en_mm.c index 0cc91d53dc..bd8472a4e9 100644 --- a/src/overlays/actors/ovl_En_Mm/z_en_mm.c +++ b/src/overlays/actors/ovl_En_Mm/z_en_mm.c @@ -130,37 +130,37 @@ void func_80965DB4(EnMm* this, PlayState* play) { this->actor.velocity.y = 0.0f; } - if ((this->actor.speedXZ != 0.0f) && (this->actor.bgCheckFlags & 8)) { + if ((this->actor.speed != 0.0f) && (this->actor.bgCheckFlags & 8)) { angle = BINANG_SUB(this->actor.world.rot.y, BINANG_ROT180(this->actor.wallYaw)); this->actor.world.rot.y += BINANG_SUB(0x8000, (s16)(angle * 2)); - this->actor.speedXZ *= 0.5f; + this->actor.speed *= 0.5f; CollisionCheck_SpawnShieldParticles(play, &this->actor.world.pos); Actor_PlaySfx(&this->actor, NA_SE_EV_HUMAN_BOUND); } if (!(this->actor.bgCheckFlags & 1)) { - Math_StepToF(&this->actor.speedXZ, 0.0f, 0.08f); + Math_StepToF(&this->actor.speed, 0.0f, 0.08f); } else { - temp_f14 = Math_SinS(this->actor.world.rot.y) * this->actor.speedXZ; - temp_f12 = Math_CosS(this->actor.world.rot.y) * this->actor.speedXZ; + temp_f14 = Math_SinS(this->actor.world.rot.y) * this->actor.speed; + temp_f12 = Math_CosS(this->actor.world.rot.y) * this->actor.speed; Actor_GetSlopeDirection(this->actor.floorPoly, &slopeNormal, &downwardSlopeYaw); temp_f14 += 3.0f * slopeNormal.x; temp_f12 += 3.0f * slopeNormal.z; temp_f2 = sqrtf(SQ(temp_f14) + SQ(temp_f12)); - if ((temp_f2 < this->actor.speedXZ) || + if ((temp_f2 < this->actor.speed) || (SurfaceType_GetSlope(&play->colCtx, this->actor.floorPoly, this->actor.floorBgId) == 1)) { - this->actor.speedXZ = CLAMP_MAX(temp_f2, 16.0f); + this->actor.speed = CLAMP_MAX(temp_f2, 16.0f); this->actor.world.rot.y = Math_Atan2S_XY(temp_f12, temp_f14); } - if (!Math_StepToF(&this->actor.speedXZ, 0.0f, 1.0f)) { + if (!Math_StepToF(&this->actor.speed, 0.0f, 1.0f)) { direction = this->actor.world.rot.y; if (ABS_ALT(BINANG_SUB(this->actor.world.rot.y, this->actor.shape.rot.y)) > 0x4000) { direction = BINANG_ROT180(direction); } - Math_ScaledStepToS(&this->actor.shape.rot.y, direction, this->actor.speedXZ * 100.0f); - this->unk_190 += (s16)(this->actor.speedXZ * 800.0f); + Math_ScaledStepToS(&this->actor.shape.rot.y, direction, this->actor.speed * 100.0f); + this->unk_190 += (s16)(this->actor.speed * 800.0f); } if (this->actor.bgCheckFlags & 2) { diff --git a/src/overlays/actors/ovl_En_Ms/z_en_ms.c b/src/overlays/actors/ovl_En_Ms/z_en_ms.c index 6aac1355db..625e509066 100644 --- a/src/overlays/actors/ovl_En_Ms/z_en_ms.c +++ b/src/overlays/actors/ovl_En_Ms/z_en_ms.c @@ -69,7 +69,7 @@ void EnMs_Init(Actor* thisx, PlayState* play) { Actor_SetScale(&this->actor, 0.015f); this->actor.colChkInfo.mass = MASS_IMMOVABLE; // Eating Magic Beans all day will do that to you this->actionFunc = EnMs_Wait; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.velocity.y = 0.0f; this->actor.gravity = -1.0f; } diff --git a/src/overlays/actors/ovl_En_Mushi2/z_en_mushi2.c b/src/overlays/actors/ovl_En_Mushi2/z_en_mushi2.c index 30e87a669d..2490c5cc6f 100644 --- a/src/overlays/actors/ovl_En_Mushi2/z_en_mushi2.c +++ b/src/overlays/actors/ovl_En_Mushi2/z_en_mushi2.c @@ -275,9 +275,9 @@ s32 func_80A68DD4(EnMushi2* this, PlayState* play) { } void func_80A68ED8(EnMushi2* this) { - this->actor.velocity.x = this->actor.speedXZ * this->unk_328.x; - this->actor.velocity.y = this->actor.speedXZ * this->unk_328.y; - this->actor.velocity.z = this->actor.speedXZ * this->unk_328.z; + this->actor.velocity.x = this->actor.speed * this->unk_328.x; + this->actor.velocity.y = this->actor.speed * this->unk_328.y; + this->actor.velocity.z = this->actor.speed * this->unk_328.z; Actor_UpdatePos(&this->actor); } @@ -797,7 +797,7 @@ void func_80A6A36C(EnMushi2* this, PlayState* play) { s32 pad; s32 sp20 = false; - Math_StepToF(&this->actor.speedXZ, 0.0f, 0.2f); + Math_StepToF(&this->actor.speed, 0.0f, 0.2f); this->actor.velocity.y -= this->actor.velocity.y * D_80A6BA14[ENMUSHI2_GET_3(&this->actor)]; Actor_MoveWithGravity(&this->actor); func_80A69424(this, play); @@ -853,11 +853,11 @@ void func_80A6A5C0(EnMushi2* this, PlayState* play) { EnMushi2* this2 = this; func_80A69D3C(this); - Math_SmoothStepToF(&this->actor.speedXZ, this->unk_35C, 0.1f, 0.5f, 0.0f); + Math_SmoothStepToF(&this->actor.speed, this->unk_35C, 0.1f, 0.5f, 0.0f); if (this->unk_354 < SQ(40.0f)) { f32 temp = 1.0f - ((SQ(40.0f) - this->unk_354) * (1.0f / (10.0f * SQ(40.0f)))); - this->actor.speedXZ *= temp; + this->actor.speed *= temp; } func_80A68ED8(this); @@ -866,7 +866,7 @@ void func_80A6A5C0(EnMushi2* this, PlayState* play) { func_80A69388(this); } - this->skelAnime.playSpeed = this->actor.speedXZ * 1.6f; + this->skelAnime.playSpeed = this->actor.speed * 1.6f; this2->skelAnime.playSpeed = CLAMP(this2->skelAnime.playSpeed, 0.1f, 1.9f); if ((this->unk_36A <= 0) || func_80A68BA0(this)) { @@ -896,7 +896,7 @@ void func_80A6A794(EnMushi2* this) { void func_80A6A824(EnMushi2* this, PlayState* play) { EnMushi2* this2 = this; - Math_SmoothStepToF(&this->actor.speedXZ, this->unk_35C, 0.1f, 0.5f, 0.0f); + Math_SmoothStepToF(&this->actor.speed, this->unk_35C, 0.1f, 0.5f, 0.0f); func_80A68ED8(this); func_80A697C4(this, play); @@ -904,7 +904,7 @@ void func_80A6A824(EnMushi2* this, PlayState* play) { func_80A69388(this); } - this->skelAnime.playSpeed = (Rand_ZeroOne() * 0.8f) + (this->actor.speedXZ * 1.2f); + this->skelAnime.playSpeed = (Rand_ZeroOne() * 0.8f) + (this->actor.speed * 1.2f); this2->skelAnime.playSpeed = CLAMP(this2->skelAnime.playSpeed, 0.0f, 1.9f); if ((this->unk_36A <= 0) || func_80A68BA0(this)) { @@ -963,9 +963,9 @@ void func_80A6AB08(EnMushi2* this, PlayState* play) { s16 temp; if (this->unk_368 > 80) { - Math_StepToF(&this->actor.speedXZ, 0.6f, 0.08f); + Math_StepToF(&this->actor.speed, 0.6f, 0.08f); } else { - Math_StepToF(&this->actor.speedXZ, 0.0f, 0.02f); + Math_StepToF(&this->actor.speed, 0.0f, 0.02f); } Actor_MoveWithGravity(&this->actor); @@ -1025,8 +1025,8 @@ void func_80A6AE7C(EnMushi2* this, PlayState* play) { this->actor.shape.rot.x -= 0x1F4; this->actor.shape.rot.y += 0xC8; - this->actor.speedXZ += (Rand_ZeroOne() - 0.5f) * 0.16f; - this->actor.speedXZ *= 0.9f; + this->actor.speed += (Rand_ZeroOne() - 0.5f) * 0.16f; + this->actor.speed *= 0.9f; this->actor.world.rot.y += (s16)((Rand_ZeroOne() - 0.5f) * 2000.0f); this->actor.gravity = -0.04f - (Rand_ZeroOne() * 0.02f); this->actor.velocity.y *= 0.95f; @@ -1058,7 +1058,7 @@ void func_80A6B0D8(EnMushi2* this, PlayState* play) { s32 pad[2]; f32 temp_f2; - Math_SmoothStepToF(&this->actor.speedXZ, 0.0f, 0.4f, 1.2f, 0.0f); + Math_SmoothStepToF(&this->actor.speed, 0.0f, 0.4f, 1.2f, 0.0f); temp_f2 = this->actor.scale.x - 0.0002f; Actor_SetScale(&this->actor, CLAMP_MIN(temp_f2, 0.001f)); @@ -1077,11 +1077,11 @@ void func_80A6B0D8(EnMushi2* this, PlayState* play) { } this->actor.velocity.x = - (this->actor.speedXZ * this->unk_328.x) + (-0.01f * this->unk_31C.x) + (this->unk_310.x * temp_f2); + (this->actor.speed * this->unk_328.x) + (-0.01f * this->unk_31C.x) + (this->unk_310.x * temp_f2); this->actor.velocity.y = - (this->actor.speedXZ * this->unk_328.y) + (-0.01f * this->unk_31C.y) + (this->unk_310.y * temp_f2); + (this->actor.speed * this->unk_328.y) + (-0.01f * this->unk_31C.y) + (this->unk_310.y * temp_f2); this->actor.velocity.z = - (this->actor.speedXZ * this->unk_328.z) + (-0.01f * this->unk_31C.z) + (this->unk_310.z * temp_f2); + (this->actor.speed * this->unk_328.z) + (-0.01f * this->unk_31C.z) + (this->unk_310.z * temp_f2); if ((this->actor.flags & ACTOR_FLAG_40) && (this->unk_368 > 20) && (Rand_ZeroOne() < 0.15f)) { Vec3f sp48; diff --git a/src/overlays/actors/ovl_En_Neo_Reeba/z_en_neo_reeba.c b/src/overlays/actors/ovl_En_Neo_Reeba/z_en_neo_reeba.c index c1fb5ebe67..78464e6f21 100644 --- a/src/overlays/actors/ovl_En_Neo_Reeba/z_en_neo_reeba.c +++ b/src/overlays/actors/ovl_En_Neo_Reeba/z_en_neo_reeba.c @@ -207,8 +207,8 @@ void EnNeoReeba_ChooseAction(EnNeoReeba* this, PlayState* play) { if (this->actionTimer == 0) { if ((distToPlayer < 140.0f) && (fabsf(this->actor.playerHeightRel) < 100.0f)) { this->targetPos = player->actor.world.pos; - this->targetPos.x += 10.0f * player->actor.speedXZ * Math_SinS(player->actor.world.rot.y); - this->targetPos.z += 10.0f * player->actor.speedXZ * Math_CosS(player->actor.world.rot.y); + this->targetPos.x += 10.0f * player->actor.speed * Math_SinS(player->actor.world.rot.y); + this->targetPos.z += 10.0f * player->actor.speed * Math_CosS(player->actor.world.rot.y); EnNeoReeba_SetupMove(this); } else { EnNeoReeba_SetupReturnHome(this); @@ -273,19 +273,19 @@ void EnNeoReeba_SetupMove(EnNeoReeba* this) { this->actionTimer = 60; this->actionFunc = EnNeoReeba_Move; this->skelAnime.playSpeed = 2.0f; - this->actor.speedXZ = 14.0f; + this->actor.speed = 14.0f; } void EnNeoReeba_Move(EnNeoReeba* this, PlayState* play) { - f32 remainingDist = Math_Vec3f_StepToXZ(&this->actor.world.pos, &this->targetPos, this->actor.speedXZ); + f32 remainingDist = Math_Vec3f_StepToXZ(&this->actor.world.pos, &this->targetPos, this->actor.speed); Actor_SpawnFloorDustRing(play, &this->actor, &this->actor.world.pos, this->actor.shape.shadowScale, 1, 4.0f, 0xFA, 0xA, 1); if (remainingDist < 2.0f) { EnNeoReeba_SetupChooseAction(this); - } else if (remainingDist < 40.0f && this->actor.speedXZ > 3.0f) { - this->actor.speedXZ -= 2.0f; + } else if (remainingDist < 40.0f && this->actor.speed > 3.0f) { + this->actor.speed -= 2.0f; } if (this->sfxTimer == 0) { @@ -304,18 +304,18 @@ void EnNeoReeba_Move(EnNeoReeba* this, PlayState* play) { void EnNeoReeba_SetupReturnHome(EnNeoReeba* this) { this->actionFunc = EnNeoReeba_ReturnHome; - this->actor.speedXZ = 6.0f; + this->actor.speed = 6.0f; } void EnNeoReeba_ReturnHome(EnNeoReeba* this, PlayState* play) { Player* player = GET_PLAYER(play); s32 pad; - f32 remainingDist = Math_Vec3f_StepToXZ(&this->actor.world.pos, &this->actor.home.pos, this->actor.speedXZ); + f32 remainingDist = Math_Vec3f_StepToXZ(&this->actor.world.pos, &this->actor.home.pos, this->actor.speed); if (remainingDist < 2.0f) { EnNeoReeba_SetupChooseAction(this); - } else if (remainingDist < 40.0f && this->actor.speedXZ > 3.0f) { - this->actor.speedXZ -= 1.0f; + } else if (remainingDist < 40.0f && this->actor.speed > 3.0f) { + this->actor.speed -= 1.0f; } if (Actor_WorldDistXZToPoint(&player->actor, &this->actor.home.pos) > 200.0f || @@ -333,7 +333,7 @@ void EnNeoReeba_SetupBounce(EnNeoReeba* this) { } void EnNeoReeba_Bounce(EnNeoReeba* this, PlayState* play) { - if (Math_Vec3f_StepToXZ(&this->actor.world.pos, &this->targetPos, this->actor.speedXZ) < 2.0f) { + if (Math_Vec3f_StepToXZ(&this->actor.world.pos, &this->targetPos, this->actor.speed) < 2.0f) { EnNeoReeba_SetupChooseAction(this); } diff --git a/src/overlays/actors/ovl_En_Niw/z_en_niw.c b/src/overlays/actors/ovl_En_Niw/z_en_niw.c index 105d4d735d..87fcf5a4d5 100644 --- a/src/overlays/actors/ovl_En_Niw/z_en_niw.c +++ b/src/overlays/actors/ovl_En_Niw/z_en_niw.c @@ -160,7 +160,7 @@ void EnNiw_Init(Actor* thisx, PlayState* play) { this->actor.flags &= ~ACTOR_FLAG_1; // targetable OFF this->niwState = NIW_STATE_HELD; this->actionFunc = EnNiw_Held; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->unk2BC.z = 0.0f; this->actor.velocity.y = 0.0f; this->actor.gravity = 0.0f; @@ -372,7 +372,7 @@ void EnNiw_Idle(EnNiw* this, PlayState* play) { this->heldTimer = 30; this->actor.flags &= ~ACTOR_FLAG_1; // targetable OFF this->niwState = NIW_STATE_HELD; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actionFunc = EnNiw_Held; return; } else { @@ -415,7 +415,7 @@ void EnNiw_Idle(EnNiw* this, PlayState* play) { } else { this->unkIdleTimer = 4; if (this->actor.bgCheckFlags & 1) { // hit floor - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.velocity.y = 3.5f; // hopping up and down } } @@ -476,7 +476,7 @@ void EnNiw_Held(EnNiw* this, PlayState* play) { this->actor.shape.rot.z = 0; rotZ = this->actor.shape.rot.z; this->actor.velocity.y = 8.0f; - this->actor.speedXZ = 4.0f; + this->actor.speed = 4.0f; this->actor.gravity = -2.0f; this->niwState = NIW_STATE_FALLING; this->unk2EC = 0; @@ -497,7 +497,7 @@ void EnNiw_Thrown(EnNiw* this, PlayState* play) { if (this->actor.bgCheckFlags & 1) { // hit floor this->unk2EC = 1; this->hoppingTimer = 80; // hop timer - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.velocity.y = 4.0f; } else { return; // wait until back on floor @@ -526,7 +526,7 @@ void EnNiw_Thrown(EnNiw* this, PlayState* play) { this->actor.flags &= ~ACTOR_FLAG_1; // targetable OFF this->niwState = NIW_STATE_HELD; this->actionFunc = EnNiw_Held; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } else { if (this->hoppingTimer > 5) { Actor_LiftActor(&this->actor, play); @@ -544,7 +544,7 @@ void EnNiw_Swimming(EnNiw* this, PlayState* play) { EnNiw_SpawnAttackNiw(this, play); // spawn attack niw } - this->actor.speedXZ = 2.0f; + this->actor.speed = 2.0f; if (this->actor.bgCheckFlags & 0x20) { // touching water this->actor.gravity = 0.0f; if (this->actor.depthInWater > 15.0f) { @@ -559,16 +559,16 @@ void EnNiw_Swimming(EnNiw* this, PlayState* play) { } if (this->actor.bgCheckFlags & 8) { // hit a wall this->actor.velocity.y = 10.0f; // fly up in straight line - this->actor.speedXZ = 1.0f; + this->actor.speed = 1.0f; } } else { this->actor.gravity = -2.0f; if (this->actor.bgCheckFlags & 8) { // hit a wall this->actor.velocity.y = 10.0f; // fly up in straight line - this->actor.speedXZ = 1.0f; + this->actor.speed = 1.0f; this->actor.gravity = 0.0f; } else { - this->actor.speedXZ = 4.0f; + this->actor.speed = 4.0f; } if (this->actor.bgCheckFlags & 1) { // hit floor @@ -646,7 +646,7 @@ void EnNiw_SetupCuccoStorm(EnNiw* this, PlayState* play) { void EnNiw_CuccoStorm(EnNiw* this, PlayState* play) { EnNiw_SpawnAttackNiw(this, play); if (this->cuccoStormTimer == 1) { // not countdown to 0? mistype? - this->actor.speedXZ = 3.0f; + this->actor.speed = 3.0f; this->isRunningRight = Rand_ZeroFloat(1.99f); this->generalTimer1 = 0; this->unkTimer24E = this->generalTimer1; @@ -662,7 +662,7 @@ void EnNiw_SetupRunAway(EnNiw* this) { this->isRunningRight = Rand_ZeroFloat(1.99f); this->niwState = NIW_STATE_RUNNING; this->actionFunc = EnNiw_RunAway; - this->actor.speedXZ = 4.0f; + this->actor.speed = 4.0f; } void EnNiw_RunAway(EnNiw* this, PlayState* play) { @@ -678,7 +678,7 @@ void EnNiw_RunAway(EnNiw* this, PlayState* play) { this->unk2A4.z = this->unk2B0.z = this->actor.world.pos.z; this->generalTimer2 = this->generalTimer1 = this->unk298 = 0; this->unk300 = this->unk304 = 0; - this->actor.speedXZ = 0; + this->actor.speed = 0; this->targetLimbRots[8] = 0; this->targetLimbRots[6] = 0; this->targetLimbRots[5] = 0; @@ -746,7 +746,7 @@ void EnNiw_CheckRage(EnNiw* this, PlayState* play) { this->actionFunc = EnNiw_Trigger; this->unk304 = 0.0f; this->unk300 = 0.0f; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } else { this->iframeTimer = 10; @@ -857,7 +857,7 @@ void EnNiw_Update(Actor* thisx, PlayState* play) { this->actor.world.pos.y = this->actor.home.pos.y + 300.0f; } - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.gravity = -2.0f; Math_Vec3f_Copy(&this->unk2A4, &this->actor.home.pos); Math_Vec3f_Copy(&this->unk2B0, &this->actor.home.pos); diff --git a/src/overlays/actors/ovl_En_Nutsball/z_en_nutsball.c b/src/overlays/actors/ovl_En_Nutsball/z_en_nutsball.c index ad872cd210..37872a491f 100644 --- a/src/overlays/actors/ovl_En_Nutsball/z_en_nutsball.c +++ b/src/overlays/actors/ovl_En_Nutsball/z_en_nutsball.c @@ -57,7 +57,7 @@ void EnNutsball_Init(Actor* thisx, PlayState* play) { ActorShape_Init(&this->actor.shape, 400.0f, ActorShadow_DrawCircle, 13.0f); Collider_InitAndSetCylinder(play, &this->collider, &this->actor, &sCylinderInit); this->actor.shape.rot.y = 0; - this->actor.speedXZ = 10.0f; + this->actor.speed = 10.0f; if (this->actor.params == 2) { this->timer = 1; this->timerThreshold = 0; diff --git a/src/overlays/actors/ovl_En_Nwc/z_en_nwc.c b/src/overlays/actors/ovl_En_Nwc/z_en_nwc.c index ee22e9abf5..193d90ed3f 100644 --- a/src/overlays/actors/ovl_En_Nwc/z_en_nwc.c +++ b/src/overlays/actors/ovl_En_Nwc/z_en_nwc.c @@ -172,7 +172,7 @@ s32 EnNwc_IsFound(EnNwc* this, PlayState* play) { } void EnNwc_ChangeState(EnNwc* this, s16 newState) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; switch (newState) { case NWC_STATE_CHECK_BREMAN: this->stateTimer = 10; @@ -209,7 +209,7 @@ void EnNwc_ChangeState(EnNwc* this, s16 newState) { * If previously checking for breman -> select random (NWC_STATE_TURNING, NWC_STATE_HOPPING_FORWARD) */ void EnNwc_ToggleState(EnNwc* this) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; if (this->state != NWC_STATE_CHECK_BREMAN) { EnNwc_ChangeState(this, NWC_STATE_CHECK_BREMAN); } else { @@ -276,7 +276,7 @@ void EnNwc_Follow(EnNwc* this, PlayState* play) { s16 targetUpperBodyRot = 0; s16 targetFootRot = 0; - if (this->actor.speedXZ > 0.0f) { + if (this->actor.speed > 0.0f) { if (this->stateTimer & 4) { targetFootRot = 0x1B58; targetUpperBodyRot = -0x2710; @@ -312,7 +312,7 @@ void EnNwc_Follow(EnNwc* this, PlayState* play) { Math_Vec3f_Diff(&chickCoords[this->actor.home.rot.z], &this->actor.world.pos, &targetVector); if (SQXZ(targetVector) < SQ(5.0f)) { // too close to keep moving, stop - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; // first nwc in the line follows player, the rest follow the previous one if (this->actor.home.rot.z == 1) { @@ -329,7 +329,7 @@ void EnNwc_Follow(EnNwc* this, PlayState* play) { } else if (this->randomRot < -0x1388) { this->randomRot = -0x1388; } - this->actor.speedXZ = 2.0f; + this->actor.speed = 2.0f; newRotY = Math_Vec3f_Yaw(&this->actor.world.pos, &chickCoords[this->actor.home.rot.z]) + this->randomRot; } @@ -358,7 +358,7 @@ void EnNwc_Follow(EnNwc* this, PlayState* play) { if (this->grog->actor.home.rot.x >= 20) { // all chicks have turned into adult cucco, stop and crow Actor_PlaySfx(&this->actor, NA_SE_EV_CHICKEN_CRY_M); this->actionFunc = EnNwc_CrowAtTheEnd; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; Actor_SetScale(&this->actor, 0.01f); } } @@ -383,9 +383,9 @@ void EnNwc_HopForward(EnNwc* this, PlayState* play) { // they only move forward while off the ground, which gives the visual of them hopping to move if (this->actor.bgCheckFlags & 0x1) { // touching floor - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } else { - this->actor.speedXZ = 2.0f; + this->actor.speed = 2.0f; } } @@ -407,7 +407,7 @@ void EnNwc_RunAway(EnNwc* this, PlayState* play) { Actor_PlaySfx(&this->actor, NA_SE_EV_CHICK_SONG); } - this->actor.speedXZ = 2.0f; + this->actor.speed = 2.0f; if (this->actor.bgCheckFlags & 0x8) { // touching wall EnNwc_ToggleState(this); } diff --git a/src/overlays/actors/ovl_En_Ot/z_en_ot.c b/src/overlays/actors/ovl_En_Ot/z_en_ot.c index 193c246fa8..8f5824bb02 100644 --- a/src/overlays/actors/ovl_En_Ot/z_en_ot.c +++ b/src/overlays/actors/ovl_En_Ot/z_en_ot.c @@ -329,7 +329,7 @@ void func_80B5BED4(EnOt* this, PlayState* play) { func_800BE33C(&this->actor.world.pos, &this->unk_360->actor.world.pos, &this->actor.world.rot, 0); Math_SmoothStepToS(&this->actor.shape.rot.y, Actor_WorldYawTowardActor(&this->actor, &this->unk_360->actor), 3, 0xE38, 0x38E); - this->actor.speedXZ = 3.5f; + this->actor.speed = 3.5f; this->actor.world.pos.y = this->unk_360->actor.world.pos.y; Actor_MoveWithoutGravityReverse(&this->actor); } @@ -487,7 +487,7 @@ void func_80B5C64C(EnOt* this, PlayState* play) { } void func_80B5C684(EnOt* this, PlayState* play) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimations, 0, &this->animIndex); this->actionFunc = func_80B5C6DC; } @@ -819,11 +819,11 @@ void func_80B5D160(EnOt* this, PlayState* play) { s32 EnOt_ActorPathing_Move(PlayState* play, ActorPathing* actorPath) { Actor* thisx = actorPath->actor; EnOt* this = (EnOt*)thisx; - f32 sp24 = Math_CosS(-thisx->world.rot.x) * thisx->speedXZ; + f32 sp24 = Math_CosS(-thisx->world.rot.x) * thisx->speed; f32 sp20 = gFramerateDivisorHalf; thisx->velocity.x = Math_SinS(thisx->world.rot.y) * sp24; - thisx->velocity.y = Math_SinS(-thisx->world.rot.x) * thisx->speedXZ; + thisx->velocity.y = Math_SinS(-thisx->world.rot.x) * thisx->speed; thisx->velocity.z = Math_CosS(thisx->world.rot.y) * sp24; this->unk_330.x += (thisx->velocity.x * sp20) + thisx->colChkInfo.displacement.x; @@ -845,7 +845,7 @@ s32 EnOt_ActorPathing_UpdateActorInfo(PlayState* play, ActorPathing* actorPath) s32 sp34; thisx->gravity = 0.0f; - Math_SmoothStepToF(&thisx->speedXZ, 10.0f, 0.8f, 2.0f, 0.0f); + Math_SmoothStepToF(&thisx->speed, 10.0f, 0.8f, 2.0f, 0.0f); sp50.x = actorPath->curPoint.x - thisx->world.pos.x; sp50.y = actorPath->curPoint.y - thisx->world.pos.y; @@ -856,10 +856,10 @@ s32 EnOt_ActorPathing_UpdateActorInfo(PlayState* play, ActorPathing* actorPath) sp44.z = actorPath->curPoint.z - actorPath->prevPoint.z; temp = Math3D_Parallel(&sp50, &sp44); - if ((actorPath->distSqToCurPointXZ < SQ(thisx->speedXZ)) || (temp <= 0.0f)) { + if ((actorPath->distSqToCurPointXZ < SQ(thisx->speed)) || (temp <= 0.0f)) { ret = true; } else { - temp = SQ(thisx->speedXZ) / actorPath->distSqToCurPoint; + temp = SQ(thisx->speed) / actorPath->distSqToCurPoint; sp34 = ABS(actorPath->rotToCurPoint.x - thisx->world.rot.x); sp2C = (s32)(sp34 * temp) + 0xAAA; @@ -884,7 +884,7 @@ void func_80B5D648(EnOt* this, PlayState* play) { this->actorPath.pointOffset.y = 0.0f; this->actorPath.pointOffset.z = 0.0f; this->actor.gravity = 0.0f; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimations, 1, &this->animIndex); this->actor.flags |= ACTOR_FLAG_8000000; this->actor.flags &= ~(ACTOR_FLAG_1 | ACTOR_FLAG_8); diff --git a/src/overlays/actors/ovl_En_Owl/z_en_owl.c b/src/overlays/actors/ovl_En_Owl/z_en_owl.c index 361f7fdec9..743feb0825 100644 --- a/src/overlays/actors/ovl_En_Owl/z_en_owl.c +++ b/src/overlays/actors/ovl_En_Owl/z_en_owl.c @@ -424,8 +424,8 @@ void func_8095B158(EnOwl* this) { } void func_8095B1E4(EnOwl* this, PlayState* play) { - if (this->actor.speedXZ < 6.0f) { - this->actor.speedXZ += 1.0f; + if (this->actor.speed < 6.0f) { + this->actor.speed += 1.0f; } if (this->actor.xzDistToPlayer > 6000.0f) { @@ -434,8 +434,8 @@ void func_8095B1E4(EnOwl* this, PlayState* play) { } void func_8095B254(EnOwl* this, PlayState* play) { - if (this->actor.speedXZ < 6.0f) { - this->actor.speedXZ += 1.0f; + if (this->actor.speed < 6.0f) { + this->actor.speed += 1.0f; } if (this->actionFlags & 1) { @@ -491,7 +491,7 @@ void func_8095B480(EnOwl* this, PlayState* play) { this->unk_3EC = this->actor.home.rot.y; this->actor.world.pos = this->actor.home.pos; func_8095A510(this, play); - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actionFunc = func_8095BE0C; } } @@ -540,8 +540,8 @@ void func_8095B76C(EnOwl* this, PlayState* play) { Math_SmoothStepToS(&this->actor.world.rot.y, sp4A, 6, 0x800, 0x200); this->actor.shape.rot.y = this->actor.world.rot.y; - if (sp44 < SQ(this->actor.speedXZ)) { - this->actor.speedXZ = 0.0f; + if (sp44 < SQ(this->actor.speed)) { + this->actor.speed = 0.0f; points = Lib_SegmentedToVirtual(this->path->points); points += this->unk_3F8; @@ -564,13 +564,13 @@ void func_8095B76C(EnOwl* this, PlayState* play) { } func_8095B0C8(this); } else if (sp44 < SQ(21.0f)) { - if (this->actor.speedXZ > 1.0f) { - this->actor.speedXZ -= 1.0f; + if (this->actor.speed > 1.0f) { + this->actor.speed -= 1.0f; } else { - this->actor.speedXZ = 1.0f; + this->actor.speed = 1.0f; } - } else if (this->actor.speedXZ < 6.0f) { - this->actor.speedXZ += 1.0f; + } else if (this->actor.speed < 6.0f) { + this->actor.speed += 1.0f; } func_8095B06C(this); @@ -745,8 +745,8 @@ void func_8095BF78(EnOwl* this, PlayState* play) { Math_SmoothStepToS(&this->actor.world.rot.y, this->unk_3EC, 2, 0x80, 0x40); this->actor.shape.rot.y = this->actor.world.rot.y; - if (this->actor.speedXZ < 16.0f) { - this->actor.speedXZ += 0.5f; + if (this->actor.speed < 16.0f) { + this->actor.speed += 0.5f; } if ((this->unk_3E4 + 1000.0f) < this->actor.world.pos.y) { @@ -767,11 +767,11 @@ void func_8095C09C(EnOwl* this, PlayState* play) { if (this->skelAnime1.curFrame > 45.0f) { this->actor.velocity.y = 2.0f; this->actor.gravity = 0.0f; - this->actor.speedXZ = 8.0f; + this->actor.speed = 8.0f; } else if (this->skelAnime1.curFrame > 17.0f) { this->actor.velocity.y = 6.0f; this->actor.gravity = 0.0f; - this->actor.speedXZ = 4.0f; + this->actor.speed = 4.0f; } if (this->actionFlags & 1) { diff --git a/src/overlays/actors/ovl_En_Pamera/z_en_pamera.c b/src/overlays/actors/ovl_En_Pamera/z_en_pamera.c index c99c5c9d82..33c95ce08a 100644 --- a/src/overlays/actors/ovl_En_Pamera/z_en_pamera.c +++ b/src/overlays/actors/ovl_En_Pamera/z_en_pamera.c @@ -246,7 +246,7 @@ void func_80BD8758(EnPamera* this, PlayState* play) { ActorCutscene_StartAndSetUnkLinkFields(this->cutscenes[0], &this->actor); Camera_SetToTrackActor(Play_GetCamera(play, ActorCutscene_GetCurrentSubCamId(this->cutscenes[0])), &this->actor); - this->actor.speedXZ = 1.5f; + this->actor.speed = 1.5f; Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 1); this->actor.shape.rot.y = this->actor.home.rot.y; this->actor.world.rot.y = this->actor.home.rot.y; @@ -255,7 +255,7 @@ void func_80BD8758(EnPamera* this, PlayState* play) { } else if ((this->cutscenes[0] != -1) && (this->actor.xzDistToPlayer < 1000.0f)) { ActorCutscene_SetIntentToPlay(this->cutscenes[0]); } else { - this->actor.speedXZ = 1.5f; + this->actor.speed = 1.5f; Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 1); this->actor.shape.rot.y = this->actor.home.rot.y; this->actor.world.rot.y = this->actor.home.rot.y; @@ -290,7 +290,7 @@ void func_80BD8964(EnPamera* this, PlayState* play) { vec.z = this->pathPoints->z; if (Math_Vec3f_StepTo(&this->actor.world.pos, &vec, 1.0f) < 5.0f) { - this->actor.speedXZ = 1.5f; + this->actor.speed = 1.5f; Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 1); SET_WEEKEVENTREG(WEEKEVENTREG_59_01); func_80BD8B50(this); @@ -329,7 +329,7 @@ void func_80BD8B70(EnPamera* this, PlayState* play) { vec.y = this->pathPoints[this->pathIndex].y; vec.z = this->pathPoints[this->pathIndex].z; sp32 = Math_Vec3f_Yaw(&this->actor.world.pos, &vec); - if (Math_Vec3f_StepToXZ(&this->actor.world.pos, &vec, this->actor.speedXZ) > 10.0f) { + if (Math_Vec3f_StepToXZ(&this->actor.world.pos, &vec, this->actor.speed) > 10.0f) { Math_SmoothStepToS(&this->actor.shape.rot.y, sp32, 0xA, 0x3000, 0x100); this->actor.world.rot.y = this->actor.shape.rot.y; } else if (this->pathIndex < (this->pathPointsCount - 1)) { @@ -344,14 +344,14 @@ void func_80BD8B70(EnPamera* this, PlayState* play) { void func_80BD8CCC(EnPamera* this) { this->hideInisdeTimer = 0; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 3); this->actionFunc = func_80BD8D1C; } void func_80BD8D1C(EnPamera* this, PlayState* play) { if (this->hideInisdeTimer++ > 200) { - this->actor.speedXZ = 1.5f; + this->actor.speed = 1.5f; Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 1); func_80BD8D80(this); } @@ -373,7 +373,7 @@ void func_80BD8DB0(EnPamera* this, PlayState* play) { vec.y = this->pathPoints[this->pathIndex].y; vec.z = this->pathPoints[this->pathIndex].z; sp32 = Math_Vec3f_Yaw(&this->actor.world.pos, &vec); - if (Math_Vec3f_StepToXZ(&this->actor.world.pos, &vec, this->actor.speedXZ) > 10.0f) { + if (Math_Vec3f_StepToXZ(&this->actor.world.pos, &vec, this->actor.speed) > 10.0f) { Math_SmoothStepToS(&this->actor.shape.rot.y, sp32, 0xA, 0x3000, 0x100); this->actor.world.rot.y = this->actor.shape.rot.y; } else if (this->pathIndex > 0) { @@ -396,7 +396,7 @@ void func_80BD8F60(EnPamera* this, PlayState* play) { Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 0xA, 0x3000, 0x1000); if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) { Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 2); - this->actor.speedXZ = 3.0f; + this->actor.speed = 3.0f; func_80BD93CC(this, 0, 0); func_80BD8D80(this); } @@ -425,7 +425,7 @@ void func_80BD90AC(EnPamera* this, PlayState* play) { if (Player_GetMask(play) != PLAYER_MASK_STONE && (this->actionFunc != func_80BD8758) && (this->actionFunc != func_80BD8964) && (this->actionFunc != func_80BD8A7C) && (this->actionFunc != func_80BD8F60) && ((this->actionFunc != func_80BD8B70) || (this->pathIndex != 0)) && - ((this->actionFunc != func_80BD8DB0) || (this->actor.speedXZ != 3.0f)) && + ((this->actionFunc != func_80BD8DB0) || (this->actor.speed != 3.0f)) && ((this->actor.xzDistToPlayer < 150.0f) || ((this->actionFunc == func_80BD909C) && (Math_Vec3f_DistXZ(&this->actor.home.pos, &player->actor.world.pos) < 200.0f)))) { @@ -513,7 +513,7 @@ void func_80BD93F4(EnPamera* this, PlayState* play) { void func_80BD94E0(EnPamera* this, PlayState* play) { if ((this->actionFunc != func_80BD8B70) && (this->actionFunc != func_80BD8964) && (this->actionFunc != func_80BD909C) && (this->actionFunc != func_80BD8D1C) && - ((this->actionFunc != func_80BD8DB0) || (this->actor.speedXZ == 3.0f))) { + ((this->actionFunc != func_80BD8DB0) || (this->actor.speed == 3.0f))) { Actor_TrackPlayer(play, &this->actor, &this->headRot, &this->torsoRot, this->actor.focus.pos); } else { Actor_TrackNone(&this->headRot, &this->torsoRot); diff --git a/src/overlays/actors/ovl_En_Pametfrog/z_en_pametfrog.c b/src/overlays/actors/ovl_En_Pametfrog/z_en_pametfrog.c index 201172cf9a..54888a7d82 100644 --- a/src/overlays/actors/ovl_En_Pametfrog/z_en_pametfrog.c +++ b/src/overlays/actors/ovl_En_Pametfrog/z_en_pametfrog.c @@ -497,7 +497,7 @@ void EnPametfrog_SetupFallOffSnapper(EnPametfrog* this, PlayState* play) { Animation_PlayOnce(&this->skelAnime, &gGekkoFallInAirAnim); this->actor.params = GEKKO_FALL_OFF_SNAPPER; - this->actor.speedXZ = 7.0f; + this->actor.speed = 7.0f; this->actor.velocity.y = 15.0f; this->actor.world.rot.y = BINANG_ROT180(this->actor.child->world.rot.y); this->actor.shape.rot.y = this->actor.world.rot.y; @@ -548,9 +548,9 @@ void EnPametfrog_JumpToWall(EnPametfrog* this, PlayState* play) { EnPametfrog_SetupWallCrawl(this); } else if (!(this->actor.bgCheckFlags & 1) || ((this->skelAnime.curFrame > 1.0f) && (this->skelAnime.curFrame < 12.0f))) { - this->actor.speedXZ = 12.0f; + this->actor.speed = 12.0f; } else { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } } @@ -580,7 +580,7 @@ void EnPametfrog_SetupWallCrawl(EnPametfrog* this) { } Actor_PlaySfx(&this->actor, NA_SE_EN_FROG_RUNAWAY); - this->actor.speedXZ = 8.0f; + this->actor.speed = 8.0f; this->timer = Rand_S16Offset(35, 15); this->actionFunc = EnPametfrog_WallCrawl; } @@ -602,8 +602,8 @@ void EnPametfrog_WallCrawl(EnPametfrog* this, PlayState* play) { } else { SkelAnime_Update(&this->skelAnime); this->timer--; - this->actor.speedXZ = 8.0f; - doubleSpeedXZ = this->actor.speedXZ * 2.0f; + this->actor.speed = 8.0f; + doubleSpeedXZ = this->actor.speed * 2.0f; vec1.x = this->actor.world.pos.x + this->unk_2DC.x * 2.0f; vec1.y = this->actor.world.pos.y + this->unk_2DC.y * 2.0f; vec1.z = this->actor.world.pos.z + this->unk_2DC.z * 2.0f; @@ -619,7 +619,7 @@ void EnPametfrog_WallCrawl(EnPametfrog* this, PlayState* play) { isSuccess = func_8086A2CC(this, poly1); Math_Vec3f_Copy(&this->actor.world.pos, &worldPos1); this->actor.floorBgId = bgId1; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } else { if (this->actor.floorPoly != poly2) { isSuccess = func_8086A2CC(this, poly2); @@ -659,7 +659,7 @@ void EnPametfrog_SetupWallPause(EnPametfrog* this) { s32 pad; f32 randFloat; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->skelAnime.playSpeed = 1.5f; if (this->timer != 0) { this->wallRotation = this->unk_2E8.y > 0.0f ? (M_PI / 30) : (-M_PI / 30); @@ -705,7 +705,7 @@ void EnPametfrog_SetupClimbDownWall(EnPametfrog* this) { this->actor.shape.rot.x = 0; this->actor.shape.rot.z = 0; this->actor.colChkInfo.mass = 50; - this->actor.speedXZ = 5.0f; + this->actor.speed = 5.0f; this->collider.base.acFlags &= ~AC_ON; this->actor.velocity.y = 0.0f; this->actor.gravity = -1.0f; @@ -744,9 +744,9 @@ void EnPametfrog_RunToSnapper(EnPametfrog* this, PlayState* play) { this->actor.shape.rot.y = Actor_WorldYawTowardActor(&this->actor, this->actor.child); this->actor.world.rot.y = this->actor.shape.rot.y; if (!(this->actor.bgCheckFlags & 1) || ((this->skelAnime.curFrame > 1.0f) && (this->skelAnime.curFrame < 12.0f))) { - this->actor.speedXZ = 12.0f; + this->actor.speed = 12.0f; } else { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } if ((this->actor.child->params == 1) && (Actor_WorldDistXZToActor(&this->actor, this->actor.child) < 120.0f) && @@ -760,7 +760,7 @@ void EnPametfrog_SetupJumpOnSnapper(EnPametfrog* this) { this->timer = 6; this->collider.base.ocFlags1 &= ~OC1_ON; this->collider.base.acFlags &= ~AC_ON; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.velocity.y = 0.0f; this->actor.shape.rot.y = Actor_WorldYawTowardActor(&this->actor, this->actor.child); this->actor.world.rot.y = this->actor.shape.rot.y; @@ -811,7 +811,7 @@ void EnPametfrog_SetupFallInAir(EnPametfrog* this, PlayState* play) { this->actor.params = GEKKO_RETURN_TO_SNAPPER; } - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.velocity.y = 0.0f; this->collider.base.acFlags &= ~AC_ON; this->timer = 10; @@ -997,7 +997,7 @@ void EnPametfrog_SetupCutscene(EnPametfrog* this) { ActorCutscene_SetIntentToPlay(this->cutscene); this->actionFunc = EnPametfrog_PlayCutscene; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.velocity.y = 0.0f; } @@ -1023,7 +1023,7 @@ void EnPametfrog_PlayCutscene(EnPametfrog* this, PlayState* play) { void EnPametfrog_SetupLookAround(EnPametfrog* this) { Animation_PlayOnce(&this->skelAnime, &gGekkoLookAroundAnim); this->collider.base.atFlags &= ~AT_ON; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.world.rot.y = this->actor.shape.rot.y; this->actionFunc = EnPametfrog_LookAround; } @@ -1054,9 +1054,9 @@ void EnPametfrog_JumpToLink(EnPametfrog* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); EnPametfrog_JumpOnGround(this, play); if (!(this->actor.bgCheckFlags & 1) || (this->skelAnime.curFrame > 1.0f && this->skelAnime.curFrame < 12.0f)) { - this->actor.speedXZ = 8.0f; + this->actor.speed = 8.0f; } else { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } if ((this->collider.base.ocFlags1 & OC1_HIT) && (this->collider.base.ocFlags2 & OC2_HIT_PLAYER) && @@ -1069,7 +1069,7 @@ void EnPametfrog_JumpToLink(EnPametfrog* this, PlayState* play) { void EnPametfrog_SetupMeleeAttack(EnPametfrog* this) { Animation_PlayOnce(&this->skelAnime, &gGekkoBoxingStanceAnim); this->timer = 7; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actionFunc = EnPametfrog_MeleeAttack; } @@ -1113,7 +1113,7 @@ void EnPametfrog_SetupDamage(EnPametfrog* this) { this->timer = 20; this->collider.base.atFlags &= ~AT_ON; this->collider.base.acFlags &= ~AC_ON; - this->actor.speedXZ = 10.0f; + this->actor.speed = 10.0f; Actor_PlaySfx(&this->actor, NA_SE_EN_FROG_DAMAGE); Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 20); func_800BE5CC(&this->actor, &this->collider, 0); @@ -1124,7 +1124,7 @@ void EnPametfrog_SetupDamage(EnPametfrog* this) { void EnPametfrog_Damage(EnPametfrog* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); this->timer--; - Math_StepToF(&this->actor.speedXZ, 0.0f, 0.5f); + Math_StepToF(&this->actor.speed, 0.0f, 0.5f); if (this->timer == 0) { if (this->actor.colChkInfo.health > 0) { EnPametfrog_SetupJumpToLink(this); @@ -1141,7 +1141,7 @@ void EnPametfrog_SetupStun(EnPametfrog* this) { } this->collider.base.atFlags &= ~AT_ON; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; if (this->actor.colChkInfo.health == 0) { this->collider.base.acFlags &= ~AC_ON; diff --git a/src/overlays/actors/ovl_En_Part/z_en_part.c b/src/overlays/actors/ovl_En_Part/z_en_part.c index 527a91b3dd..2a12b9af8f 100644 --- a/src/overlays/actors/ovl_En_Part/z_en_part.c +++ b/src/overlays/actors/ovl_En_Part/z_en_part.c @@ -52,7 +52,7 @@ void func_80865390(EnPart* this, PlayState* play) { this->actor.world.rot.y = this->actor.parent->shape.rot.y + 0x8000; this->unk146 = 100; this->actor.velocity.y = 7.0f; - this->actor.speedXZ = 2.0f; + this->actor.speed = 2.0f; this->actor.gravity = -1.0f; break; } diff --git a/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c b/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c index fe63efd4ef..2ab3024f20 100644 --- a/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c +++ b/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c @@ -378,7 +378,7 @@ void func_80897864(EnPeehat* this) { void func_80897910(EnPeehat* this, PlayState* play) { Player* player = GET_PLAYER(play); - Math_StepToF(&this->actor.speedXZ, 3.0f, 0.25f); + Math_StepToF(&this->actor.speed, 3.0f, 0.25f); Math_StepToF(&this->actor.world.pos.y, this->actor.floorHeight + 80.0f, 3.0f); SkelAnime_Update(&this->skelAnime); if (!gSaveContext.save.isNight && (Math_Vec3f_DistXZ(&this->actor.home.pos, &player->actor.world.pos) < 1200.0f)) { @@ -396,7 +396,7 @@ void func_80897910(EnPeehat* this, PlayState* play) { void func_80897A34(EnPeehat* this) { Animation_PlayLoop(&this->skelAnime, &object_ph_Anim_0005C4); this->unk_2B0 = 30; - this->actor.speedXZ = 5.3f; + this->actor.speed = 5.3f; this->colliderTris.base.atFlags |= AT_ON; this->actionFunc = func_80897A94; } @@ -469,7 +469,7 @@ void func_80897D48(EnPeehat* this, PlayState* play) { Vec3f sp34; Math_StepToF(&this->actor.shape.yOffset, -1000.0f, 50.0f); - Math_StepToF(&this->actor.speedXZ, 0.0f, 1.0f); + Math_StepToF(&this->actor.speed, 0.0f, 1.0f); Math_ScaledStepToS(&this->actor.shape.rot.x, 0, 50); if (SkelAnime_Update(&this->skelAnime)) { func_80897498(this); @@ -490,7 +490,7 @@ void func_80897D48(EnPeehat* this, PlayState* play) { void func_80897EAC(EnPeehat* this) { Animation_PlayLoop(&this->skelAnime, &object_ph_Anim_0005C4); - this->actor.speedXZ = Rand_ZeroFloat(0.5f) + 2.5f; + this->actor.speed = Rand_ZeroFloat(0.5f) + 2.5f; this->unk_2B0 = Rand_ZeroFloat(10.0f) + 10.0f; this->colliderTris.base.atFlags |= AT_ON; this->colliderSphere.base.acFlags |= AC_ON; @@ -512,7 +512,7 @@ void func_80897F44(EnPeehat* this, PlayState* play) { this->unk_2B0--; if (this->unk_2B0 <= 0) { - this->actor.speedXZ = Rand_ZeroFloat(0.5f) + 2.5f; + this->actor.speed = Rand_ZeroFloat(0.5f) + 2.5f; this->unk_2B0 = Rand_ZeroFloat(10.0f) + 10.0f; this->unk_2B6 = randPlusMinusPoint5Scaled(1000.0f); } @@ -536,7 +536,7 @@ void func_80897F44(EnPeehat* this, PlayState* play) { void func_80898124(EnPeehat* this) { this->actionFunc = func_80898144; - this->actor.speedXZ = 2.5f; + this->actor.speed = 2.5f; } void func_80898144(EnPeehat* this, PlayState* play) { @@ -574,7 +574,7 @@ void func_80898144(EnPeehat* this, PlayState* play) { void func_808982E0(EnPeehat* this) { Animation_MorphToPlayOnce(&this->skelAnime, &object_ph_Anim_000844, -4.0f); - this->actor.speedXZ = -9.0f; + this->actor.speed = -9.0f; this->actor.world.rot.y = this->actor.yawTowardsPlayer; this->actionFunc = func_80898338; } @@ -583,7 +583,7 @@ void func_80898338(EnPeehat* this, PlayState* play) { this->unk_2B4 += this->unk_2B2; SkelAnime_Update(&this->skelAnime); - if (Math_StepToF(&this->actor.speedXZ, 0.0f, 0.5f)) { + if (Math_StepToF(&this->actor.speed, 0.0f, 0.5f)) { if (this->actor.params != 0) { func_800B3030(play, &this->actor.world.pos, &gZeroVec3f, &gZeroVec3f, 40, 7, 0); SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 30, NA_SE_EN_EXTINCT); @@ -599,7 +599,7 @@ void func_80898338(EnPeehat* this, PlayState* play) { void func_80898414(EnPeehat* this) { func_800BE568(&this->actor, &this->colliderSphere); this->unk_2B2 = 0; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actionFunc = func_80898454; } @@ -625,7 +625,7 @@ void func_808984E0(EnPeehat* this) { Actor_PlaySfx(&this->actor, NA_SE_EN_PIHAT_DAMAGE); this->unk_2B2 = 4000; this->unk_2B0 = 14; - this->actor.speedXZ = 10.0f; + this->actor.speed = 10.0f; Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 14); this->colliderSphere.base.acFlags &= ~AC_ON; this->unk_2C4 = 0.0f; @@ -640,7 +640,7 @@ void func_80898594(EnPeehat* this, PlayState* play) { this->unk_2B4 += this->unk_2B2; Math_ScaledStepToS(&this->unk_2B2, 4000, 250); Math_StepToF(&this->actor.world.pos.y, this->actor.floorHeight + 88.5f, 3.0f); - Math_StepToF(&this->actor.speedXZ, 0.0f, 0.5f); + Math_StepToF(&this->actor.speed, 0.0f, 0.5f); this->unk_2B0--; if (this->unk_2B0 <= 0) { if (this->actor.colChkInfo.health == 0) { @@ -930,7 +930,7 @@ void EnPeehat_Draw(Actor* thisx, PlayState* play) { SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, EnPeehat_OverrideLimbDraw, (this->actor.params == 0) ? EnPeehat_PostLimbDraw : NULL, &this->actor); - if ((this->actor.speedXZ != 0.0f) || (this->actor.velocity.y != 0.0f)) { + if ((this->actor.speed != 0.0f) || (this->actor.velocity.y != 0.0f)) { Matrix_MultVecZ(4500.0f, &sp40); Matrix_MultVecZ(-4500.0f, &sp4C); Matrix_MultVecX(4500.0f, &sp58); diff --git a/src/overlays/actors/ovl_En_Pm/z_en_pm.c b/src/overlays/actors/ovl_En_Pm/z_en_pm.c index f612a7927a..f1f34b6bea 100644 --- a/src/overlays/actors/ovl_En_Pm/z_en_pm.c +++ b/src/overlays/actors/ovl_En_Pm/z_en_pm.c @@ -1023,14 +1023,14 @@ s32 func_80AF87C4(EnPm* this, PlayState* play) { func_80AF7E98(this, 0); this->unk_258 = 255; this->unk_380 = true; - this->actor.speedXZ = 4.0f; + this->actor.speed = 4.0f; this->actor.gravity = -1.0f; } ret = true; } else if (this->unk_380) { this->unk_258 = 0; this->unk_380 = false; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } return ret; } diff --git a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c index 365930cd5d..14c5c62078 100644 --- a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c +++ b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c @@ -309,7 +309,7 @@ void EnPoSisters_CheckZTarget(EnPoSisters* this, PlayState* play) { void EnPoSisters_SetupObserverIdle(EnPoSisters* this) { Animation_MorphToLoop(&this->skelAnime, &gPoeSistersSwayAnim, -3.0f); - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->laughTimer = Rand_S16Offset(100, 50); this->actionFunc = EnPoSisters_ObserverIdle; } @@ -330,7 +330,7 @@ void EnPoSisters_ObserverIdle(EnPoSisters* this, PlayState* play) { void EnPoSisters_SetupAimlessIdleFlying2(EnPoSisters* this) { Animation_MorphToLoop(&this->skelAnime, &gPoeSistersSwayAnim, -3.0f); this->idleFlyingAnimationCounter = Rand_S16Offset(2, 3); - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actionFunc = EnPoSisters_AimlessIdleFlying2; } @@ -360,14 +360,14 @@ void EnPoSisters_SetupAimlessIdleFlying(EnPoSisters* this) { void EnPoSisters_AimlessIdleFlying(EnPoSisters* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); - Math_StepToF(&this->actor.speedXZ, 1.0f, 0.2f); + Math_StepToF(&this->actor.speed, 1.0f, 0.2f); if (Animation_OnFrame(&this->skelAnime, 0.0f)) { DECR(this->idleFlyingAnimationCounter); } if ((this->actor.xzDistToPlayer < 600.0f) && (fabsf(this->actor.playerHeightRel + 5.0f) < 30.0f)) { EnPoSisters_SetupInvestigating(this); - } else if ((this->idleFlyingAnimationCounter == 0) && Math_StepToF(&this->actor.speedXZ, 0.0f, 0.2f)) { + } else if ((this->idleFlyingAnimationCounter == 0) && Math_StepToF(&this->actor.speed, 0.0f, 0.2f)) { // ! @bug: this is never reached because speedXZ is reduced // at the same rate it is increased at the top of this function EnPoSisters_SetupAimlessIdleFlying2(this); @@ -395,7 +395,7 @@ void EnPoSisters_Investigating(EnPoSisters* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); yawDiff = this->actor.yawTowardsPlayer - player->actor.shape.rot.y; - Math_StepToF(&this->actor.speedXZ, 2.0f, 0.2f); + Math_StepToF(&this->actor.speed, 2.0f, 0.2f); if (yawDiff > 0x3000) { Math_ScaledStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer + 0x3000, 0x71C); @@ -422,7 +422,7 @@ void EnPoSisters_SetupSpinUp(EnPoSisters* this) { } Animation_MorphToLoop(&this->skelAnime, &gPoeSistersAttackAnim, -5.0f); - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->spinupTimer = Animation_GetLastFrame(&gPoeSistersAttackAnim.common) * 3 + 3; this->poSisterFlags &= ~POE_SISTERS_FLAG_UPDATE_SHAPE_ROT; this->actionFunc = EnPoSisters_SpinUp; @@ -440,7 +440,7 @@ void EnPoSisters_SpinUp(EnPoSisters* this, PlayState* play) { } void EnPoSisters_SetupSpinAttack(EnPoSisters* this) { - this->actor.speedXZ = 5.0f; + this->actor.speed = 5.0f; if (this->type == POE_SISTERS_TYPE_MEG) { this->collider.base.colType = COLTYPE_METAL; this->collider.base.acFlags |= AC_HARD; @@ -497,9 +497,9 @@ void EnPoSisters_SetupAttackConnect(EnPoSisters* this) { void EnPoSisters_AttackConnectDrift(EnPoSisters* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); - this->actor.shape.rot.y -= (s16)(this->actor.speedXZ * 10.0f * 128.0f); + this->actor.shape.rot.y -= (s16)(this->actor.speed * 10.0f * 128.0f); - if (Math_StepToF(&this->actor.speedXZ, 0.0f, 0.1f)) { // wait to stop moving + if (Math_StepToF(&this->actor.speed, 0.0f, 0.1f)) { // wait to stop moving this->actor.world.rot.y = this->actor.shape.rot.y; if (this->type != POE_SISTERS_TYPE_MEG) { EnPoSisters_SetupAimlessIdleFlying(this); @@ -517,7 +517,7 @@ void EnPoSisters_SetupDamageFlinch(EnPoSisters* this) { } if (this->type != POE_SISTERS_TYPE_MEG) { - this->actor.speedXZ = 10.0f; + this->actor.speed = 10.0f; } this->poSisterFlags &= @@ -552,7 +552,7 @@ void EnPoSisters_DamageFlinch(EnPoSisters* this, PlayState* play) { EnPoSisters_MatchPlayerXZ(this, play); } else if (this->type != POE_SISTERS_TYPE_MEG) { - Math_StepToF(&this->actor.speedXZ, 0.0f, 0.5f); + Math_StepToF(&this->actor.speed, 0.0f, 0.5f); } } @@ -562,7 +562,7 @@ void EnPoSisters_SetupFlee(EnPoSisters* this) { this->fleeTimer = 5; this->poSisterFlags |= (POE_SISTERS_FLAG_MATCH_PLAYER_HEIGHT | POE_SISTERS_FLAG_UPDATE_SHAPE_ROT | POE_SISTERS_FLAG_CHECK_AC); - this->actor.speedXZ = 5.0f; + this->actor.speed = 5.0f; this->actionFunc = EnPoSisters_Flee; } @@ -587,7 +587,7 @@ void EnPoSisters_SetupSpinToInvis(EnPoSisters* this) { Animation_Change(&this->skelAnime, &gPoeSistersAppearDisappearAnim, 1.5f, 0.0f, Animation_GetLastFrame(&gPoeSistersAppearDisappearAnim.common), ANIMMODE_ONCE, -3.0f); this->invisibleTimer = 100; // 5 seconds - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.world.rot.y = this->actor.shape.rot.y; this->poSisterFlags &= ~(POE_SISTERS_FLAG_CHECK_Z_TARGET | POE_SISTERS_FLAG_CHECK_AC); Actor_PlaySfx(&this->actor, NA_SE_EN_PO_DISAPPEAR); @@ -620,7 +620,7 @@ void EnPoSisters_SetupSpinBackToVisible(EnPoSisters* this, PlayState* play) { } this->spinInvisibleTimer = 15; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; Actor_PlaySfx(&this->actor, NA_SE_EN_STALKIDS_APPEAR); this->poSisterFlags &= ~POE_SISTERS_FLAG_CHECK_AC; this->actionFunc = EnPoSisters_SpinBackToVisible; @@ -654,7 +654,7 @@ void EnPoSisters_SpinBackToVisible(EnPoSisters* this, PlayState* play) { void EnPoSisters_SetupDeathStage1(EnPoSisters* this) { this->deathTimer = 0; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.world.pos.y += 42.0f; this->actor.shape.yOffset = -6000.0f; this->actor.flags &= ~ACTOR_FLAG_1; diff --git a/src/overlays/actors/ovl_En_Poh/z_en_poh.c b/src/overlays/actors/ovl_En_Poh/z_en_poh.c index 21cd9d8c44..aeb741bbc9 100644 --- a/src/overlays/actors/ovl_En_Poh/z_en_poh.c +++ b/src/overlays/actors/ovl_En_Poh/z_en_poh.c @@ -216,7 +216,7 @@ void func_80B2CA4C(EnPoh* this) { Animation_PlayLoop(&this->skelAnime, &object_po_Anim_0015B0); this->unk_18E = Rand_S16Offset(2, 3); this->actionFunc = func_80B2CAA4; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } void func_80B2CAA4(EnPoh* this, PlayState* play) { @@ -247,7 +247,7 @@ void func_80B2CB60(EnPoh* this) { void func_80B2CBBC(EnPoh* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); - Math_StepToF(&this->actor.speedXZ, 1.0f, 0.2f); + Math_StepToF(&this->actor.speed, 1.0f, 0.2f); if (Animation_OnFrame(&this->skelAnime, 0.0f) && (this->unk_18E != 0)) { this->unk_18E--; } @@ -277,7 +277,7 @@ void func_80B2CD14(EnPoh* this) { Animation_PlayLoop(&this->skelAnime, &object_po_Anim_000A60); this->actionFunc = func_80B2CD64; this->unk_18E = 0; - this->actor.speedXZ = 2.0f; + this->actor.speed = 2.0f; } void func_80B2CD64(EnPoh* this, PlayState* play) { @@ -315,7 +315,7 @@ void func_80B2CD64(EnPoh* this, PlayState* play) { void func_80B2CEC8(EnPoh* this) { Animation_MorphToLoop(&this->skelAnime, &object_po_Anim_0001A8, -6.0f); this->unk_18E = 12; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; Actor_PlaySfx(&this->actor, NA_SE_EN_PO_LAUGH); this->actionFunc = func_80B2CF28; } @@ -333,7 +333,7 @@ void func_80B2CF28(EnPoh* this, PlayState* play) { if (this->unk_18E >= 10) { Math_ScaledStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 0xAAA); } else if (this->unk_18E == 9) { - this->actor.speedXZ = 5.0f; + this->actor.speed = 5.0f; this->skelAnime.playSpeed = 2.0f; } else if (this->unk_18E == 0) { func_80B2CB60(this); @@ -345,13 +345,13 @@ void func_80B2CFF8(EnPoh* this) { Animation_MorphToPlayOnce(&this->skelAnime, &object_po_Anim_0004EC, -6.0f); func_800BE504(&this->actor, &this->colliderCylinder); this->colliderCylinder.base.acFlags &= ~AC_ON; - this->actor.speedXZ = 5.0f; + this->actor.speed = 5.0f; Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 16); this->actionFunc = func_80B2D07C; } void func_80B2D07C(EnPoh* this, PlayState* play) { - Math_StepToF(&this->actor.speedXZ, 0.0f, 0.5f); + Math_StepToF(&this->actor.speed, 0.0f, 0.5f); if (SkelAnime_Update(&this->skelAnime)) { if (this->actor.colChkInfo.health != 0) { func_80B2DAD0(this); @@ -385,7 +385,7 @@ void func_80B2D140(EnPoh* this, PlayState* play) { } void func_80B2D2C0(EnPoh* this) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.world.rot.y = this->actor.shape.rot.y; this->unk_18E = 0; this->actor.hintId = TATL_HINT_ID_NONE; @@ -445,7 +445,7 @@ void func_80B2D300(EnPoh* this, PlayState* play) { void func_80B2D5DC(EnPoh* this) { Animation_PlayOnce(&this->skelAnime, &object_po_Anim_000A60); this->actionFunc = func_80B2D628; - this->actor.speedXZ = -5.0f; + this->actor.speed = -5.0f; } void func_80B2D628(EnPoh* this, PlayState* play) { @@ -454,7 +454,7 @@ void func_80B2D628(EnPoh* this, PlayState* play) { func_80B2CB60(this); this->unk_18E = 23; } else { - Math_StepToF(&this->actor.speedXZ, 0.0f, 0.5f); + Math_StepToF(&this->actor.speed, 0.0f, 0.5f); this->actor.shape.rot.y += 0x1000; } } @@ -463,7 +463,7 @@ void func_80B2D694(EnPoh* this) { Animation_PlayLoop(&this->skelAnime, &object_po_Anim_0015B0); this->unk_192 = BINANG_ROT180(this->actor.world.rot.y); this->actionFunc = func_80B2D6EC; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } void func_80B2D6EC(EnPoh* this, PlayState* play) { @@ -482,7 +482,7 @@ void func_80B2D6EC(EnPoh* this, PlayState* play) { void func_80B2D76C(EnPoh* this) { this->unk_18C = 32; this->unk_192 = 0x2000; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.world.rot.y = this->actor.shape.rot.y; Actor_PlaySfx(&this->actor, NA_SE_EN_PO_DISAPPEAR); Actor_PlaySfx(&this->actor, NA_SE_EN_PO_LAUGH); @@ -513,7 +513,7 @@ void func_80B2D7D4(EnPoh* this, PlayState* play) { void func_80B2D924(EnPoh* this) { this->unk_18C = 0; this->unk_192 = 0x2000; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; Actor_PlaySfx(&this->actor, NA_SE_EN_STALKIDS_APPEAR); Actor_PlaySfx(&this->actor, NA_SE_EN_PO_LAUGH); this->colliderCylinder.base.acFlags &= ~AC_ON; @@ -539,7 +539,7 @@ void func_80B2D980(EnPoh* this, PlayState* play) { void func_80B2DAD0(EnPoh* this) { Animation_MorphToLoop(&this->skelAnime, &object_po_Anim_0006E0, -5.0f); - this->actor.speedXZ = 5.0f; + this->actor.speed = 5.0f; this->actor.world.rot.y = BINANG_ROT180(this->actor.shape.rot.y); this->colliderCylinder.base.acFlags |= AC_ON; this->unk_18E = 200; diff --git a/src/overlays/actors/ovl_En_Pp/z_en_pp.c b/src/overlays/actors/ovl_En_Pp/z_en_pp.c index be4f1e3c30..bf9f242b44 100644 --- a/src/overlays/actors/ovl_En_Pp/z_en_pp.c +++ b/src/overlays/actors/ovl_En_Pp/z_en_pp.c @@ -537,7 +537,7 @@ void EnPp_Idle(EnPp* this, PlayState* play) { posToLookAt.x += randPlusMinusPoint5Scaled(50.0f); posToLookAt.z += randPlusMinusPoint5Scaled(50.0f); this->targetRotY = Math_Vec3f_Yaw(&this->actor.world.pos, &posToLookAt); - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; if (this->animIndex != EN_PP_ANIM_IDLE) { EnPp_ChangeAnim(this, EN_PP_ANIM_IDLE); } @@ -561,7 +561,7 @@ void EnPp_Idle(EnPp* this, PlayState* play) { if ((this->maskBounceRotationalVelocity < 0x64) && (fabsf(this->actor.world.rot.y - this->targetRotY) < 100.0f)) { - Math_ApproachF(&this->actor.speedXZ, 1.0f, 0.3f, 1.0f); + Math_ApproachF(&this->actor.speed, 1.0f, 0.3f, 1.0f); } Math_SmoothStepToS(&this->actor.world.rot.y, this->targetRotY, 1, @@ -611,7 +611,7 @@ void EnPp_Charge(EnPp* this, PlayState* play) { Math_SmoothStepToS(&this->maskBounceRotationalVelocity, 0, 1, 0x1F4, 0); if (!this->actionVar.isCharging) { - Math_ApproachZeroF(&this->actor.speedXZ, 0.5f, 1.0f); + Math_ApproachZeroF(&this->actor.speed, 0.5f, 1.0f); if (fabsf(this->actor.world.rot.y - this->targetRotY) < 100.0f) { if (this->chargesInStraightLines) { this->actor.world.rot.y = this->targetRotY; @@ -629,13 +629,13 @@ void EnPp_Charge(EnPp* this, PlayState* play) { } } else if (this->animIndex == EN_PP_ANIM_CHARGE) { if (EnPp_CheckCollision(this, play) != EN_PP_COLLISION_RESULT_OK) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; EnPp_SetupRoar(this); return; } if (!this->chargesInStraightLines) { - Math_ApproachF(&this->actor.speedXZ, 10.0f, 0.3f, 1.0f); + Math_ApproachF(&this->actor.speed, 10.0f, 0.3f, 1.0f); } else { Math_ApproachF(&this->actor.world.pos.x, this->targetPos.x, 0.5f, fabsf(Math_SinS(this->targetRotY) * this->chargeAndBounceSpeed)); @@ -661,9 +661,9 @@ void EnPp_Charge(EnPp* this, PlayState* play) { return; } else { if (EN_PP_GET_TYPE(&this->actor) != EN_PP_TYPE_MASKED) { - this->actor.speedXZ *= -1.0f; + this->actor.speed *= -1.0f; } else { - this->actor.speedXZ *= -0.5f; + this->actor.speed *= -0.5f; } EnPp_SetupRoar(this); @@ -682,7 +682,7 @@ void EnPp_SetupAttack(EnPp* this) { EnPp_ChangeAnim(this, EN_PP_ANIM_ATTACK); this->hornColliderOn = true; this->action = EN_PP_ACTION_ATTACK; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actionFunc = EnPp_Attack; } @@ -711,7 +711,7 @@ void EnPp_SetupBounced(EnPp* this) { this->targetPos.x += distanceFromWorldPos.x; this->targetPos.z += distanceFromWorldPos.z; EnPp_ChangeAnim(this, EN_PP_ANIM_DAMAGE); - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->action = EN_PP_ACTION_BOUNCED; this->chargeAndBounceSpeed = 14.0f; this->actionFunc = EnPp_Bounced; @@ -751,7 +751,7 @@ void EnPp_Roar(EnPp* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); if (EnPp_CheckCollision(this, play) == EN_PP_COLLISION_RESULT_ABOUT_TO_RUN_OFF_LEDGE) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->chargeAndBounceSpeed = 0.0f; } @@ -771,8 +771,8 @@ void EnPp_Roar(EnPp* this, PlayState* play) { } } - Math_ApproachZeroF(&this->actor.speedXZ, 0.5f, 1.0f); - if ((this->actor.speedXZ > 0.3f) && (this->secondaryTimer == 0)) { + Math_ApproachZeroF(&this->actor.speed, 0.5f, 1.0f); + if ((this->actor.speed > 0.3f) && (this->secondaryTimer == 0)) { EnPp_SpawnDust(this, play); this->secondaryTimer = 3; } @@ -793,7 +793,7 @@ void EnPp_SetupJump(EnPp* this) { this->secondaryTimer = 0; this->actionVar.hasLandedFromJump = false; this->timer = this->secondaryTimer; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.velocity.y = 20.0f; this->actor.gravity = -3.0f; EnPp_ChangeAnim(this, EN_PP_ANIM_JUMP); @@ -853,7 +853,7 @@ void EnPp_SetupStunnedOrFrozen(EnPp* this) { this->drawDmgEffType = ACTOR_DRAW_DMGEFF_FIRE; } - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->action = EN_PP_ACTION_STUNNED_OR_FROZEN; this->actionFunc = EnPp_StunnedOrFrozen; } @@ -922,7 +922,7 @@ void EnPp_SetupDamaged(EnPp* this, PlayState* play) { if (EnPp_CheckCollision(this, play) == EN_PP_COLLISION_RESULT_ABOUT_TO_RUN_OFF_LEDGE) { this->damagedVelocity.z = 0.0f; this->damagedVelocity.x = 0.0f; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } Actor_PlaySfx(&this->actor, NA_SE_EN_HIPLOOP_DAMAGE); @@ -957,7 +957,7 @@ void EnPp_Damaged(EnPp* this, PlayState* play) { if (EnPp_CheckCollision(this, play) == EN_PP_COLLISION_RESULT_ABOUT_TO_RUN_OFF_LEDGE) { this->damagedVelocity.z = 0.0f; this->damagedVelocity.x = 0.0f; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } if ((fabsf(this->actor.home.pos.y - this->actor.world.pos.y) > 100.0f) && @@ -1172,7 +1172,7 @@ void EnPp_BodyPart_SetupMove(EnPp* this) { this->deadBodyPartRotationalVelocity.x = (this->deadBodyPartIndex * 0x2E) + 0xFF00; this->deadBodyPartRotationalVelocity.z = (this->deadBodyPartIndex * 0x2E) + 0xFF00; if (EN_PP_GET_TYPE(&this->actor) != EN_PP_TYPE_BODY_PART_BODY) { - this->actor.speedXZ = Rand_ZeroFloat(4.0f) + 4.0f; + this->actor.speed = Rand_ZeroFloat(4.0f) + 4.0f; this->actor.world.rot.y = ((s32)randPlusMinusPoint5Scaled(223.0f) + 0x1999) * this->deadBodyPartIndex; } @@ -1295,7 +1295,7 @@ void EnPp_UpdateDamage(EnPp* this, PlayState* play) { (this->actor.colChkInfo.damageEffect != EN_PP_DMGEFF_JUMP)) { attackDealsDamage = true; this->hasBeenDamaged = true; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; if (this->actor.colChkInfo.damageEffect == EN_PP_DMGEFF_FIRE) { this->drawDmgEffTimer = 40; this->drawDmgEffType = ACTOR_DRAW_DMGEFF_FIRE; @@ -1350,7 +1350,7 @@ void EnPp_UpdateDamage(EnPp* this, PlayState* play) { this->secondaryTimer = 0; this->timer = 10; this->maskBounceRotationalVelocity = 0x20D0; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; if (this->action == EN_PP_ACTION_CHARGE) { this->actionVar.isCharging = false; EnPp_ChangeAnim(this, EN_PP_ANIM_TURN_TO_FACE_PLAYER); diff --git a/src/overlays/actors/ovl_En_Pr/z_en_pr.c b/src/overlays/actors/ovl_En_Pr/z_en_pr.c index 703d7a90b6..ffcace89b0 100644 --- a/src/overlays/actors/ovl_En_Pr/z_en_pr.c +++ b/src/overlays/actors/ovl_En_Pr/z_en_pr.c @@ -241,7 +241,7 @@ void func_80A326F0(EnPr* this) { func_80A3242C(this, 0); } this->unk_206 = 0; - this->actor.speedXZ = 1.0f; + this->actor.speed = 1.0f; this->actionFunc = func_80A32740; } @@ -343,19 +343,19 @@ void func_80A32AF8(EnPr* this) { void func_80A32B20(EnPr* this, PlayState* play) { Player* player = GET_PLAYER(play); - this->actor.speedXZ = BREG(57) + 3.0f; + this->actor.speed = BREG(57) + 3.0f; Math_SmoothStepToS(&this->unk_22C, this->actor.yawTowardsPlayer, BREG(49) + 1, BREG(50) + 1000, BREG(51)); this->unk_2B8 = D_80A338C0[GET_PLAYER_FORM] + player->actor.world.pos.y; func_80A324E0(this, play); if (!(player->stateFlags1 & PLAYER_STATE1_8000000)) { this->skelAnime.playSpeed = 1.0f; - this->actor.speedXZ = 1.0f; + this->actor.speed = 1.0f; func_80A32854(this); } else if (this->unk_2C8 < sqrtf(SQ(player->actor.world.pos.x - this->actor.home.pos.x) + SQ(player->actor.world.pos.z - this->actor.home.pos.z))) { this->skelAnime.playSpeed = 1.0f; - this->actor.speedXZ = 1.0f; + this->actor.speed = 1.0f; func_80A32854(this); } else if (!func_80A325E4(this) && (this->actor.xzDistToPlayer < 200.0f) && (fabsf(player->actor.world.pos.y - this->actor.world.pos.y) < 80.0f)) { @@ -377,7 +377,7 @@ void func_80A32D28(EnPr* this, PlayState* play) { if (!(player->stateFlags1 & PLAYER_STATE1_8000000)) { this->skelAnime.playSpeed = 1.0f; - this->actor.speedXZ = 1.0f; + this->actor.speed = 1.0f; func_80A32854(this); } else { Math_SmoothStepToS(&this->unk_22C, this->actor.yawTowardsPlayer, BREG(49) + 1, BREG(50) + 1000, BREG(51)); @@ -387,7 +387,7 @@ void func_80A32D28(EnPr* this, PlayState* play) { if (this->unk_2C8 < sqrtf(SQ(player->actor.world.pos.x - this->actor.home.pos.x) + SQ(player->actor.world.pos.z - this->actor.home.pos.z))) { this->skelAnime.playSpeed = 1.0f; - this->actor.speedXZ = 1.0f; + this->actor.speed = 1.0f; func_80A32854(this); } } @@ -396,7 +396,7 @@ void func_80A32D28(EnPr* this, PlayState* play) { void func_80A32E60(EnPr* this) { func_80A3242C(this, 4); this->unk_206 = 6; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actionFunc = func_80A32EA4; } diff --git a/src/overlays/actors/ovl_En_Pr2/z_en_pr2.c b/src/overlays/actors/ovl_En_Pr2/z_en_pr2.c index 3f0b3ee86d..ab4aa43150 100644 --- a/src/overlays/actors/ovl_En_Pr2/z_en_pr2.c +++ b/src/overlays/actors/ovl_En_Pr2/z_en_pr2.c @@ -271,9 +271,9 @@ void func_80A745FC(EnPr2* this, PlayState* play) { Math_ApproachF(&this->unk_204, 0.02f, 0.1f, 0.005f); if (this->path->unk2 < this->unk_1D0) { - Math_ApproachF(&this->actor.speedXZ, 5.0f, 0.3f, 1.0f); + Math_ApproachF(&this->actor.speed, 5.0f, 0.3f, 1.0f); } else { - Math_ApproachF(&this->actor.speedXZ, 10.0f, 0.3f, 1.0f); + Math_ApproachF(&this->actor.speed, 10.0f, 0.3f, 1.0f); } if ((this->path != NULL) && !SubS_CopyPointFromPath(this->path, this->unk_1D0, &this->unk_21C)) { @@ -334,7 +334,7 @@ void func_80A748E8(EnPr2* this, PlayState* play) { } if (this->unk_1F4 != 255) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; Math_SmoothStepToS(&this->unk_1F4, 0, 1, 30, 100); if (this->unk_1F4 < 2) { Actor_Kill(&this->actor); @@ -370,7 +370,7 @@ void func_80A748E8(EnPr2* this, PlayState* play) { sp4C = true; this->unk_1DC = 0; Math_Vec3f_Copy(&this->unk_21C, &this->unk_228); - Math_ApproachF(&this->actor.speedXZ, 3.0f, 0.3f, 0.2f); + Math_ApproachF(&this->actor.speed, 3.0f, 0.3f, 0.2f); } } break; @@ -383,7 +383,7 @@ void func_80A748E8(EnPr2* this, PlayState* play) { this->unk_1D6 = true; } - Math_ApproachZeroF(&this->actor.speedXZ, 0.1f, 0.2f); + Math_ApproachZeroF(&this->actor.speed, 0.1f, 0.2f); if (this->unk_1DA == 1) { this->unk_1D8 = Rand_S16Offset(100, 100); @@ -393,7 +393,7 @@ void func_80A748E8(EnPr2* this, PlayState* play) { Math_Vec3f_Copy(&this->unk_21C, &sp3C); } } else { - Math_ApproachF(&this->actor.speedXZ, 2.0f, 0.3f, 0.2f); + Math_ApproachF(&this->actor.speed, 2.0f, 0.3f, 0.2f); Math_Vec3f_Copy(&sp3C, &this->actor.world.pos); sp3C.x += Math_SinS(this->actor.world.rot.y) * 20.0f; sp3C.z += Math_CosS(this->actor.world.rot.y) * 20.0f; @@ -452,7 +452,7 @@ void func_80A74E90(EnPr2* this, PlayState* play) { } if (this->unk_1F4 != 255) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; Math_SmoothStepToS(&this->unk_1F4, 0, 1, 30, 100); if (this->unk_1F4 < 2) { Actor_Kill(&this->actor); @@ -470,7 +470,7 @@ void func_80A74E90(EnPr2* this, PlayState* play) { } this->unk_21C.y = player->actor.world.pos.y + 30.0f + this->unk_20C; - Math_ApproachF(&this->actor.speedXZ, 5.0f, 0.3f, 1.0f); + Math_ApproachF(&this->actor.speed, 5.0f, 0.3f, 1.0f); this->unk_1F0 = 0; if (this->unk_1E0 == 2) { @@ -532,7 +532,7 @@ void func_80A751B4(EnPr2* this) { this->actor.shape.rot.y = this->actor.world.rot.y; this->actor.shape.rot.z = this->actor.world.rot.z; this->unk_1D8 = 30; - this->actor.speedXZ = Rand_ZeroFloat(0.5f); + this->actor.speed = Rand_ZeroFloat(0.5f); this->actor.world.rot.y = randPlusMinusPoint5Scaled(0x8000); } Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 10); @@ -614,7 +614,7 @@ void func_80A755D8(EnPr2* this, PlayState* play) { Actor_ApplyDamage(&this->actor); if ((this->actor.colChkInfo.health <= 0) && (this->unk_1D4 != 3)) { Enemy_StartFinishingBlow(play, &this->actor); - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; Actor_PlaySfx(&this->actor, NA_SE_EN_PIRANHA_DEAD); if (this->unk_218 >= 0) { @@ -627,7 +627,7 @@ void func_80A755D8(EnPr2* this, PlayState* play) { } if (this->collider.base.atFlags & AT_BOUNCED) { - this->actor.speedXZ = -10.0f; + this->actor.speed = -10.0f; } } diff --git a/src/overlays/actors/ovl_En_Prz/z_en_prz.c b/src/overlays/actors/ovl_En_Prz/z_en_prz.c index d0e40b1a55..9ec37bb001 100644 --- a/src/overlays/actors/ovl_En_Prz/z_en_prz.c +++ b/src/overlays/actors/ovl_En_Prz/z_en_prz.c @@ -218,7 +218,7 @@ s32 func_80A762C0(EnPrz* this, PlayState* play) { } void func_80A76388(EnPrz* this) { - this->actor.speedXZ = randPlusMinusPoint5Scaled(1.0f) + 4.0f; + this->actor.speed = randPlusMinusPoint5Scaled(1.0f) + 4.0f; func_80A75F18(this, 0); this->unk_1EA = 1; this->actionFunc = func_80A763E8; @@ -302,7 +302,7 @@ void func_80A76634(EnPrz* this, PlayState* play) { } void func_80A76748(EnPrz* this) { - this->actor.speedXZ = randPlusMinusPoint5Scaled(1.0f) + 3.0f; + this->actor.speed = randPlusMinusPoint5Scaled(1.0f) + 3.0f; this->unk_1EE = 0; this->unk_1EA = 3; this->skelAnime.playSpeed = 2.0f; @@ -317,7 +317,7 @@ void func_80A767A8(EnPrz* this, PlayState* play) { if (func_80A762C0(this, play)) { func_80A75F18(this, 0); - this->actor.speedXZ = randPlusMinusPoint5Scaled(1.0f) + 4.0f; + this->actor.speed = randPlusMinusPoint5Scaled(1.0f) + 4.0f; func_80A76604(this, play); return; } @@ -373,7 +373,7 @@ void func_80A76A1C(EnPrz* this) { } this->unk_1FE = this->actor.world.rot.y; - this->actor.speedXZ = Rand_ZeroFloat(0.5f); + this->actor.speed = Rand_ZeroFloat(0.5f); this->actor.world.rot.y = randPlusMinusPoint5Scaled(0x8000); Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 30); diff --git a/src/overlays/actors/ovl_En_Racedog/z_en_racedog.c b/src/overlays/actors/ovl_En_Racedog/z_en_racedog.c index c6e33345d5..c235c61a0d 100644 --- a/src/overlays/actors/ovl_En_Racedog/z_en_racedog.c +++ b/src/overlays/actors/ovl_En_Racedog/z_en_racedog.c @@ -515,16 +515,16 @@ void EnRacedog_UpdateSpeed(EnRacedog* this) { this->actor.shape.rot.y = this->actor.world.rot.y; } - Math_ApproachF(&this->actor.speedXZ, this->targetSpeed, 0.5f, 3.0f); + Math_ApproachF(&this->actor.speed, this->targetSpeed, 0.5f, 3.0f); // The dog that the player has selected has a slightly higher max speed than the other dogs. if (this->index == this->selectedDogIndex) { - if (this->actor.speedXZ > 7.5f) { - this->actor.speedXZ = 7.5f; + if (this->actor.speed > 7.5f) { + this->actor.speed = 7.5f; } } else { - if (this->actor.speedXZ > 7.0f) { - this->actor.speedXZ = 7.0f; + if (this->actor.speed > 7.0f) { + this->actor.speed = 7.0f; } } } @@ -602,7 +602,7 @@ void EnRacedog_CheckForFinish(EnRacedog* this) { * to normal speed otherwise. */ void EnRacedog_UpdateRunAnimationPlaySpeed(EnRacedog* this) { - if (this->actor.speedXZ < 3.0f) { + if (this->actor.speed < 3.0f) { sAnimationInfo[RACEDOG_ANIM_RUN].playSpeed = 0.9f; } else { sAnimationInfo[RACEDOG_ANIM_RUN].playSpeed = 1.0f; @@ -660,7 +660,7 @@ s32 EnRacedog_IsOverFinishLine(EnRacedog* this, Vec2f* finishLineCoordinates) { void EnRacedog_SpawnFloorDustRing(EnRacedog* this, PlayState* play) { s16 curFrame = this->skelAnime.curFrame; - s16 mod = (this->actor.speedXZ > 6.0f) ? 2 : 3; + s16 mod = (this->actor.speed > 6.0f) ? 2 : 3; Vec3f pos; if (((this->index + curFrame) % mod) == 0) { diff --git a/src/overlays/actors/ovl_En_Rail_Skb/z_en_rail_skb.c b/src/overlays/actors/ovl_En_Rail_Skb/z_en_rail_skb.c index 6b114dff5f..12af47c7e4 100644 --- a/src/overlays/actors/ovl_En_Rail_Skb/z_en_rail_skb.c +++ b/src/overlays/actors/ovl_En_Rail_Skb/z_en_rail_skb.c @@ -281,7 +281,7 @@ void EnRailSkb_Init(Actor* thisx, PlayState* play) { } Actor_ProcessInitChain(&this->actor, sInitChain); - this->actor.speedXZ = 1.6f; + this->actor.speed = 1.6f; this->actor.hintId = TATL_HINT_ID_STALCHILD; this->unk_3F2 = 0; this->unk_2E4 = -1; diff --git a/src/overlays/actors/ovl_En_Railgibud/z_en_railgibud.c b/src/overlays/actors/ovl_En_Railgibud/z_en_railgibud.c index c5a13412d5..0690278f2b 100644 --- a/src/overlays/actors/ovl_En_Railgibud/z_en_railgibud.c +++ b/src/overlays/actors/ovl_En_Railgibud/z_en_railgibud.c @@ -286,7 +286,7 @@ void EnRailgibud_Destroy(Actor* thisx, PlayState* play) { } void EnRailgibud_SetupWalkInCircles(EnRailgibud* this) { - this->actor.speedXZ = 0.6f; + this->actor.speed = 0.6f; Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, EN_RAILGIBUD_ANIM_WALK); this->actionFunc = EnRailgibud_WalkInCircles; } @@ -359,7 +359,7 @@ void EnRailgibud_AttemptPlayerFreeze(EnRailgibud* this, PlayState* play) { void EnRailgibud_SetupWalkToPlayer(EnRailgibud* this) { Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, EN_RAILGIBUD_ANIM_WALK); - this->actor.speedXZ = 0.4f; + this->actor.speed = 0.4f; if (this->actionFunc == EnRailgibud_AttemptPlayerFreeze) { this->playerStunWaitTimer = 80; @@ -491,13 +491,13 @@ void EnRailgibud_Grab(EnRailgibud* this, PlayState* play) { void EnRailgibud_SetupGrabFail(EnRailgibud* this) { Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, EN_RAILGIBUD_ANIM_DAMAGE); Actor_PlaySfx(&this->actor, NA_SE_EN_REDEAD_DAMAGE); - this->actor.speedXZ = -2.0f; + this->actor.speed = -2.0f; this->actionFunc = EnRailgibud_GrabFail; } void EnRailgibud_GrabFail(EnRailgibud* this, PlayState* play) { - if (this->actor.speedXZ < 0.0f) { - this->actor.speedXZ += 0.15f; + if (this->actor.speed < 0.0f) { + this->actor.speed += 0.15f; } this->actor.world.rot.y = this->actor.yawTowardsPlayer; @@ -530,7 +530,7 @@ void EnRailgibud_TurnAwayAndShakeHead(EnRailgibud* this, PlayState* play) { void EnRailgibud_SetupWalkToHome(EnRailgibud* this) { Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, EN_RAILGIBUD_ANIM_WALK); - this->actor.speedXZ = 0.4f; + this->actor.speed = 0.4f; this->actionFunc = EnRailgibud_WalkToHome; } @@ -538,10 +538,10 @@ void EnRailgibud_WalkToHome(EnRailgibud* this, PlayState* play) { Math_SmoothStepToS(&this->headRotation.y, 0, 1, 100, 0); Math_SmoothStepToS(&this->upperBodyRotation.y, 0, 1, 100, 0); if (Actor_WorldDistXZToPoint(&this->actor, &this->actor.home.pos) < 5.0f) { - if (this->actor.speedXZ > 0.2f) { - this->actor.speedXZ -= 0.2f; + if (this->actor.speed > 0.2f) { + this->actor.speed -= 0.2f; } else { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.home.rot.y, 1, 200, 10); @@ -568,13 +568,13 @@ void EnRailgibud_SetupDamage(EnRailgibud* this) { this->stunTimer = 0; this->grabWaitTimer = 0; this->actor.world.rot.y = this->actor.yawTowardsPlayer; - this->actor.speedXZ = -2.0f; + this->actor.speed = -2.0f; this->actionFunc = EnRailgibud_Damage; } void EnRailgibud_Damage(EnRailgibud* this, PlayState* play) { - if (this->actor.speedXZ < 0.0f) { - this->actor.speedXZ += 0.15f; + if (this->actor.speed < 0.0f) { + this->actor.speed += 0.15f; } if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) { @@ -964,7 +964,7 @@ void EnRailgibud_CheckIfTalkingToPlayer(EnRailgibud* this, PlayState* play) { Message_StartTextbox(play, 0x13B2, &this->actor); this->textId = 0x13B2; Actor_PlaySfx(&this->actor, NA_SE_EN_REDEAD_AIM); - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } else if (CHECK_FLAG_ALL(this->actor.flags, (ACTOR_FLAG_1 | ACTOR_FLAG_8)) && !(this->collider.base.acFlags & AC_HIT)) { func_800B8614(&this->actor, play, 100.0f); @@ -982,7 +982,7 @@ void EnRailgibud_CheckIfTalkingToPlayer(EnRailgibud* this, PlayState* play) { if (Message_ShouldAdvance(play)) { this->textId = 0; this->isInvincible = false; - this->actor.speedXZ = 0.6f; + this->actor.speed = 0.6f; } break; diff --git a/src/overlays/actors/ovl_En_Rat/z_en_rat.c b/src/overlays/actors/ovl_En_Rat/z_en_rat.c index 353f221fad..6d54407895 100644 --- a/src/overlays/actors/ovl_En_Rat/z_en_rat.c +++ b/src/overlays/actors/ovl_En_Rat/z_en_rat.c @@ -386,7 +386,7 @@ s32 EnRat_IsTouchingSurface(EnRat* this, PlayState* play) { bgIdUpDown = bgIdSide = BGCHECK_SCENE; - lineLength = 2.0f * this->actor.speedXZ; + lineLength = 2.0f * this->actor.speed; posA.x = this->actor.world.pos.x + (this->axisUp.x * 5.0f); posA.y = this->actor.world.pos.y + (this->axisUp.y * 5.0f); @@ -409,7 +409,7 @@ s32 EnRat_IsTouchingSurface(EnRat* this, PlayState* play) { this->shouldRotateOntoSurfaces |= EnRat_UpdateFloorPoly(this, polySide, play); Math_Vec3f_Copy(&this->actor.world.pos, &posSide); this->actor.floorBgId = bgIdSide; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } else { if (polyUpDown != this->actor.floorPoly) { this->shouldRotateOntoSurfaces |= EnRat_UpdateFloorPoly(this, polyUpDown, play); @@ -419,7 +419,7 @@ s32 EnRat_IsTouchingSurface(EnRat* this, PlayState* play) { this->actor.floorBgId = bgIdUpDown; } } else { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; lineLength *= 3.0f; Math_Vec3f_Copy(&posA, &posB); @@ -535,7 +535,7 @@ void EnRat_SetupRevive(EnRat* this) { EnRat_InitializeAxes(this); EnRat_UpdateRotation(this); this->actor.flags &= ~ACTOR_FLAG_1; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; Animation_PlayLoopSetSpeed(&this->skelAnime, &gRealBombchuSpotAnim, 0.0f); this->revivePosY = 2666.6667f; this->actor.draw = NULL; @@ -573,7 +573,7 @@ void EnRat_Revive(EnRat* this, PlayState* play) { void EnRat_SetupIdle(EnRat* this) { Animation_PlayLoop(&this->skelAnime, &gRealBombchuRunAnim); this->animLoopCounter = 5; - this->actor.speedXZ = 2.0f; + this->actor.speed = 2.0f; this->actionFunc = EnRat_Idle; } @@ -583,7 +583,7 @@ void EnRat_SetupIdle(EnRat* this) { void EnRat_Idle(EnRat* this, PlayState* play) { Player* player = GET_PLAYER(play); - this->actor.speedXZ = 2.0f; + this->actor.speed = 2.0f; if (Animation_OnFrame(&this->skelAnime, 0.0f)) { Actor_PlaySfx(&this->actor, NA_SE_EN_BOMCHU_WALK); if (this->animLoopCounter != 0) { @@ -606,7 +606,7 @@ void EnRat_SetupSpottedPlayer(EnRat* this) { this->actor.flags |= ACTOR_FLAG_10; Animation_MorphToLoop(&this->skelAnime, &gRealBombchuSpotAnim, -5.0f); this->animLoopCounter = 3; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actionFunc = EnRat_SpottedPlayer; } @@ -640,7 +640,7 @@ void EnRat_UpdateSparkOffsets(EnRat* this) { void EnRat_SetupChasePlayer(EnRat* this) { Animation_MorphToLoop(&this->skelAnime, &gRealBombchuRunAnim, -5.0f); - this->actor.speedXZ = 6.1f; + this->actor.speed = 6.1f; EnRat_UpdateSparkOffsets(this); this->actionFunc = EnRat_ChasePlayer; } @@ -659,7 +659,7 @@ void EnRat_ChasePlayer(EnRat* this, PlayState* play) { Vec3f blureP1; Vec3f blureP2; - this->actor.speedXZ = 6.1f; + this->actor.speed = 6.1f; if (this->hasLostTrackOfPlayer) { if (!(player->stateFlags3 & PLAYER_STATE3_100) && (Player_GetMask(play) != PLAYER_MASK_STONE) && Actor_IsFacingPlayer(&this->actor, 0x3000)) { @@ -713,7 +713,7 @@ void EnRat_ChasePlayer(EnRat* this, PlayState* play) { } void EnRat_SetupBounced(EnRat* this) { - this->actor.speedXZ = 5.0f; + this->actor.speed = 5.0f; this->actor.velocity.y = 8.0f; this->actor.world.rot.y = this->actor.yawTowardsPlayer + 0x8000; this->actor.gravity = -1.0f; @@ -750,7 +750,7 @@ void EnRat_Explode(EnRat* this, PlayState* play) { Item_DropCollectibleRandom(play, &this->actor, &this->actor.world.pos, 0x100); } - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actionFunc = EnRat_PostDetonation; } @@ -793,7 +793,7 @@ void EnRat_Update(Actor* thisx, PlayState* play) { Actor_PlaySfx(&this->actor, NA_SE_EN_COMMON_FREEZE); Actor_SetColorFilter(&this->actor, 0, 120, 0, 40); if (this->actionFunc == EnRat_Bounced) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; if (this->actor.velocity.y > 0.0f) { this->actor.velocity.y = 0.0f; } diff --git a/src/overlays/actors/ovl_En_Rd/z_en_rd.c b/src/overlays/actors/ovl_En_Rd/z_en_rd.c index 8d73d5de1e..83cdde9a30 100644 --- a/src/overlays/actors/ovl_En_Rd/z_en_rd.c +++ b/src/overlays/actors/ovl_En_Rd/z_en_rd.c @@ -356,7 +356,7 @@ void EnRd_SetupIdle(EnRd* this) { this->action = EN_RD_ACTION_IDLE; this->animationJudderTimer = (Rand_ZeroOne() * 10.0f) + 5.0f; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.world.rot.y = this->actor.shape.rot.y; this->actionFunc = EnRd_Idle; } @@ -419,7 +419,7 @@ void EnRd_SetupSquattingDance(EnRd* this) { this->action = EN_RD_ACTION_SQUATTING_DANCE; this->animationJudderTimer = (Rand_ZeroOne() * 10.0f) + 5.0f; this->danceEndTimer = 0; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.world.rot.y = this->actor.shape.rot.y; this->actionFunc = EnRd_SquattingDance; } @@ -463,7 +463,7 @@ void EnRd_SetupClappingDance(EnRd* this) { this->action = EN_RD_ACTION_CLAPPING_DANCE; this->animationJudderTimer = (Rand_ZeroOne() * 10.0f) + 5.0f; this->danceEndTimer = 0; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.world.rot.y = this->actor.shape.rot.y; this->actionFunc = EnRd_ClappingDance; } @@ -524,7 +524,7 @@ void EnRd_SetupPirouette(EnRd* this) { this->action = EN_RD_ACTION_PIROUETTE; this->animationJudderTimer = (Rand_ZeroOne() * 10.0f) + 5.0f; this->pirouetteRotationalVelocity = 0x1112; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.world.rot.y = this->actor.shape.rot.y; this->actionFunc = EnRd_Pirouette; } @@ -600,7 +600,7 @@ void EnRd_SetupRiseFromCoffin(EnRd* this) { this->actor.shape.rot.x = -0x4000; this->actor.gravity = 0.0f; this->actor.shape.yOffset = 0.0f; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actionFunc = EnRd_RiseFromCoffin; } @@ -619,8 +619,8 @@ void EnRd_RiseFromCoffin(EnRd* this, PlayState* play) { if (Math_SmoothStepToF(&this->actor.world.pos.y, this->actor.home.pos.y + 50.0f, 0.3f, 2.0f, 0.3f) == 0.0f) { if (this->coffinRiseForwardAccelTimer != 0) { this->coffinRiseForwardAccelTimer--; - Math_SmoothStepToF(&this->actor.speedXZ, 6.0f, 0.3f, 1.0f, 0.3f); - } else if (Math_SmoothStepToF(&this->actor.speedXZ, 0.0f, 0.3f, 1.0f, 0.3f) == 0.0f) { + Math_SmoothStepToF(&this->actor.speed, 6.0f, 0.3f, 1.0f, 0.3f); + } else if (Math_SmoothStepToF(&this->actor.speed, 0.0f, 0.3f, 1.0f, 0.3f) == 0.0f) { Math_SmoothStepToS(&this->actor.shape.rot.x, 0, 1, 0x7D0, 0); } } @@ -631,7 +631,7 @@ void EnRd_SetupWalkToPlayer(EnRd* this, PlayState* play) { f32 frameCount = Animation_GetLastFrame(&gGibdoRedeadWalkAnim); Animation_Change(&this->skelAnime, &gGibdoRedeadWalkAnim, 1.0f, 4.0f, frameCount, ANIMMODE_LOOP_INTERP, -4.0f); - this->actor.speedXZ = 0.4f; + this->actor.speed = 0.4f; this->action = EN_RD_ACTION_WALKING_TO_PLAYER_OR_RELEASING_GRAB; this->actionFunc = EnRd_WalkToPlayer; } @@ -642,7 +642,7 @@ void EnRd_WalkToPlayer(EnRd* this, PlayState* play) { s16 yaw = ((this->actor.yawTowardsPlayer - this->actor.shape.rot.y) - this->headYRotation) - this->upperBodyYRotation; - this->skelAnime.playSpeed = this->actor.speedXZ; + this->skelAnime.playSpeed = this->actor.speed; Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 1, 250, 0); Math_SmoothStepToS(&this->headYRotation, 0, 1, 100, 0); Math_SmoothStepToS(&this->upperBodyYRotation, 0, 1, 100, 0); @@ -721,7 +721,7 @@ void EnRd_WalkToHome(EnRd* this, PlayState* play) { if (Actor_WorldDistXYZToPoint(&this->actor, &this->actor.home.pos) >= 5.0f) { Math_SmoothStepToS(&this->actor.shape.rot.y, sp36, 1, 450, 0); } else { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; if (!Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.home.rot.y, 1, 450, 0)) { if (EN_RD_GET_TYPE(&this->actor) != EN_RD_TYPE_CRYING) { EnRd_SetupIdle(this); @@ -783,9 +783,9 @@ void EnRd_WalkToParent(EnRd* this, PlayState* play) { Math_SmoothStepToS(&this->actor.shape.rot.y, yaw, 1, 250, 0); if (Actor_WorldDistXYZToPoint(&this->actor, &parentPos) >= 45.0f) { - this->actor.speedXZ = 0.4f; + this->actor.speed = 0.4f; } else { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; if (EN_RD_GET_TYPE(&this->actor) != EN_RD_TYPE_CRYING) { EnRd_SetupIdle(this); } else { @@ -814,7 +814,7 @@ void EnRd_SetupGrab(EnRd* this) { this->grabState = 0; this->grabDamageTimer = 200; this->action = EN_RD_ACTION_GRABBING; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actionFunc = EnRd_Grab; } @@ -930,15 +930,15 @@ void EnRd_AttemptPlayerFreeze(EnRd* this, PlayState* play) { void EnRd_SetupGrabFail(EnRd* this) { this->action = EN_RD_ACTION_FAILING_GRAB; Animation_MorphToPlayOnce(&this->skelAnime, &gGibdoRedeadDamageAnim, -6.0f); - this->actor.speedXZ = -2.0f; + this->actor.speed = -2.0f; Actor_PlaySfx(&this->actor, NA_SE_EN_REDEAD_DAMAGE); this->action = EN_RD_ACTION_FAILING_GRAB; this->actionFunc = EnRd_GrabFail; } void EnRd_GrabFail(EnRd* this, PlayState* play) { - if (this->actor.speedXZ < 0.0f) { - this->actor.speedXZ += 0.15f; + if (this->actor.speed < 0.0f) { + this->actor.speed += 0.15f; } this->actor.world.rot.y = this->actor.yawTowardsPlayer; @@ -1005,7 +1005,7 @@ void EnRd_SetupDamage(EnRd* this) { this->actor.shape.yOffset = 0.0f; Animation_MorphToPlayOnce(&this->skelAnime, &gGibdoRedeadDamageAnim, -6.0f); if (this->actor.bgCheckFlags & 1) { - this->actor.speedXZ = -2.0f; + this->actor.speed = -2.0f; } this->actor.flags |= ACTOR_FLAG_1; @@ -1017,8 +1017,8 @@ void EnRd_SetupDamage(EnRd* this) { void EnRd_Damage(EnRd* this, PlayState* play) { Player* player = GET_PLAYER(play); - if (this->actor.speedXZ < 0.0f) { - this->actor.speedXZ += 0.15f; + if (this->actor.speed < 0.0f) { + this->actor.speed += 0.15f; } this->actor.world.rot.y = this->actor.yawTowardsPlayer; @@ -1043,7 +1043,7 @@ void EnRd_SetupDead(EnRd* this) { this->action = EN_RD_ACTION_DEAD; this->deathTimer = 300; this->actor.flags &= ~ACTOR_FLAG_1; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; Actor_PlaySfx(&this->actor, NA_SE_EN_REDEAD_DEAD); this->actionFunc = EnRd_Dead; } @@ -1082,7 +1082,7 @@ void EnRd_Dead(EnRd* this, PlayState* play) { void EnRd_SetupStunned(EnRd* this) { this->action = EN_RD_ACTION_STUNNED; this->stunTimer = 10; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.world.rot.y = this->actor.shape.rot.y; if (gSaveContext.sunsSongState != SUNSSONG_INACTIVE) { this->stunnedBySunsSong = true; @@ -1273,12 +1273,11 @@ void EnRd_Update(Actor* thisx, PlayState* play) { this->actionFunc(this, play); - if ((this->action != EN_RD_ACTION_GRABBING) && (this->actor.speedXZ != 0.0f)) { + if ((this->action != EN_RD_ACTION_GRABBING) && (this->actor.speed != 0.0f)) { Actor_MoveWithGravity(&this->actor); } - if ((this->actor.shape.rot.x == 0) && (this->action != EN_RD_ACTION_GRABBING) && - (this->actor.speedXZ != 0.0f)) { + if ((this->actor.shape.rot.x == 0) && (this->action != EN_RD_ACTION_GRABBING) && (this->actor.speed != 0.0f)) { Actor_UpdateBgCheckInfo(play, &this->actor, 30.0f, 20.0f, 35.0f, 0x1D); } diff --git a/src/overlays/actors/ovl_En_Rg/z_en_rg.c b/src/overlays/actors/ovl_En_Rg/z_en_rg.c index 5cd8c78bc9..58f8f706d9 100644 --- a/src/overlays/actors/ovl_En_Rg/z_en_rg.c +++ b/src/overlays/actors/ovl_En_Rg/z_en_rg.c @@ -231,7 +231,7 @@ void func_80BF3DC4(EnRg* this, PlayState* play) { this->collider2.dim.worldSphere.center.y = this->actor.world.pos.y + this->actor.shape.yOffset; this->collider2.dim.worldSphere.center.z = this->actor.world.pos.z; - if (this->actor.speedXZ >= 10.0f) { + if (this->actor.speed >= 10.0f) { CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider2.base); } CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider2.base); @@ -318,7 +318,7 @@ void func_80BF40F4(EnRg* this) { } s32 func_80BF416C(EnRg* this, PlayState* play) { - if ((this->actor.bgCheckFlags & 1) && (this->actor.speedXZ >= 0.01f)) { + if ((this->actor.bgCheckFlags & 1) && (this->actor.speed >= 0.01f)) { Actor_PlaySfx(&this->actor, NA_SE_EN_GOLON_ROLLING - SFX_FLAG); func_800AE930(&play->colCtx, Effect_GetByIndex(this->unk_340), &this->actor.world.pos, 18.0f, this->actor.shape.rot.y, this->actor.floorPoly, this->actor.floorBgId); @@ -345,9 +345,9 @@ s32 func_80BF42BC(EnRg* this, f32 arg1) { f32 sp2C; s32 sp24; - Math_ApproachF(&this->actor.speedXZ, arg1, 0.3f, 0.5f); + Math_ApproachF(&this->actor.speed, arg1, 0.3f, 0.5f); - sp2C = this->actor.speedXZ * (1.0f / 26); + sp2C = this->actor.speed * (1.0f / 26); if (sp2C > 1.0f) { sp2C = 1.0f; } @@ -410,7 +410,7 @@ s32 func_80BF45B4(EnRg* this) { s16 temp_v0; s16 temp_v1; - if ((this->actor.bgCheckFlags & 8) && (this->actor.speedXZ >= 5.0f)) { + if ((this->actor.bgCheckFlags & 8) && (this->actor.speed >= 5.0f)) { temp_v1 = this->actor.world.rot.y; temp_v0 = temp_v1 - BINANG_ROT180(this->actor.wallYaw); @@ -419,12 +419,12 @@ s32 func_80BF45B4(EnRg* this) { this->unk_322 = 0xA; } else if (ABS_ALT(temp_v0) >= 0x1000) { this->actor.world.rot.y = BINANG_ROT180(BINANG_ROT180(this->actor.wallYaw) - temp_v0); - this->actor.speedXZ *= 0.75f; + this->actor.speed *= 0.75f; this->unk_322 = 0xA; } else { this->actor.world.rot.y = BINANG_ROT180(temp_v1); ret = 1; - this->actor.speedXZ *= 0.25f; + this->actor.speed *= 0.25f; } sp24 = 1; } else if (this->unk_310 & 0x40) { @@ -432,7 +432,7 @@ s32 func_80BF45B4(EnRg* this) { sp24 = 2; if (this->actor.colorFilterTimer == 0) { - this->actor.speedXZ *= 0.5f; + this->actor.speed *= 0.5f; if ((s16)(yaw - this->actor.world.rot.y) > 0) { this->actor.world.rot.y -= 0x2000; } else { @@ -679,7 +679,7 @@ void func_80BF4FC4(EnRg* this, PlayState* play) { if (this->actor.bgCheckFlags & 2) { if (this->unk_310 & 0x400) { this->unk_310 &= ~0x400; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } if (this->unk_344 != -1) { diff --git a/src/overlays/actors/ovl_En_Rr/z_en_rr.c b/src/overlays/actors/ovl_En_Rr/z_en_rr.c index 10706fa9a5..31a02d64fe 100644 --- a/src/overlays/actors/ovl_En_Rr/z_en_rr.c +++ b/src/overlays/actors/ovl_En_Rr/z_en_rr.c @@ -214,7 +214,7 @@ void func_808FA19C(EnRr* this, PlayState* play) { } void func_808FA238(EnRr* this, f32 arg1) { - this->actor.speedXZ = arg1; + this->actor.speed = arg1; Actor_PlaySfx(&this->actor, NA_SE_EN_LIKE_WALK); } @@ -271,7 +271,7 @@ void func_808FA3F8(EnRr* this, Player* player) { this->actor.flags &= ~ACTOR_FLAG_1; this->unk_1F0 = 8; this->unk_1E1 = 0; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->unk_218 = 0.0f; this->unk_210 = 0.0f; this->unk_204 = 0.15f; @@ -575,7 +575,7 @@ void func_808FAF94(EnRr* this, PlayState* play) { (Player_GetMask(play) != PLAYER_MASK_STONE) && (this->actor.xzDistToPlayer < (8421.053f * this->actor.scale.x))) { func_808FA260(this); - } else if ((this->actor.xzDistToPlayer < 400.0f) && (this->actor.speedXZ == 0.0f)) { + } else if ((this->actor.xzDistToPlayer < 400.0f) && (this->actor.speed == 0.0f)) { func_808FA238(this, 2.0f); } } @@ -742,7 +742,7 @@ void func_808FB680(EnRr* this, PlayState* play) { } else { Math_SmoothStepToS(&this->actor.shape.rot.y, BINANG_ROT180(this->actor.yawTowardsPlayer), 10, 1000, 0); this->actor.world.rot.y = this->actor.shape.rot.y; - if (this->actor.speedXZ == 0.0f) { + if (this->actor.speed == 0.0f) { func_808FA238(this, 2.0f); } } @@ -801,9 +801,9 @@ void EnRr_Update(Actor* thisx, PlayState* play) { this->actionFunc(this, play); if (this->actor.params == ENRR_2) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } else { - Math_StepToF(&this->actor.speedXZ, 0.0f, 0.1f); + Math_StepToF(&this->actor.speed, 0.0f, 0.1f); } Actor_MoveWithGravity(&this->actor); diff --git a/src/overlays/actors/ovl_En_Ruppecrow/z_en_ruppecrow.c b/src/overlays/actors/ovl_En_Ruppecrow/z_en_ruppecrow.c index 6bb60af551..8f231ccfae 100644 --- a/src/overlays/actors/ovl_En_Ruppecrow/z_en_ruppecrow.c +++ b/src/overlays/actors/ovl_En_Ruppecrow/z_en_ruppecrow.c @@ -438,7 +438,7 @@ void EnRuppecrow_UpdateSpeed(EnRuppecrow* this, PlayState* play) { void EnRuppecrow_HandleDeath(EnRuppecrow* this) { f32 scale; - this->actor.speedXZ *= Math_CosS(this->actor.world.rot.x); + this->actor.speed *= Math_CosS(this->actor.world.rot.x); this->actor.velocity.y = 0.0f; Animation_Change(&this->skelAnime, &gGuayFlyAnim, 0.4f, 0.0f, 0.0f, ANIMMODE_LOOP_INTERP, -3.0f); @@ -466,7 +466,7 @@ void EnRuppecrow_HandleDeath(EnRuppecrow* this) { Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0x0, 0x28); if (this->actor.flags & ACTOR_FLAG_8000) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } this->collider.base.acFlags &= ~AC_ON; @@ -508,9 +508,9 @@ void EnRuppecrow_HandleSong(EnRuppecrow* this, PlayState* play) { } if (player->stateFlags2 & PLAYER_STATE2_8000000) { - Math_ApproachF(&this->actor.speedXZ, 0.0f, 0.1f, 1.0f); + Math_ApproachF(&this->actor.speed, 0.0f, 0.1f, 1.0f); } else { - Math_ApproachF(&this->actor.speedXZ, 6.0f, 0.1f, 0.1f); + Math_ApproachF(&this->actor.speed, 6.0f, 0.1f, 0.1f); } Actor_MoveWithoutGravity(&this->actor); @@ -546,7 +546,7 @@ void EnRuppecrow_FlyWhileDroppingRupees(EnRuppecrow* this, PlayState* play) { //! @bug: Source of the "Termina Field Guay Glitch"; guay will no longer fall if killed after this point this->actor.gravity = 0.0f; - Math_ApproachF(&this->actor.speedXZ, 6.0f, 0.2f, 0.5f); + Math_ApproachF(&this->actor.speed, 6.0f, 0.2f, 0.5f); Math_ApproachF(&this->actor.velocity.y, 3.0f, 0.2f, 0.5f); this->actionFunc = EnRuppecrow_FlyToDespawn; @@ -555,7 +555,7 @@ void EnRuppecrow_FlyWhileDroppingRupees(EnRuppecrow* this, PlayState* play) { } else { if (ActorCutscene_GetCurrentIndex() != this->actor.cutscene) { EnRuppecrow_UpdateSpeed(this, play); - Math_ApproachF(&this->actor.speedXZ, this->speedModifier, 0.2f, 0.5f); + Math_ApproachF(&this->actor.speed, this->speedModifier, 0.2f, 0.5f); } Actor_MoveWithoutGravity(&this->actor); @@ -573,7 +573,7 @@ void EnRuppecrow_FlyToDespawn(EnRuppecrow* this, PlayState* play) { this->actor.world.rot.y *= -0x1; } - Math_ApproachF(&this->actor.speedXZ, this->speedModifier, 0.1f, 0.1f); + Math_ApproachF(&this->actor.speed, this->speedModifier, 0.1f, 0.1f); Math_ApproachF(&this->actor.velocity.y, 3.0f, 0.2f, 0.5f); if (this->actor.world.pos.y > 1000.0f || this->actor.xzDistToPlayer > 2000.0f) { @@ -591,7 +591,7 @@ void EnRuppecrow_FlyToDespawn(EnRuppecrow* this, PlayState* play) { } void EnRuppecrow_FallToDespawn(EnRuppecrow* this, PlayState* play) { - Math_StepToF(&this->actor.speedXZ, 0.0f, 0.5f); + Math_StepToF(&this->actor.speed, 0.0f, 0.5f); if (this->currentEffect != ENRUPPECROW_EFFECT_ICE) { Math_StepToF(&this->unk_2C8, 0.0f, 0.05f); diff --git a/src/overlays/actors/ovl_En_Rz/z_en_rz.c b/src/overlays/actors/ovl_En_Rz/z_en_rz.c index 108d880234..4adc514532 100644 --- a/src/overlays/actors/ovl_En_Rz/z_en_rz.c +++ b/src/overlays/actors/ovl_En_Rz/z_en_rz.c @@ -604,7 +604,7 @@ void func_80BFC7E0(EnRz* this, PlayState* play) { if (Actor_ProcessTalkRequest(&this->actor, &play->state)) { this->actionFunc = func_80BFC728; func_80BFB9E4(play, this, EN_RZ_ANIM_THINKING); - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; func_80BFBDFC(play); } else if (EnRz_CanTalk(this, play)) { func_800B8614(&this->actor, play, 120.0f); @@ -614,13 +614,13 @@ void func_80BFC7E0(EnRz* this, PlayState* play) { void EnRz_StopToThink(EnRz* this, PlayState* play) { this->timer = 100; this->actionFunc = func_80BFC7E0; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; func_80BFB9E4(play, this, EN_RZ_ANIM_THINKING); } void EnRz_Walk(EnRz* this, PlayState* play) { EnRz_UpdateSkelAnime(this, play); - this->actor.speedXZ = 1.5f; + this->actor.speed = 1.5f; switch (EnRz_GetPathStatus(this)) { case EN_RZ_PATHSTATUS_END: @@ -639,7 +639,7 @@ void EnRz_Walk(EnRz* this, PlayState* play) { if (Actor_ProcessTalkRequest(&this->actor, &play->state)) { this->actionFunc = func_80BFC728; func_80BFB9E4(play, this, EN_RZ_ANIM_THINKING); - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; func_80BFBDFC(play); } else if (EnRz_CanTalk(this, play)) { func_800B8614(&this->actor, play, 120.0f); diff --git a/src/overlays/actors/ovl_En_Sb/z_en_sb.c b/src/overlays/actors/ovl_En_Sb/z_en_sb.c index cae39cdae2..1a2f84536b 100644 --- a/src/overlays/actors/ovl_En_Sb/z_en_sb.c +++ b/src/overlays/actors/ovl_En_Sb/z_en_sb.c @@ -118,7 +118,7 @@ void EnSb_Init(Actor* thisx, PlayState* play) { this->isDead = false; this->actor.colChkInfo.mass = 90; this->actor.shape.rot.y = 0; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.gravity = -0.35f; this->fireCount = 0; this->unk_252 = 0; @@ -191,12 +191,12 @@ void EnSb_SetupIdle(EnSb* this, s32 changeSpeed) { this->state = SHELLBLADE_WAIT_CLOSED; if (changeSpeed) { if (this->actor.depthInWater > 0.0f) { - this->actor.speedXZ = -5.0f; + this->actor.speed = -5.0f; if (this->actor.velocity.y < 0.0f) { this->actor.velocity.y = 2.1f; } } else { - this->actor.speedXZ = -6.0f; + this->actor.speed = -6.0f; if (this->actor.velocity.y < 0.0f) { this->actor.velocity.y = 1.4f; } @@ -253,11 +253,11 @@ void EnSb_TurnAround(EnSb* this, PlayState* play) { this->actor.world.rot.y = this->yawAngle; if (this->actor.depthInWater > 0.0f) { this->actor.velocity.y = 3.0f; - this->actor.speedXZ = 5.0f; + this->actor.speed = 5.0f; this->actor.gravity = -0.35f; } else { this->actor.velocity.y = 2.0f; - this->actor.speedXZ = 6.0f; + this->actor.speed = 6.0f; this->actor.gravity = -2.0f; } EnSb_SpawnBubbles(play, this); @@ -267,7 +267,7 @@ void EnSb_TurnAround(EnSb* this, PlayState* play) { } void EnSb_Lunge(EnSb* this, PlayState* play) { - Math_StepToF(&this->actor.speedXZ, 0.0f, 0.2f); + Math_StepToF(&this->actor.speed, 0.0f, 0.2f); if (this->actor.velocity.y <= -0.1f || this->actor.bgCheckFlags & 2) { if (!(this->actor.depthInWater > 0.0f)) { Actor_PlaySfx(&this->actor, NA_SE_EN_EYEGOLE_ATTACK); @@ -282,25 +282,25 @@ void EnSb_Bounce(EnSb* this, PlayState* play) { f32 currentFrame = currentFrame = this->skelAnime.curFrame; f32 frameCount = frameCount = Animation_GetLastFrame(&object_sb_Anim_0000B4); - Math_StepToF(&this->actor.speedXZ, 0.0f, 0.2f); + Math_StepToF(&this->actor.speed, 0.0f, 0.2f); if (currentFrame == frameCount) { if (this->bounceCounter != 0) { this->bounceCounter--; this->attackTimer = 1; if (this->actor.depthInWater > 0.0f) { this->actor.velocity.y = 3.0f; - this->actor.speedXZ = 5.0f; + this->actor.speed = 5.0f; this->actor.gravity = -0.35f; } else { this->actor.velocity.y = 2.0f; - this->actor.speedXZ = 6.0f; + this->actor.speed = 6.0f; this->actor.gravity = -2.0f; } EnSb_SpawnBubbles(play, this); EnSb_SetupLunge(this); } else if (this->actor.bgCheckFlags & 1) { this->actor.bgCheckFlags &= ~2; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->attackTimer = 1; EnSb_SetupWaitClosed(this); } @@ -312,12 +312,12 @@ void EnSb_ReturnToIdle(EnSb* this, PlayState* play) { this->attackTimer--; if (this->actor.bgCheckFlags & 1) { this->actor.bgCheckFlags &= ~1; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } } else if (this->actor.bgCheckFlags & 1) { this->actor.bgCheckFlags &= ~1; this->actionFunc = EnSb_Idle; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } } diff --git a/src/overlays/actors/ovl_En_Sc_Ruppe/z_en_sc_ruppe.c b/src/overlays/actors/ovl_En_Sc_Ruppe/z_en_sc_ruppe.c index 41c7a3e640..da7c85f638 100644 --- a/src/overlays/actors/ovl_En_Sc_Ruppe/z_en_sc_ruppe.c +++ b/src/overlays/actors/ovl_En_Sc_Ruppe/z_en_sc_ruppe.c @@ -156,7 +156,7 @@ void EnScRuppe_Init(Actor* thisx, PlayState* play) { if ((this->ruppeIndex < RUPEE_GREEN) || (this->ruppeIndex >= RUPEE_UNUSED)) { this->ruppeIndex = RUPEE_GREEN; } - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actionFunc = func_80BD6A8C; this->actor.gravity = -0.5f; this->actor.shape.yOffset = 700.0f; diff --git a/src/overlays/actors/ovl_En_Scopecrow/z_en_scopecrow.c b/src/overlays/actors/ovl_En_Scopecrow/z_en_scopecrow.c index b37190ee1f..4d3c3b7b7d 100644 --- a/src/overlays/actors/ovl_En_Scopecrow/z_en_scopecrow.c +++ b/src/overlays/actors/ovl_En_Scopecrow/z_en_scopecrow.c @@ -257,7 +257,7 @@ void func_80BCD640(EnScopecrow* this, PlayState* play) { } } - Math_ApproachF(&this->actor.speedXZ, 6.0f, 0.2f, 1.0f); + Math_ApproachF(&this->actor.speed, 6.0f, 0.2f, 1.0f); Actor_MoveWithoutGravity(&this->actor); this->unk_264 += 0x1000; this->actor.shape.yOffset = Math_SinS(this->unk_264) * 500.0f; diff --git a/src/overlays/actors/ovl_En_Scopenuts/z_en_scopenuts.c b/src/overlays/actors/ovl_En_Scopenuts/z_en_scopenuts.c index 3d5a774cc3..bb52f4425e 100644 --- a/src/overlays/actors/ovl_En_Scopenuts/z_en_scopenuts.c +++ b/src/overlays/actors/ovl_En_Scopenuts/z_en_scopenuts.c @@ -126,19 +126,19 @@ void func_80BCAC40(EnScopenuts* this, PlayState* play) { } void func_80BCAD64(EnScopenuts* this, s16 arg1) { - f32 sp24 = Math_CosS(this->actor.world.rot.x) * this->actor.speedXZ; + f32 sp24 = Math_CosS(this->actor.world.rot.x) * this->actor.speed; switch (arg1) { case 1: - this->actor.velocity.y = this->actor.speedXZ; + this->actor.velocity.y = this->actor.speed; this->actor.velocity.x = 0.0f; this->actor.velocity.z = 0.0f; break; case 2: - this->actor.velocity.x = Math_SinS(this->actor.world.rot.y) * this->actor.speedXZ; + this->actor.velocity.x = Math_SinS(this->actor.world.rot.y) * this->actor.speed; this->actor.velocity.y = 0.0f; - this->actor.velocity.z = Math_CosS(this->actor.world.rot.y) * this->actor.speedXZ; + this->actor.velocity.z = Math_CosS(this->actor.world.rot.y) * this->actor.speed; break; case 3: @@ -149,7 +149,7 @@ void func_80BCAD64(EnScopenuts* this, s16 arg1) { default: this->actor.velocity.x = Math_SinS(this->actor.world.rot.y) * sp24; - this->actor.velocity.y = Math_SinS(this->actor.world.rot.x) * this->actor.speedXZ; + this->actor.velocity.y = Math_SinS(this->actor.world.rot.x) * this->actor.speed; this->actor.velocity.z = Math_CosS(this->actor.world.rot.y) * sp24; break; } @@ -219,7 +219,7 @@ void func_80BCB078(EnScopenuts* this, PlayState* play) { if (func_80BCC2AC(this, this->path, this->unk_334)) { if (this->unk_334 >= (this->path->count - 1)) { this->actionFunc = func_80BCB1C8; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.gravity = -1.0f; return; } @@ -228,9 +228,9 @@ void func_80BCB078(EnScopenuts* this, PlayState* play) { } if (this->unk_334 >= (this->path->count - 2)) { - Math_ApproachF(&this->actor.speedXZ, 1.5f, 0.2f, 1.0f); + Math_ApproachF(&this->actor.speed, 1.5f, 0.2f, 1.0f); } else { - Math_ApproachF(&this->actor.speedXZ, 5.0f, 0.2f, 1.0f); + Math_ApproachF(&this->actor.speed, 5.0f, 0.2f, 1.0f); } Actor_MoveWithoutGravity(&this->actor); } @@ -605,7 +605,7 @@ void func_80BCBFFC(EnScopenuts* this, PlayState* play) { this->actionFunc = func_80BCC288; } - Math_ApproachF(&this->actor.speedXZ, 1.0f, 0.2f, 1.0f); + Math_ApproachF(&this->actor.speed, 1.0f, 0.2f, 1.0f); func_80BCAD64(this, sp32); if (this->unk_36C == 2) { @@ -701,7 +701,7 @@ void EnScopenuts_Init(Actor* thisx, PlayState* play) { this->actor.colChkInfo.mass = MASS_IMMOVABLE; this->unk_328 |= 2; this->unk_328 |= 4; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; if (ENSCOPENUTS_GET_3E0(&this->actor) == ENSCOPENUTS_3E0_0) { if (CHECK_WEEKEVENTREG(WEEKEVENTREG_52_40)) { diff --git a/src/overlays/actors/ovl_En_Sellnuts/z_en_sellnuts.c b/src/overlays/actors/ovl_En_Sellnuts/z_en_sellnuts.c index 893ca400be..d0a3fc0e98 100644 --- a/src/overlays/actors/ovl_En_Sellnuts/z_en_sellnuts.c +++ b/src/overlays/actors/ovl_En_Sellnuts/z_en_sellnuts.c @@ -670,7 +670,7 @@ void func_80ADC37C(EnSellnuts* this, PlayState* play) { this->actionFunc = func_80ADC580; } - Math_ApproachF(&this->actor.speedXZ, 2.0f, 0.2f, 1.0f); + Math_ApproachF(&this->actor.speed, 2.0f, 0.2f, 1.0f); Actor_MoveWithoutGravity(&this->actor); if (this->unk_366 == 2) { if (ActorCutscene_GetCanPlayNext(this->cutscene)) { @@ -793,7 +793,7 @@ void func_80ADC8C4(EnSellnuts* this, PlayState* play) { this->unk_34C = 22; this->actor.gravity = -1.0f; this->actor.velocity.y = -1.0f; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->unk_34C); this->unk_338 &= ~1; this->unk_338 &= ~2; @@ -802,7 +802,7 @@ void func_80ADC8C4(EnSellnuts* this, PlayState* play) { } this->unk_334++; } - Math_ApproachF(&this->actor.speedXZ, 2.0f, 0.2f, 1.0f); + Math_ApproachF(&this->actor.speed, 2.0f, 0.2f, 1.0f); Actor_MoveWithoutGravity(&this->actor); } } @@ -968,7 +968,7 @@ void EnSellnuts_Init(Actor* thisx, PlayState* play) { this->unk_374 = 0.01f; this->unk_370 = 0.01f; this->unk_36C = 0.01f; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.velocity.y = 0.0f; if (CHECK_WEEKEVENTREG(WEEKEVENTREG_73_04)) { if (ENSELLNUTS_GET_1(&this->actor)) { diff --git a/src/overlays/actors/ovl_En_Skb/z_en_skb.c b/src/overlays/actors/ovl_En_Skb/z_en_skb.c index 5b08cfaa77..f127902b69 100644 --- a/src/overlays/actors/ovl_En_Skb/z_en_skb.c +++ b/src/overlays/actors/ovl_En_Skb/z_en_skb.c @@ -325,7 +325,7 @@ void func_80994F7C(EnSkb* this, PlayState* play) { this->unk_3E0 = 1; } this->actionFunc = func_80995190; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } else if (Actor_IsFacingPlayer(&this->actor, 0x2AAA) && !(this->collider.base.acFlags & AC_HIT)) { func_800B8614(&this->actor, play, 100.0f); } @@ -333,7 +333,7 @@ void func_80994F7C(EnSkb* this, PlayState* play) { void func_8099504C(EnSkb* this) { this->actionFunc = func_80995068; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } void func_80995068(EnSkb* this, PlayState* play) { @@ -349,7 +349,7 @@ void func_80995068(EnSkb* this, PlayState* play) { this->unk_3E0 = 1; } this->actionFunc = func_80995190; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } else if (Player_GetMask(play) != PLAYER_MASK_CAPTAIN) { this->actor.flags |= (ACTOR_FLAG_1 | ACTOR_FLAG_4); this->actor.flags &= ~(ACTOR_FLAG_1 | ACTOR_FLAG_8); @@ -417,7 +417,7 @@ void func_809952D8(EnSkb* this) { this->unk_3DE = 9; this->actionFunc = func_8099533C; this->actor.shape.shadowScale = 0.0f; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.shape.yOffset = 0.0f; } @@ -439,7 +439,7 @@ void func_809953E8(EnSkb* this) { this->unk_3DE = 10; this->actionFunc = func_8099544C; this->actor.shape.shadowScale = 0.0f; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.shape.yOffset = 0.0f; } @@ -462,7 +462,7 @@ void func_809954F8(EnSkb* this) { this->actionFunc = func_8099556C; this->actor.gravity = 0.0f; this->actor.shape.shadowScale = 0.0f; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.shape.yOffset = 0.0f; this->actor.targetArrowOffset = 4000.0f; } @@ -500,14 +500,14 @@ void func_8099571C(EnSkb* this) { this->actor.shape.shadowScale = 0.0f; if (this->unk_3DE == 9) { Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 8); - this->actor.speedXZ = 2.4f; + this->actor.speed = 2.4f; this->actor.gravity = -1.0f; this->actor.velocity.y = 3.0f; } else if (this->unk_3DE == 0xA) { Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 8); } else if (this->unk_3DE == 0xB) { Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 9); - this->actor.speedXZ = 3.2f; + this->actor.speed = 3.2f; this->actor.gravity = -1.0f; this->actor.velocity.y = 2.0f; } @@ -527,7 +527,7 @@ void func_80995818(EnSkb* this, PlayState* play) { } if (this->actor.bgCheckFlags & 2) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; for (i = 0; i < 10; i++) { func_809947B0(play, this, &this->actor.world.pos); } @@ -539,7 +539,7 @@ void func_809958F4(EnSkb* this) { 0.0f, ANIMMODE_ONCE, -4.0f); this->unk_3E4 = 0; this->actor.flags &= ~ACTOR_FLAG_1; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; Actor_PlaySfx(&this->actor, NA_SE_EN_AKINDONUTS_HIDE); this->unk_3DE = 1; this->actionFunc = func_8099599C; @@ -561,7 +561,7 @@ void func_8099599C(EnSkb* this, PlayState* play) { void func_80995A30(EnSkb* this) { Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 0); - this->actor.speedXZ = 1.6f; + this->actor.speed = 1.6f; this->unk_3DA = 0; this->unk_3DE = 2; this->actionFunc = func_80995A8C; @@ -598,7 +598,7 @@ void func_80995A8C(EnSkb* this, PlayState* play) { void func_80995C24(EnSkb* this) { Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 2); this->collider.base.atFlags &= ~AT_BOUNCED; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->unk_3DE = 3; this->actionFunc = func_80995C84; } @@ -636,7 +636,7 @@ void func_80995DC4(EnSkb* this, PlayState* play) { void func_80995E08(EnSkb* this) { if (this->actor.bgCheckFlags & 1) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } Actor_PlaySfx(&this->actor, NA_SE_EN_COMMON_FREEZE); this->unk_3E4 = 0; @@ -646,12 +646,12 @@ void func_80995E08(EnSkb* this) { void func_80995E64(EnSkb* this, PlayState* play) { if (this->actor.bgCheckFlags & 2) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } if (this->actor.bgCheckFlags & 1) { - if (this->actor.speedXZ < 0.0f) { - this->actor.speedXZ += 0.05f; + if (this->actor.speed < 0.0f) { + this->actor.speed += 0.05f; } } @@ -684,17 +684,17 @@ void func_80995F98(EnSkb* this) { this->actor.world.rot.y = this->actor.yawTowardsPlayer; Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 8); this->actor.gravity = -1.0f; - this->actor.speedXZ = 1.0f; + this->actor.speed = 1.0f; } else if (this->unk_3DE == 0xB) { Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 9); - this->actor.speedXZ = 3.2f; + this->actor.speed = 3.2f; this->actor.velocity.y = 2.0f; this->actor.gravity = -1.0f; } else { this->actor.world.rot.y = this->actor.yawTowardsPlayer; Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 3); if (this->actor.bgCheckFlags & 1) { - this->actor.speedXZ = -4.0f; + this->actor.speed = -4.0f; } } Actor_PlaySfx(&this->actor, NA_SE_EN_STALKID_DAMAGE); @@ -709,12 +709,12 @@ void func_809960AC(EnSkb* this, PlayState* play) { for (i = 0; i < 10; i++) { func_809947B0(play, this, &this->actor.world.pos); } - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } if (this->actor.bgCheckFlags & 1) { - if (this->actor.speedXZ < 0.0f) { - this->actor.speedXZ += 0.05f; + if (this->actor.speed < 0.0f) { + this->actor.speed += 0.05f; } Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 1, 0x9C4, 0); } @@ -731,7 +731,7 @@ void func_809961E4(EnSkb* this, PlayState* play) { Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 4); this->unk_3D8 |= 0x40; if (this->actor.bgCheckFlags & 1) { - this->actor.speedXZ = -6.0f; + this->actor.speed = -6.0f; } this->unk_3E4 = 0; this->actor.flags &= ~ACTOR_FLAG_1; diff --git a/src/overlays/actors/ovl_En_Snowman/z_en_snowman.c b/src/overlays/actors/ovl_En_Snowman/z_en_snowman.c index 68f6f1606b..0c4d0d465d 100644 --- a/src/overlays/actors/ovl_En_Snowman/z_en_snowman.c +++ b/src/overlays/actors/ovl_En_Snowman/z_en_snowman.c @@ -246,15 +246,15 @@ void EnSnowman_Init(Actor* thisx, PlayState* play) { thisx->velocity.y = (Actor_WorldDistXZToActor(thisx, &player->actor) * 0.035f) + -5.0f; thisx->velocity.y = CLAMP_MAX(thisx->velocity.y, 3.5f); if (EN_SNOWMAN_GET_TYPE(thisx) == EN_SNOWMAN_TYPE_SMALL_SNOWBALL) { - thisx->speedXZ = 15.0f; + thisx->speed = 15.0f; } else { - thisx->speedXZ = 22.5f; + thisx->speed = 22.5f; thisx->velocity.y *= 1.5f; } - thisx->world.pos.x += thisx->speedXZ * Math_SinS(thisx->world.rot.y); + thisx->world.pos.x += thisx->speed * Math_SinS(thisx->world.rot.y); thisx->world.pos.y += thisx->velocity.y; - thisx->world.pos.z += thisx->speedXZ * Math_CosS(thisx->world.rot.y); + thisx->world.pos.z += thisx->speed * Math_CosS(thisx->world.rot.y); if (EN_SNOWMAN_GET_TYPE(thisx) == EN_SNOWMAN_TYPE_SMALL_SNOWBALL) { this->collider.dim.radius = 8; @@ -338,7 +338,7 @@ void EnSnowman_SpawnBigSnowballFragmentEffects(EnSnowman* this, PlayState* play) void EnSnowman_SetupMoveSnowPile(EnSnowman* this) { Animation_PlayLoop(&this->snowPileSkelAnime, &gEenoSnowPileMoveAnim); this->actor.scale.y = this->actor.scale.x; - this->actor.speedXZ = 2.0f; + this->actor.speed = 2.0f; this->actor.draw = EnSnowman_DrawSnowPile; this->work.timer = 40; this->turningOnSteepSlope = false; @@ -420,7 +420,7 @@ void EnSnowman_SetupEmerge(EnSnowman* this, PlayState* play) { this->collider.dim.height = this->eenoScale * 25.0f; this->actor.draw = EnSnowman_Draw; this->actor.scale.y = this->actor.scale.x * 0.4f; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.shape.rot.y = this->actor.yawTowardsPlayer; EnSnowman_SpawnCircularDustEffect(this, play); this->collider.base.acFlags &= ~AC_ON; @@ -605,7 +605,7 @@ void EnSnowman_SetupMelt(EnSnowman* this) { this->actor.flags &= ~ACTOR_FLAG_1; this->actor.flags |= ACTOR_FLAG_10; this->actor.scale.y = this->actor.scale.x; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actionFunc = EnSnowman_Melt; } @@ -673,7 +673,7 @@ void EnSnowman_SetupDamaged(EnSnowman* this) { this->work.timer = 20; this->actor.draw = EnSnowman_Draw; this->actor.scale.y = this->actor.scale.x; - this->actor.speedXZ = 10.0f; + this->actor.speed = 10.0f; func_800BE504(&this->actor, &this->collider); if (EN_SNOWMAN_GET_TYPE(&this->actor) == EN_SNOWMAN_TYPE_LARGE) { @@ -696,7 +696,7 @@ void EnSnowman_Damaged(EnSnowman* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); rotationalVelocityScale = CLAMP_MAX(this->work.timer, 10); this->actor.shape.rot.y += rotationalVelocityScale * 0x300; - Math_StepToF(&this->actor.speedXZ, 0.0f, 0.5f); + Math_StepToF(&this->actor.speed, 0.0f, 0.5f); if (EN_SNOWMAN_GET_TYPE(&this->actor) == EN_SNOWMAN_TYPE_LARGE) { Math_StepToF(&this->actor.scale.y, 1.3f * 0.01f, 0.7f * 0.001f); @@ -878,11 +878,11 @@ void EnSnowman_SetupCombine(EnSnowman* this, PlayState* play, Vec3f* combinePos) //! @bug: If an Eeno is in the middle of submerging, its draw function will still be EnSnowman_Draw. //! It will call EnSnowman_SetupSubmerge again, resulting in the submerge animation playing twice. if (this->actor.draw == EnSnowman_DrawSnowPile) { - this->actor.speedXZ = 3.0f; + this->actor.speed = 3.0f; this->actionFunc = EnSnowman_Combine; } else { this->isHoldingSnowball = false; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; // At this point, the combineState is EN_SNOWMAN_COMBINE_STATE_ACTIVE, and the actionFunc // will be set to EnSnowman_Submerge. When the submerging animation is complete with this @@ -942,7 +942,7 @@ void EnSnowman_Combine(EnSnowman* this, PlayState* play) { } if (Actor_WorldDistXZToPoint(&this->actor, &this->combinePos) < 20.0f) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } if (Math_StepToF(&this->actor.scale.x, this->fwork.targetScaleDuringCombine, 0.0005f)) { diff --git a/src/overlays/actors/ovl_En_Sob1/z_en_sob1.c b/src/overlays/actors/ovl_En_Sob1/z_en_sob1.c index 035bc2bfab..d748b0b7df 100644 --- a/src/overlays/actors/ovl_En_Sob1/z_en_sob1.c +++ b/src/overlays/actors/ovl_En_Sob1/z_en_sob1.c @@ -738,9 +738,9 @@ void EnSob1_EndWalk(EnSob1* this, PlayState* play) { EnSob1_GetDistSqAndOrient(this->path, this->waypoint - 1, &this->actor.world.pos, &distSq), 4, 1000, 1); this->actor.shape.rot.y = this->actor.world.rot.y; - Math_ApproachF(&this->actor.speedXZ, 0.5f, 0.2f, 1.0f); + Math_ApproachF(&this->actor.speed, 0.5f, 0.2f, 1.0f); if (distSq < 12.0f) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; if (animLastFrame == curFrame) { EnSob1_ChangeAnim(&this->skelAnime, sAnimationInfoBombShopkeeper, BOMB_SHOPKEEPER_ANIM_SIT_AT_COUNTER_START); @@ -777,11 +777,11 @@ void EnSob1_Walk(EnSob1* this, PlayState* play) { EnSob1_GetDistSqAndOrient(this->path, this->waypoint, &this->actor.world.pos, &distSq), 4, 1000, 1); this->actor.shape.rot.y = this->actor.world.rot.y; - this->actor.speedXZ = 2.0f; + this->actor.speed = 2.0f; if (distSq < SQ(5.0f)) { this->waypoint++; if ((this->path->count - 1) < this->waypoint) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; EnSob1_SetupAction(this, EnSob1_EndWalk); } } diff --git a/src/overlays/actors/ovl_En_St/z_en_st.c b/src/overlays/actors/ovl_En_St/z_en_st.c index 66dbfca21f..ff34769625 100644 --- a/src/overlays/actors/ovl_En_St/z_en_st.c +++ b/src/overlays/actors/ovl_En_St/z_en_st.c @@ -781,7 +781,7 @@ void func_808A6E24(EnSt* this, PlayState* play) { this->actor.world.rot.x = 0x4000; this->actor.shape.rot.x = this->actor.world.rot.x; this->unk_2D0 = this->actor.velocity.y = fabsf(this->actor.velocity.y) * 0.6f; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; if ((s32)this->unk_2D0 != 0) { Actor_PlaySfx(&this->actor, NA_SE_EN_EYEGOLE_ATTACK); diff --git a/src/overlays/actors/ovl_En_Stop_heishi/z_en_stop_heishi.c b/src/overlays/actors/ovl_En_Stop_heishi/z_en_stop_heishi.c index 089cb3ebaf..0106430a17 100644 --- a/src/overlays/actors/ovl_En_Stop_heishi/z_en_stop_heishi.c +++ b/src/overlays/actors/ovl_En_Stop_heishi/z_en_stop_heishi.c @@ -351,7 +351,7 @@ void func_80AE7E9C(EnStopheishi* this) { this->unk_274 = 0; this->disableCollider = false; this->actionFunc = func_80AE7F34; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } void func_80AE7F34(EnStopheishi* this, PlayState* play) { diff --git a/src/overlays/actors/ovl_En_Suttari/z_en_suttari.c b/src/overlays/actors/ovl_En_Suttari/z_en_suttari.c index 4016052baf..997db1cf12 100644 --- a/src/overlays/actors/ovl_En_Suttari/z_en_suttari.c +++ b/src/overlays/actors/ovl_En_Suttari/z_en_suttari.c @@ -452,7 +452,7 @@ void func_80BAAFDC(EnSuttari* this, PlayState* play) { if (this->playerDetected == true) { play_sound(NA_SE_SY_FOUND); this->playerDetected = false; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; if (this->unk1F4[0] != 0) { this->unk1F4[0]--; } @@ -485,7 +485,7 @@ void func_80BAB1A0(EnSuttari* this, PlayState* play) { if (this->playerDetected == true) { play_sound(NA_SE_SY_FOUND); this->playerDetected = false; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; if (this->unk1F4[0] != 0) { this->unk1F4[0]--; } @@ -1032,7 +1032,7 @@ void func_80BACA14(EnSuttari* this, PlayState* play) { func_800B8614(&this->actor, play, 200.0f); } } - Math_ApproachF(&this->actor.speedXZ, 5.0f, 0.2f, 0.1f); + Math_ApproachF(&this->actor.speed, 5.0f, 0.2f, 0.1f); Actor_MoveWithGravity(&this->actor); } @@ -1054,10 +1054,10 @@ void func_80BACBB0(EnSuttari* this, PlayState* play) { } Math_SmoothStepToS(&this->actor.world.rot.y, target, 4, 0x3E8, 1); this->actor.shape.rot.y = this->actor.world.rot.y; - Math_ApproachF(&this->actor.speedXZ, 5.0f, 0.2f, 0.1f); + Math_ApproachF(&this->actor.speed, 5.0f, 0.2f, 0.1f); } else { this->actionFunc = func_80BACD2C; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } Actor_MoveWithGravity(&this->actor); if (!(this->actor.bgCheckFlags & 1)) { @@ -1076,7 +1076,7 @@ void func_80BACD2C(EnSuttari* this, PlayState* play) { } if ((this->actor.playerHeightRel < 60.0f) && (this->actor.xzDistToPlayer < 500.0f)) { this->actionFunc = func_80BACBB0; - Math_ApproachF(&this->actor.speedXZ, 5.0f, 0.2f, 0.1f); + Math_ApproachF(&this->actor.speed, 5.0f, 0.2f, 0.1f); } else { Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 4, 0x3E8, 1); this->actor.shape.rot.y = this->actor.world.rot.y; @@ -1118,7 +1118,7 @@ void func_80BACEE0(EnSuttari* this, PlayState* play) { if (this->unk428 == 5) { SET_WEEKEVENTREG(WEEKEVENTREG_58_80); this->actionFunc = func_80BADDB4; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } else if (Player_GetMask(play) != PLAYER_MASK_STONE) { func_80BAB1A0(this, play); } @@ -1203,7 +1203,7 @@ void func_80BAD380(EnSuttari* this, PlayState* play) { if ((player->stateFlags1 & PLAYER_STATE1_40) && (play->msgCtx.currentTextId != 0x2A31)) { this->flags1 |= 0x8000; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } else { this->flags1 &= ~0x8000; func_80BABA90(this, 1, 1); @@ -1222,7 +1222,7 @@ void func_80BAD380(EnSuttari* this, PlayState* play) { } else if (this->flags1 & 0x200) { SET_WEEKEVENTREG(WEEKEVENTREG_79_40); this->flags2 |= 4; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; Actor_Spawn(&play->actorCtx, play, ACTOR_EN_CLEAR_TAG, this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, CLEAR_TAG_SMALL_EXPLOSION); SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 30, NA_SE_IT_BOMB_EXPLOSION); @@ -1233,13 +1233,13 @@ void func_80BAD380(EnSuttari* this, PlayState* play) { if (this->flags2 & 8) { SET_WEEKEVENTREG(WEEKEVENTREG_33_08); } - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; Audio_QueueSeqCmd(0x101400FF); this->flags2 |= 4; EnSuttari_TriggerTransition(play, ENTRANCE(NORTH_CLOCK_TOWN, 7)); } else { this->unk3F2 = this->headRot.y; - Math_ApproachF(&this->actor.speedXZ, 4.0f, 0.2f, 0.5f); + Math_ApproachF(&this->actor.speed, 4.0f, 0.2f, 0.5f); Actor_MoveWithGravity(&this->actor); func_80BAB374(this, play); } @@ -1410,10 +1410,10 @@ void func_80BADDB4(EnSuttari* this, PlayState* play) { void func_80BADE14(EnSuttari* this, PlayState* play) { func_80BABA90(this, 1, 2); if (this->unk1F4[1] == -0x63) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } else { this->unk3F2 = this->headRot.y; - Math_ApproachF(&this->actor.speedXZ, 6.0f, 0.2f, 0.5f); + Math_ApproachF(&this->actor.speed, 6.0f, 0.2f, 0.5f); } Actor_MoveWithGravity(&this->actor); } @@ -1438,7 +1438,7 @@ void func_80BADF3C(EnSuttari* this, PlayState* play) { } this->unk3F2 = this->headRot.y; if (DECR(this->unk3F6) == 0) { - Math_ApproachF(&this->actor.speedXZ, 6.0f, 0.2f, 0.5f); + Math_ApproachF(&this->actor.speed, 6.0f, 0.2f, 0.5f); } Actor_MoveWithGravity(&this->actor); } diff --git a/src/overlays/actors/ovl_En_Sw/z_en_sw.c b/src/overlays/actors/ovl_En_Sw/z_en_sw.c index 0d0e75a092..9606e3d080 100644 --- a/src/overlays/actors/ovl_En_Sw/z_en_sw.c +++ b/src/overlays/actors/ovl_En_Sw/z_en_sw.c @@ -378,8 +378,8 @@ void func_808D94D0(EnSw* this, PlayState* play, s32 arg2, s32 arg3, s16 arg4) { sp68 = BGCHECK_SCENE; sp64 = BGCHECK_SCENE; func_808D90F0(this, arg3, arg4); - this->actor.speedXZ = this->unk_44C; - temp_f20 = thisx->speedXZ * 2.0f; + this->actor.speed = this->unk_44C; + temp_f20 = thisx->speed * 2.0f; sp90.x = this->actor.world.pos.x + (this->unk_368.x * 2.0f); sp90.y = this->actor.world.pos.y + (this->unk_368.y * 2.0f); @@ -397,7 +397,7 @@ void func_808D94D0(EnSw* this, PlayState* play, s32 arg2, s32 arg3, s16 arg4) { func_808D91C4(this, spA4); Math_Vec3f_Copy(&this->actor.world.pos, &sp78); this->actor.floorBgId = sp64; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } else { if (spA0 != this->actor.floorPoly) { func_808D91C4(this, spA0); @@ -406,7 +406,7 @@ void func_808D94D0(EnSw* this, PlayState* play, s32 arg2, s32 arg3, s16 arg4) { this->actor.floorBgId = sp68; } } else { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; temp_f20 *= 3.0f; Math_Vec3f_Copy(&sp90, &sp84); @@ -440,8 +440,8 @@ void func_808D94D0(EnSw* this, PlayState* play, s32 arg2, s32 arg3, s16 arg4) { this->actor.shape.rot.y = this->actor.world.rot.y; this->actor.shape.rot.z = this->actor.world.rot.z; - if (this->actor.speedXZ != 0.0f) { - this->unk_44C = this->actor.speedXZ; + if (this->actor.speed != 0.0f) { + this->unk_44C = this->actor.speed; } if (arg2 == 1) { @@ -555,15 +555,15 @@ s32 func_808D9C18(EnSw* this) { f32 new_var; if ((this->unk_498 == 0xF9) || (this->unk_498 == 0x82) || (this->unk_498 == 0xE4) || (this->unk_498 == 0xE5)) { - this->actor.velocity.x = this->actor.speedXZ; - this->actor.velocity.z = this->actor.speedXZ; + this->actor.velocity.x = this->actor.speed; + this->actor.velocity.z = this->actor.speed; this->actor.velocity.x *= Math_SinS(this->actor.world.rot.y); this->actor.velocity.z *= Math_CosS(this->actor.world.rot.y); } else { - new_var = this->actor.speedXZ * this->unk_350.x; - this->actor.velocity.x = new_var + (this->actor.speedXZ * this->unk_368.x); - new_var = this->actor.speedXZ * this->unk_350.z; - this->actor.velocity.z = new_var + this->actor.speedXZ * this->unk_368.z; + new_var = this->actor.speed * this->unk_350.x; + this->actor.velocity.x = new_var + (this->actor.speed * this->unk_368.x); + new_var = this->actor.speed * this->unk_350.z; + this->actor.velocity.z = new_var + this->actor.speed * this->unk_368.z; this->actor.velocity.y = 14.0f; Math_Vec3f_Copy(&sp3C, &this->actor.world.pos); Math_Vec3f_Copy(&sp30, &this->actor.world.pos); @@ -635,10 +635,10 @@ void func_808D9F78(EnSw* this, PlayState* play, s32 arg2) { } Actor_SetScale(&this->actor, 0.02f); func_808D9DA0(this); - this->actor.speedXZ = 10.0f; + this->actor.speed = 10.0f; this->unk_44C = 10.0f; func_808D94D0(this, play, 0, 0, 0); - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->unk_44C = 0.0f; this->unk_450 = 1.0f; Math_Vec3f_Copy(&this->actor.home.pos, &this->actor.world.pos); @@ -647,10 +647,10 @@ void func_808D9F78(EnSw* this, PlayState* play, s32 arg2) { void func_808DA024(EnSw* this, PlayState* play) { func_808D9DA0(this); - this->actor.speedXZ = 10.0f; + this->actor.speed = 10.0f; this->unk_44C = 10.0f; func_808D94D0(this, play, 0, 0, 0); - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->unk_44C = 0.0f; this->unk_450 = 1.0f; } @@ -791,7 +791,7 @@ void func_808DA578(EnSw* this, PlayState* play) { temp_f0 = this->skelAnime.endFrame - this->skelAnime.curFrame; this->unk_44C = 0.3f * temp_f0; func_808D94D0(this, play, 1, 0, 0); - if ((this->actor.speedXZ == 0.0f) && (this->unk_44C != 0.0f)) { + if ((this->actor.speed == 0.0f) && (this->unk_44C != 0.0f)) { Math_Vec3f_Copy(&sp30, &this->unk_374); func_808D9894(this, &sp30); temp2 = Math_Atan2S_XY(sp30.z, sp30.x); @@ -822,7 +822,7 @@ void func_808DA6FC(EnSw* this, PlayState* play) { temp_f0 = this->skelAnime.endFrame - this->skelAnime.curFrame; this->unk_44C = 0.14f * temp_f0; func_808D94D0(this, play, 1, 0, 0); - if ((this->actor.speedXZ == 0.0f) && (this->unk_44C != 0.0f)) { + if ((this->actor.speed == 0.0f) && (this->unk_44C != 0.0f)) { Math_Vec3f_Copy(&sp38, &this->unk_374); func_808D9894(this, &sp38); temp2 = Math_Atan2S_XY(sp38.z, sp38.x); @@ -880,7 +880,7 @@ void func_808DA89C(EnSw* this, PlayState* play) { temp_f2 = fabsf(this->actor.velocity.y) * 0.6f; this->actor.velocity.y = temp_f2; this->unk_448 = temp_f2; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; if ((s32)temp_f2 != 0) { Actor_PlaySfx(&this->actor, NA_SE_EN_STALTURA_BOUND); } else { @@ -963,7 +963,7 @@ void func_808DACF4(EnSw* this, PlayState* play) { temp = this->skelAnime.endFrame - this->skelAnime.curFrame; this->unk_44C = 0.1f * temp; func_808D94D0(this, play, 1, 0, 0); - if ((this->actor.speedXZ == 0.0f) && (this->unk_44C != 0.0f)) { + if ((this->actor.speed == 0.0f) && (this->unk_44C != 0.0f)) { Math_Vec3f_Copy(&sp38, &this->unk_374); func_808D9894(this, &sp38); diff --git a/src/overlays/actors/ovl_En_Syateki_Crow/z_en_syateki_crow.c b/src/overlays/actors/ovl_En_Syateki_Crow/z_en_syateki_crow.c index aac4a27f6c..ffc8e9d9b9 100644 --- a/src/overlays/actors/ovl_En_Syateki_Crow/z_en_syateki_crow.c +++ b/src/overlays/actors/ovl_En_Syateki_Crow/z_en_syateki_crow.c @@ -116,7 +116,7 @@ void EnSyatekiCrow_Destroy(Actor* thisx, PlayState* play) { void EnSyatekiCrow_SetupWaitForSignal(EnSyatekiCrow* this) { Actor_SetScale(&this->actor, 0.03f); - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.gravity = 0.0f; this->actor.world = this->actor.home; this->actor.prevPos = this->actor.home.pos; @@ -171,7 +171,7 @@ void EnSyatekiCrow_WaitToMove(EnSyatekiCrow* this, PlayState* play) { if (((EN_SYATEKI_CROW_GET_WAIT_MOD(&this->actor) * 20) + 20) < this->waitTimer) { Actor_PlaySfx(this->actor.parent, NA_SE_EN_KAICHO_CRY); this->waitTimer = 0; - this->actor.speedXZ = EN_SYATEKI_CROW_GET_SPEED_MOD(&this->actor) + 6.0f; + this->actor.speed = EN_SYATEKI_CROW_GET_SPEED_MOD(&this->actor) + 6.0f; this->actor.gravity = -0.5f; this->actionFunc = EnSyatekiCrow_Fly; } else { @@ -222,7 +222,7 @@ void EnSyatekiCrow_SetupDead(EnSyatekiCrow* this) { syatekiMan->score += 60; this->isActive = false; - this->actor.speedXZ *= Math_CosS(this->actor.world.rot.x); + this->actor.speed *= Math_CosS(this->actor.world.rot.x); this->actor.velocity.y = 0.0f; Animation_Change(&this->skelAnime, &gGuayFlyAnim, 0.4f, 0.0f, 0.0f, ANIMMODE_LOOP_INTERP, -3.0f); this->actor.bgCheckFlags &= ~1; @@ -234,7 +234,7 @@ void EnSyatekiCrow_SetupDead(EnSyatekiCrow* this) { void EnSyatekiCrow_Dead(EnSyatekiCrow* this, PlayState* play) { EnSyatekiMan* syatekiMan = (EnSyatekiMan*)this->actor.parent; - Math_StepToF(&this->actor.speedXZ, 0.0f, 0.5f); + Math_StepToF(&this->actor.speed, 0.0f, 0.5f); this->actor.colorFilterTimer = 40; if (this->actor.colorFilterParams & 0x4000) { diff --git a/src/overlays/actors/ovl_En_Syateki_Dekunuts/z_en_syateki_dekunuts.c b/src/overlays/actors/ovl_En_Syateki_Dekunuts/z_en_syateki_dekunuts.c index c678f37307..f86e501005 100644 --- a/src/overlays/actors/ovl_En_Syateki_Dekunuts/z_en_syateki_dekunuts.c +++ b/src/overlays/actors/ovl_En_Syateki_Dekunuts/z_en_syateki_dekunuts.c @@ -164,7 +164,7 @@ void EnSyatekiDekunuts_Destroy(Actor* thisx, PlayState* play) { void EnSyatekiDekunuts_SetupWaitForSignal(EnSyatekiDekunuts* this) { Animation_PlayOnceSetSpeed(&this->skelAnime, &gDekuScrubUpAnim, 0.0f); - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.world = this->actor.home; this->actor.prevPos = this->actor.home.pos; this->actor.shape.rot = this->actor.world.rot; diff --git a/src/overlays/actors/ovl_En_Syateki_Wf/z_en_syateki_wf.c b/src/overlays/actors/ovl_En_Syateki_Wf/z_en_syateki_wf.c index ce044256a8..7dd26d9a93 100644 --- a/src/overlays/actors/ovl_En_Syateki_Wf/z_en_syateki_wf.c +++ b/src/overlays/actors/ovl_En_Syateki_Wf/z_en_syateki_wf.c @@ -216,7 +216,7 @@ void EnSyatekiWf_InitPathStart(EnSyatekiWf* this) { void EnSyatekiWf_SetupWaitForSignal(EnSyatekiWf* this) { EnSyatekiMan* syatekiMan = (EnSyatekiMan*)this->actor.parent; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.world = this->actor.home; this->actor.prevPos = this->actor.home.pos; this->actor.shape.rot = this->actor.world.rot; @@ -264,7 +264,7 @@ void EnSyatekiWf_WaitToMove(EnSyatekiWf* this, PlayState* play) { void EnSyatekiWf_SetupRun(EnSyatekiWf* this) { Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, EN_SYATEKI_WF_ANIM_RUN); - this->actor.speedXZ = 10.0f; + this->actor.speed = 10.0f; this->actor.world.rot.y = this->actor.shape.rot.y; this->actor.draw = EnSyatekiWf_Draw; this->actionFunc = EnSyatekiWf_Run; @@ -310,10 +310,10 @@ void EnSyatekiWf_Run(EnSyatekiWf* this, PlayState* play) { Math_SmoothStepToS(&this->actor.world.rot.y, this->yawTarget, 5, 0x3000, 0x100); this->actor.shape.rot.y = this->actor.world.rot.y; if (distToTarget < 50.0f) { - if (this->actor.speedXZ > 3.0f) { - this->actor.speedXZ = this->actor.speedXZ - 0.5f; + if (this->actor.speed > 3.0f) { + this->actor.speed = this->actor.speed - 0.5f; } else { - this->actor.speedXZ = this->actor.speedXZ; + this->actor.speed = this->actor.speed; } } } else { @@ -339,7 +339,7 @@ void EnSyatekiWf_Run(EnSyatekiWf* this, PlayState* play) { void EnSyatekiWf_SetupJump(EnSyatekiWf* this) { Actor_PlaySfx(&this->actor, NA_SE_EN_TEKU_JUMP); this->actor.velocity.y = 20.0f; - this->actor.speedXZ = 5.0f; + this->actor.speed = 5.0f; Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, EN_SYATEKI_WF_ANIM_JUMP); this->actionFunc = EnSyatekiWf_Jump; } @@ -351,7 +351,7 @@ void EnSyatekiWf_Jump(EnSyatekiWf* this, PlayState* play) { } void EnSyatekiWf_SetupLand(EnSyatekiWf* this) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, EN_SYATEKI_WF_ANIM_LAND); this->actionFunc = EnSyatekiWf_Land; } @@ -367,7 +367,7 @@ void EnSyatekiWf_Land(EnSyatekiWf* this, PlayState* play) { void EnSyatekiWf_SetupHowl(EnSyatekiWf* this) { this->timer = 40; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; Actor_PlaySfx(&this->actor, NA_SE_EN_WOLFOS_APPEAR); Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, EN_SYATEKI_WF_ANIM_DAMAGED); this->actionFunc = EnSyatekiWf_Howl; @@ -389,7 +389,7 @@ void EnSyatekiWf_SetupDead(EnSyatekiWf* this, PlayState* play) { EnSyatekiMan* syatekiMan = (EnSyatekiMan*)this->actor.parent; this->isActive = false; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; EffectSsExtra_Spawn(play, &this->actor.world.pos, &sVelocity, &sAccel, 5, 2); Actor_PlaySfx(&this->actor, NA_SE_EN_WOLFOS_DEAD); Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, EN_SYATEKI_WF_ANIM_REAR_UP_FALL_OVER); diff --git a/src/overlays/actors/ovl_En_Talk_Gibud/z_en_talk_gibud.c b/src/overlays/actors/ovl_En_Talk_Gibud/z_en_talk_gibud.c index ab86647aaa..ac65fbbe61 100644 --- a/src/overlays/actors/ovl_En_Talk_Gibud/z_en_talk_gibud.c +++ b/src/overlays/actors/ovl_En_Talk_Gibud/z_en_talk_gibud.c @@ -322,7 +322,7 @@ void EnTalkGibud_AttemptPlayerFreeze(EnTalkGibud* this, PlayState* play) { void EnTalkGibud_SetupWalkToPlayer(EnTalkGibud* this) { Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, EN_TALK_GIBUD_ANIM_WALK); - this->actor.speedXZ = 0.4f; + this->actor.speed = 0.4f; if (this->actionFunc == EnTalkGibud_AttemptPlayerFreeze) { this->playerStunWaitTimer = 80; @@ -448,13 +448,13 @@ void EnTalkGibud_Grab(EnTalkGibud* this, PlayState* play) { void EnTalkGibud_SetupGrabFail(EnTalkGibud* this) { Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, EN_TALK_GIBUD_ANIM_DAMAGE); Actor_PlaySfx(&this->actor, NA_SE_EN_REDEAD_DAMAGE); - this->actor.speedXZ = -2.0f; + this->actor.speed = -2.0f; this->actionFunc = EnTalkGibud_GrabFail; } void EnTalkGibud_GrabFail(EnTalkGibud* this, PlayState* play) { - if (this->actor.speedXZ < 0.0f) { - this->actor.speedXZ += 0.15f; + if (this->actor.speed < 0.0f) { + this->actor.speed += 0.15f; } this->actor.world.rot.y = this->actor.yawTowardsPlayer; @@ -487,7 +487,7 @@ void EnTalkGibud_TurnAwayAndShakeHead(EnTalkGibud* this, PlayState* play) { void EnTalkGibud_SetupWalkToHome(EnTalkGibud* this) { Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, EN_TALK_GIBUD_ANIM_WALK); - this->actor.speedXZ = 0.4f; + this->actor.speed = 0.4f; this->actionFunc = EnTalkGibud_WalkToHome; } @@ -495,10 +495,10 @@ void EnTalkGibud_WalkToHome(EnTalkGibud* this, PlayState* play) { Math_SmoothStepToS(&this->headRotation.y, 0, 1, 100, 0); Math_SmoothStepToS(&this->upperBodyRotation.y, 0, 1, 100, 0); if (Actor_WorldDistXZToPoint(&this->actor, &this->actor.home.pos) < 5.0f) { - if (this->actor.speedXZ > 0.2f) { - this->actor.speedXZ -= 0.2f; + if (this->actor.speed > 0.2f) { + this->actor.speed -= 0.2f; } else { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.home.rot.y, 1, 200, 10); @@ -521,7 +521,7 @@ void EnTalkGibud_WalkToHome(EnTalkGibud* this, PlayState* play) { void EnTalkGibud_SetupStunned(EnTalkGibud* this) { this->stunTimer = 10; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.world.rot.y = this->actor.shape.rot.y; if (this->drawDmgEffTimer != 0) { @@ -553,13 +553,13 @@ void EnTalkGibud_SetupDamage(EnTalkGibud* this) { this->stunTimer = 0; this->grabWaitTimer = 0; this->actor.world.rot.y = this->actor.yawTowardsPlayer; - this->actor.speedXZ = -2.0f; + this->actor.speed = -2.0f; this->actionFunc = EnTalkGibud_Damage; } void EnTalkGibud_Damage(EnTalkGibud* this, PlayState* play) { - if (this->actor.speedXZ < 0.0f) { - this->actor.speedXZ += 0.15f; + if (this->actor.speed < 0.0f) { + this->actor.speed += 0.15f; } if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) { diff --git a/src/overlays/actors/ovl_En_Tanron2/z_en_tanron2.c b/src/overlays/actors/ovl_En_Tanron2/z_en_tanron2.c index f6b0b2f31f..56384193ec 100644 --- a/src/overlays/actors/ovl_En_Tanron2/z_en_tanron2.c +++ b/src/overlays/actors/ovl_En_Tanron2/z_en_tanron2.c @@ -201,7 +201,7 @@ void func_80BB69FC(EnTanron2* this, PlayState* play) { void func_80BB6B80(EnTanron2* this) { this->actionFunc = func_80BB6BD8; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.velocity.z = 0.0f; this->actor.velocity.y = 0.0f; this->actor.velocity.x = 0.0f; @@ -240,14 +240,14 @@ void func_80BB6BD8(EnTanron2* this, PlayState* play) { } else { sp32 = Math_Atan2S(sp2C, sp28); } - this->actor.speedXZ = Rand_ZeroFloat(5.0f) + 5.0f; + this->actor.speed = Rand_ZeroFloat(5.0f) + 5.0f; break; case 1: sp32 = Math_Atan2S(sp2C, sp28); - this->actor.speedXZ += 2.0f; - if (this->actor.speedXZ > 10.0f) { - this->actor.speedXZ = 10.0f; + this->actor.speed += 2.0f; + if (this->actor.speed > 10.0f) { + this->actor.speed = 10.0f; } break; @@ -255,14 +255,14 @@ void func_80BB6BD8(EnTanron2* this, PlayState* play) { sp32 = Math_Atan2S(player->actor.world.pos.x - this->actor.world.pos.x, player->actor.world.pos.z - this->actor.world.pos.z) + (s16)Rand_ZeroFloat(20000.0f); - this->actor.speedXZ = Rand_ZeroFloat(7.0f) + 7.0f; + this->actor.speed = Rand_ZeroFloat(7.0f) + 7.0f; if ((this->unk_152 == 0) && (D_80BB8450->unk_1F6 == 0)) { this->unk_158 = 1; } break; } Matrix_RotateYS(sp32, MTXMODE_NEW); - Matrix_MultVecZ(this->actor.speedXZ, &this->actor.velocity); + Matrix_MultVecZ(this->actor.speed, &this->actor.velocity); this->actor.velocity.y = Rand_ZeroFloat(5.0f) + 12.0f; this->unk_14E = 5; } diff --git a/src/overlays/actors/ovl_En_Tanron3/z_en_tanron3.c b/src/overlays/actors/ovl_En_Tanron3/z_en_tanron3.c index 4de900cc4c..1ff73fd9f5 100644 --- a/src/overlays/actors/ovl_En_Tanron3/z_en_tanron3.c +++ b/src/overlays/actors/ovl_En_Tanron3/z_en_tanron3.c @@ -153,7 +153,7 @@ void EnTanron3_SetupLive(EnTanron3* this, PlayState* play) { this->rotationStep = 0; this->rotationScale = 5; this->workTimer[WORK_TIMER_PICK_NEW_DEVIATION] = 50; - this->actor.speedXZ = 5.0f; + this->actor.speed = 5.0f; this->speedMaxStep = 0.5f; this->deviation.x = randPlusMinusPoint5Scaled(500.0f); this->deviation.y = randPlusMinusPoint5Scaled(100.0f); @@ -219,7 +219,7 @@ void EnTanron3_Live(EnTanron3* this, PlayState* play) { case true: if (sGyorg->unk_324 != 0 && !(this->timer & 0x7)) { this->nextRotationAngle = 0x4E20; - this->actor.speedXZ = 6.0f; + this->actor.speed = 6.0f; } else { this->nextRotationAngle = 0x1F40; } @@ -242,7 +242,7 @@ void EnTanron3_Live(EnTanron3* this, PlayState* play) { } if (this->workTimer[WORK_TIMER_OUT_OF_WATER] == 0) { - if (this->workTimer[WORK_TIMER_PICK_NEW_DEVIATION] == 0 && this->actor.speedXZ > 1.0f) { + if (this->workTimer[WORK_TIMER_PICK_NEW_DEVIATION] == 0 && this->actor.speed > 1.0f) { this->workTimer[WORK_TIMER_PICK_NEW_DEVIATION] = Rand_ZeroFloat(20.0f); this->deviation.x = randPlusMinusPoint5Scaled(100.0f); this->deviation.y = randPlusMinusPoint5Scaled(50.0f + extraScaleY); @@ -265,7 +265,7 @@ void EnTanron3_Live(EnTanron3* this, PlayState* play) { Math_SmoothStepToS(&this->actor.world.rot.y, atanTemp, this->rotationScale, this->rotationStep, 0); Math_ApproachS(&this->rotationStep, this->targetRotationStep, 1, 0x100); - Math_ApproachF(&this->actor.speedXZ, this->targetSpeedXZ, 1.0f, this->speedMaxStep); + Math_ApproachF(&this->actor.speed, this->targetSpeedXZ, 1.0f, this->speedMaxStep); Actor_MoveWithoutGravityReverse(&this->actor); } else { switch (this->isBeached) { @@ -276,7 +276,7 @@ void EnTanron3_Live(EnTanron3* this, PlayState* play) { this->workTimer[WORK_TIMER_OUT_OF_WATER] = 25; Math_ApproachS(&this->actor.world.rot.x, 0x3000, 5, 0xBD0); if (this->actor.bgCheckFlags & 8) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; if (this->actor.velocity.y > 0.0f) { this->actor.velocity.y = -1.0f; } @@ -292,7 +292,7 @@ void EnTanron3_Live(EnTanron3* this, PlayState* play) { if (this->actor.bgCheckFlags & 1) { // Fish is still touching land, so it's still beached. Randomly flop around this->actor.velocity.y = Rand_ZeroFloat(5.0f) + 5.0f; - this->actor.speedXZ = Rand_ZeroFloat(2.0f) + 2.0f; + this->actor.speed = Rand_ZeroFloat(2.0f) + 2.0f; if (Rand_ZeroOne() < 0.5f) { this->targetShapeRotation.x = (s16)randPlusMinusPoint5Scaled(500.0f) + this->targetShapeRotation.x + 0x8000; @@ -346,7 +346,7 @@ void EnTanron3_SetupDie(EnTanron3* this, PlayState* play) { this->actor.world.rot.x = Math_Atan2S_XY(sqrtf(SQ(xDistance) + SQ(zDistance)), -yDistance); this->actor.world.rot.y = Math_Atan2S_XY(zDistance, xDistance); this->workTimer[WORK_TIMER_DIE] = 6; - this->actor.speedXZ = 10.0f; + this->actor.speed = 10.0f; Actor_PlaySfx(&this->actor, NA_SE_EN_KONB_MINI_DEAD); } diff --git a/src/overlays/actors/ovl_En_Tanron4/z_en_tanron4.c b/src/overlays/actors/ovl_En_Tanron4/z_en_tanron4.c index b533439312..1eaf1d1285 100644 --- a/src/overlays/actors/ovl_En_Tanron4/z_en_tanron4.c +++ b/src/overlays/actors/ovl_En_Tanron4/z_en_tanron4.c @@ -51,7 +51,7 @@ void EnTanron4_Init(Actor* thisx, PlayState* play2) { OBJECT_TANRON4_LIMB_MAX); thisx->flags &= ~ACTOR_FLAG_1; - thisx->speedXZ = 3.0f + KREG(48); + thisx->speed = 3.0f + KREG(48); thisx->uncullZoneForward = 10000.0f + KREG(70); this->randRollTimer = Rand_ZeroFloat(10.0f); diff --git a/src/overlays/actors/ovl_En_Tanron5/z_en_tanron5.c b/src/overlays/actors/ovl_En_Tanron5/z_en_tanron5.c index 6893b30217..dc33f7a650 100644 --- a/src/overlays/actors/ovl_En_Tanron5/z_en_tanron5.c +++ b/src/overlays/actors/ovl_En_Tanron5/z_en_tanron5.c @@ -163,7 +163,7 @@ void EnTanron5_Init(Actor* thisx, PlayState* play) { Actor_SetScale(&this->actor, (Rand_ZeroFloat(0.015f) + 0.01f) * D_80BE5DD0); } - this->actor.speedXZ = (Rand_ZeroFloat(10.0f) + 10.0f) * D_80BE5DD0; + this->actor.speed = (Rand_ZeroFloat(10.0f) + 10.0f) * D_80BE5DD0; this->actor.velocity.y = (Rand_ZeroFloat(10.0f) + 15.0f) * D_80BE5DD0; this->actor.gravity = -2.5f * D_80BE5DD0; this->actor.terminalVelocity = -1000.0f * D_80BE5DD0; @@ -415,7 +415,7 @@ void func_80BE5818(Actor* thisx, PlayState* play2) { Actor_Kill(&this->actor); } - if (this->actor.speedXZ > 0.02f) { + if (this->actor.speed > 0.02f) { Actor_MoveWithGravity(&this->actor); Actor_UpdateBgCheckInfo(play, &this->actor, 50.0f, 150.0f, 100.0f, 4); } @@ -443,7 +443,7 @@ void func_80BE5818(Actor* thisx, PlayState* play2) { this->unk_198 += 0x2000; if (this->actor.bgCheckFlags & 1) { this->unk_198 = 0; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } } diff --git a/src/overlays/actors/ovl_En_Thiefbird/z_en_thiefbird.c b/src/overlays/actors/ovl_En_Thiefbird/z_en_thiefbird.c index 8b24fc38b5..81b8000484 100644 --- a/src/overlays/actors/ovl_En_Thiefbird/z_en_thiefbird.c +++ b/src/overlays/actors/ovl_En_Thiefbird/z_en_thiefbird.c @@ -403,7 +403,7 @@ s32 func_80C10E98(PlayState* play) { if (temp_s1_5 != NULL) { temp_s1_5->velocity.y = Rand_ZeroFloat(3.0f) + 6.0f; - temp_s1_5->speedXZ = Rand_ZeroFloat(3.0f) + 3.0f; + temp_s1_5->speed = Rand_ZeroFloat(3.0f) + 3.0f; temp_s1_5->world.rot.y = phi_s3; } phi_s3 += (s16)(0x10000 / (spB0 + spAC + phi_s0_2 + spA0 + phi_s2 + spA8)); @@ -482,7 +482,7 @@ void func_80C11590(EnThiefbird* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); sp38 = Animation_OnFrame(&this->skelAnime, 0.0f); - this->actor.speedXZ = (Rand_ZeroOne() * 1.5f) + 3.0f; + this->actor.speed = (Rand_ZeroOne() * 1.5f) + 3.0f; if (this->actor.bgCheckFlags & 8) { this->unk_192 = this->actor.wallYaw; @@ -538,7 +538,7 @@ void func_80C118E4(EnThiefbird* this) { Animation_MorphToLoop(&this->skelAnime, &gTakkuriAttackAnim, -10.0f); this->unk_18E = 300; this->actionFunc = func_80C1193C; - this->actor.speedXZ = 5.0f; + this->actor.speed = 5.0f; } void func_80C1193C(EnThiefbird* this, PlayState* play) { @@ -599,7 +599,7 @@ void func_80C1193C(EnThiefbird* this, PlayState* play) { } void func_80C11C60(EnThiefbird* this) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.velocity.y = 0.0f; Animation_PlayOnce(&this->skelAnime, &gTakkuriDeathAnim); this->actor.bgCheckFlags &= ~1; @@ -623,7 +623,7 @@ void func_80C11D14(EnThiefbird* this, PlayState* play) { if (this->drawDmgEffType == ACTOR_DRAW_DMGEFF_FROZEN_NO_SFX) { if (this->unk_18E < 38) { func_80C114C0(this, play); - this->actor.speedXZ = 4.0f; + this->actor.speed = 4.0f; } else { return; } @@ -676,9 +676,9 @@ void func_80C11F6C(EnThiefbird* this, PlayState* play) { Animation_MorphToLoop(&this->skelAnime, &gTakkuriFlyWithItemAnim, -4.0f); func_80C10984(this, 15); if (this->actor.colChkInfo.damageEffect != 3) { - this->actor.speedXZ = 4.0f; + this->actor.speed = 4.0f; } else { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } if (this->actor.colChkInfo.damageEffect == 5) { @@ -725,7 +725,7 @@ void func_80C1215C(EnThiefbird* this, PlayState* play) { if (this->drawDmgEffType == ACTOR_DRAW_DMGEFF_FROZEN_NO_SFX) { if (this->unk_18E < 38) { func_80C114C0(this, play); - this->actor.speedXZ = 4.0f; + this->actor.speed = 4.0f; } else { return; } @@ -790,7 +790,7 @@ void func_80C1242C(EnThiefbird* this) { this->actor.flags |= ACTOR_FLAG_10; this->collider.base.acFlags |= AC_ON; this->actionFunc = func_80C124B0; - this->actor.speedXZ = 12.0f; + this->actor.speed = 12.0f; } void func_80C124B0(EnThiefbird* this, PlayState* play) { @@ -853,7 +853,7 @@ void func_80C12744(EnThiefbird* this) { this->collider.base.acFlags |= AC_ON; this->actor.flags |= ACTOR_FLAG_10; this->actionFunc = func_80C127F4; - this->actor.speedXZ = 4.0f; + this->actor.speed = 4.0f; this->skelAnime.playSpeed = 3.0f; } @@ -891,9 +891,9 @@ void func_80C127F4(EnThiefbird* this, PlayState* play) { temp_v0 = CLAMP(temp_v0, -0x3000, 0x3000); Math_SmoothStepToS(&this->actor.shape.rot.x, temp_v0, 4, 0x800, 0x80); temp_f0 = Actor_WorldDistXYZToPoint(&this->unk_3EC->actor, &this->limbPos[9]); - this->actor.speedXZ = (0.02f * temp_f0) + 2.0f; - this->actor.speedXZ = CLAMP_MAX(this->actor.speedXZ, 4.0f); - if ((this->unk_3EC->actor.speedXZ <= 0.0f) && (temp_f0 < 40.0f)) { + this->actor.speed = (0.02f * temp_f0) + 2.0f; + this->actor.speed = CLAMP_MAX(this->actor.speed, 4.0f); + if ((this->unk_3EC->actor.speed <= 0.0f) && (temp_f0 < 40.0f)) { s32 i; this->unk_3EC->unk152 = 0; @@ -908,7 +908,7 @@ void func_80C127F4(EnThiefbird* this, PlayState* play) { this->unk_190 = -0x3800; } } else { - this->actor.speedXZ = 4.0f; + this->actor.speed = 4.0f; if (this->actor.bgCheckFlags & 8) { Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.wallYaw, 6, 0x1000, 0x100); } else { diff --git a/src/overlays/actors/ovl_En_Tite/z_en_tite.c b/src/overlays/actors/ovl_En_Tite/z_en_tite.c index 6d25e639ea..7c04554b63 100644 --- a/src/overlays/actors/ovl_En_Tite/z_en_tite.c +++ b/src/overlays/actors/ovl_En_Tite/z_en_tite.c @@ -287,7 +287,7 @@ void func_80893E54(EnTite* this, PlayState* play) { void func_80893ED4(EnTite* this) { Animation_MorphToLoop(&this->skelAnime, &object_tite_Anim_0012E4, 4.0f); this->unk_2BC = Rand_S16Offset(15, 30); - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actionFunc = func_80893F30; } @@ -305,7 +305,7 @@ void func_80893F30(EnTite* this, PlayState* play) { void func_80893FD0(EnTite* this) { Animation_PlayOnce(&this->skelAnime, &object_tite_Anim_00083C); this->actor.velocity.y = 0.0f; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.world.rot.y = this->actor.shape.rot.y; this->actionFunc = func_80894024; } @@ -358,7 +358,7 @@ void func_8089408C(EnTite* this, PlayState* play) { this->actor.bgCheckFlags &= ~(0x40 | 0x20 | 0x2 | 0x1); this->actor.gravity = -1.0f; - this->actor.speedXZ = 4.0f; + this->actor.speed = 4.0f; this->actionFunc = func_808942B4; } @@ -366,7 +366,7 @@ void func_808942B4(EnTite* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); if (((this->actor.bgCheckFlags & 1) || (func_80893ADC(this) && (this->actor.depthInWater > 0.0f))) && (this->actor.velocity.y <= 0.0f)) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->collider.base.atFlags &= ~AT_HIT; if (!func_80893ADC(this)) { func_80893BCC(this, play); @@ -430,7 +430,7 @@ void func_808945B4(EnTite* this, PlayState* play) { void func_808945EC(EnTite* this) { Animation_PlayLoop(&this->skelAnime, &object_tite_Anim_000A14); - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.velocity.y = 0.0f; this->actionFunc = func_80894638; } @@ -480,7 +480,7 @@ void func_8089484C(EnTite* this) { } this->actor.velocity.y = 9.5f; this->actor.gravity = -1.0f; - this->actor.speedXZ = 4.0f; + this->actor.speed = 4.0f; if (func_80893ADC(this)) { this->actor.world.pos.y += this->actor.depthInWater; Actor_PlaySfx(&this->actor, NA_SE_EN_TEKU_JUMP_WATER); @@ -493,7 +493,7 @@ void func_8089484C(EnTite* this) { void func_80894910(EnTite* this, PlayState* play) { Vec3f sp34; - Math_SmoothStepToF(&this->actor.speedXZ, 0.0f, 0.1f, 1.0f, 0.0f); + Math_SmoothStepToF(&this->actor.speed, 0.0f, 0.1f, 1.0f, 0.0f); SkelAnime_Update(&this->skelAnime); if (this->actor.bgCheckFlags & 0x40) { Actor_PlaySfx(&this->actor, NA_SE_EN_TEKU_LAND_WATER); @@ -510,7 +510,7 @@ void func_80894910(EnTite* this, PlayState* play) { if (((this->actor.bgCheckFlags & 1) || (func_80893ADC(this) && (this->actor.depthInWater > 0.0f))) && (this->actor.velocity.y <= 0.0f)) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; Math_ScaledStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 4000); this->actor.world.rot.y = this->actor.shape.rot.y; @@ -536,7 +536,7 @@ void func_80894910(EnTite* this, PlayState* play) { void func_80894B2C(EnTite* this) { Animation_MorphToLoop(&this->skelAnime, &object_tite_Anim_0012E4, 4.0f); - this->actor.speedXZ = -6.0f; + this->actor.speed = -6.0f; this->actor.gravity = -1.0f; if (this->collider.base.ac != NULL) { func_800BE568(&this->actor, &this->collider); @@ -548,7 +548,7 @@ void func_80894B2C(EnTite* this) { } void func_80894BC8(EnTite* this, PlayState* play) { - Math_SmoothStepToF(&this->actor.speedXZ, 0.0f, 1.0f, 0.5f, 0.0f); + Math_SmoothStepToF(&this->actor.speed, 0.0f, 1.0f, 0.5f, 0.0f); SkelAnime_Update(&this->skelAnime); if (func_80893ADC(this) && (this->actor.velocity.y <= 0.0f)) { this->actor.gravity = 0.0f; @@ -562,7 +562,7 @@ void func_80894BC8(EnTite* this, PlayState* play) { func_80893BCC(this, play); } - if ((this->actor.speedXZ == 0.0f) && ((this->actor.bgCheckFlags & 1) || func_80893ADC(this))) { + if ((this->actor.speed == 0.0f) && ((this->actor.bgCheckFlags & 1) || func_80893ADC(this))) { this->actor.world.rot.y = this->actor.shape.rot.y; this->collider.base.acFlags |= AC_ON; if ((Player_GetMask(play) == PLAYER_MASK_STONE) || @@ -579,7 +579,7 @@ void func_80894BC8(EnTite* this, PlayState* play) { } void func_80894DD0(EnTite* this) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; if (this->actor.velocity.y > 0.0f) { this->actor.velocity.y = 0.0f; } @@ -629,7 +629,7 @@ void func_80895020(EnTite* this, PlayState* play) { f32 temp_f0; Vec3f* ptr; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->collider.base.acFlags &= ~AC_ON; this->actor.colorFilterTimer = 0; SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 40, NA_SE_EN_TEKU_DEAD); @@ -640,7 +640,7 @@ void func_80895020(EnTite* this, PlayState* play) { this->unk_2BC = 25; this->actor.gravity = -0.58f; this->actor.velocity.y = 0.0f; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; ptr = &this->unk_33C[0]; for (i = 0; i < ARRAY_COUNT(this->limbPos); i++, ptr++) { @@ -685,7 +685,7 @@ void func_808952EC(EnTite* this) { func_80893A18(this); this->unk_2B9 = 1; this->unk_2BC = 400; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.gravity = -1.0f; this->unk_2B8 = Rand_ZeroOne() * 50.0f; this->actor.bgCheckFlags &= ~1; @@ -770,7 +770,7 @@ void func_80895738(EnTite* this, PlayState* play) { } if (this->unk_2BC == -1) { - Math_StepToF(&this->actor.speedXZ, 0.0f, 0.3f); + Math_StepToF(&this->actor.speed, 0.0f, 0.3f); if (this->actor.bgCheckFlags & 1) { this->actor.world.rot.y = this->actor.shape.rot.y; func_80893ED4(this); @@ -778,13 +778,13 @@ void func_80895738(EnTite* this, PlayState* play) { } } else if (this->unk_2BC > 0) { this->unk_2BC--; - Math_StepToF(&this->actor.speedXZ, 10.0f, 0.3f); + Math_StepToF(&this->actor.speed, 10.0f, 0.3f); this->actor.flags |= ACTOR_FLAG_1000000; CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base); if (!func_80893A34(this, play)) { this->unk_2BC = 0; } - } else if ((this->unk_2BC == 0) && Math_StepToF(&this->actor.speedXZ, 0.0f, 0.3f)) { + } else if ((this->unk_2BC == 0) && Math_StepToF(&this->actor.speed, 0.0f, 0.3f)) { this->actor.world.rot.y = this->actor.shape.rot.y; func_80893A18(this); if ((Player_GetMask(play) == PLAYER_MASK_STONE) || (this->actor.xzDistToPlayer > 450.0f) || @@ -796,7 +796,7 @@ void func_80895738(EnTite* this, PlayState* play) { func_80893A9C(this, play); } } - this->actor.shape.rot.y += (s16)(this->actor.speedXZ * 768.0f); + this->actor.shape.rot.y += (s16)(this->actor.speed * 768.0f); } void func_8089595C(EnTite* this, PlayState* play) { @@ -813,7 +813,7 @@ void func_80895A10(EnTite* this) { s16 rand; Animation_Change(&this->skelAnime, &object_tite_Anim_000A14, 2.0f, 0.0f, 0.0f, ANIMMODE_LOOP, 4.0f); - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; rand = Rand_S16Offset(20, 20); this->unk_2BC = ((Rand_ZeroOne() < 0.5f) ? -1 : 1) * rand; this->actionFunc = func_80895AC0; @@ -862,7 +862,7 @@ void func_80895AC0(EnTite* this, PlayState* play) { void func_80895CB0(EnTite* this) { this->skelAnime.playSpeed = 1.0f; - this->actor.speedXZ = 1.0f; + this->actor.speed = 1.0f; this->actor.world.rot.y = this->actor.shape.rot.y; this->unk_2BC = Rand_S16Offset(20, 20); this->actionFunc = func_80895D08; @@ -890,7 +890,7 @@ void func_80895DE8(EnTite* this) { this->collider.base.acFlags &= ~AC_ON; this->actor.shape.shadowDraw = ActorShadow_DrawCircle; this->skelAnime.playSpeed = 1.0f; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actionFunc = func_80895E28; } diff --git a/src/overlays/actors/ovl_En_Tk/z_en_tk.c b/src/overlays/actors/ovl_En_Tk/z_en_tk.c index d73045928a..57ad2b8fc1 100644 --- a/src/overlays/actors/ovl_En_Tk/z_en_tk.c +++ b/src/overlays/actors/ovl_En_Tk/z_en_tk.c @@ -299,7 +299,7 @@ void func_80AECA90(EnTk* this, PlayState* play) { } void func_80AECB0C(EnTk* this, PlayState* play) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->unk_3CC = 0xFF; this->unk_2DC = 0.0f; SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, D_80AEF868, 0, &this->unk_2D4); @@ -631,7 +631,7 @@ void func_80AED610(EnTk* this, PlayState* play) { void func_80AED898(EnTk* this, PlayState* play) { this->unk_316 = 0; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; if (this->unk_2CA & 0x1000) { if ((this->unk_2D4 == 4) && Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) { SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, D_80AEF868, 7, &this->unk_2D4); @@ -706,7 +706,7 @@ void func_80AED940(EnTk* this, PlayState* play) { void func_80AEDBEC(EnTk* this, PlayState* play) { this->actor.params = -1; this->unk_2E8 = 0; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, D_80AEF868, 2, &this->unk_2D4); this->actionFunc = func_80AEDC4C; } @@ -721,7 +721,7 @@ void func_80AEDC4C(EnTk* this, PlayState* play) { } void func_80AEDCBC(EnTk* this, PlayState* play) { - this->actor.speedXZ = 10.0f; + this->actor.speed = 10.0f; SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, D_80AEF868, 5, &this->unk_2D4); Math_Vec3f_Copy(&this->actor.world.pos, &this->unk_2EC); Math_Vec3f_Copy(&this->actor.prevPos, &this->unk_2EC); @@ -740,7 +740,7 @@ void func_80AEDD4C(EnTk* this, PlayState* play) { } void func_80AEDDA0(EnTk* this, PlayState* play) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, D_80AEF868, 2, &this->unk_2D4); this->actor.flags |= ACTOR_FLAG_10000; this->unk_2CA |= 0x80; @@ -1183,10 +1183,10 @@ void func_80AEED38(EnTk* this, PlayState* play) { SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, D_80AEF868, 2, &this->unk_2D4); } else { SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, D_80AEF868, 1, &this->unk_2D4); - func_80AEC658(&this->skelAnime, this->unk_320, 1.0f, &this->actor.speedXZ, &sp64); + func_80AEC658(&this->skelAnime, this->unk_320, 1.0f, &this->actor.speed, &sp64); } - if (this->actor.speedXZ > 0.5f) { + if (this->actor.speed > 0.5f) { Math_SmoothStepToS(&this->actor.world.rot.y, this->unk_2CC, 2, 0xAAA, 1); this->actor.shape.rot.y = this->actor.world.rot.y; } @@ -1210,17 +1210,17 @@ void func_80AEF094(EnTk* this, PlayState* play) { SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, D_80AEF868, 2, &this->unk_2D4); } else { SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, D_80AEF868, 1, &this->unk_2D4); - func_80AEC658(&this->skelAnime, this->unk_320, 1.0f, &this->actor.speedXZ, &sp2C); + func_80AEC658(&this->skelAnime, this->unk_320, 1.0f, &this->actor.speed, &sp2C); } - if (this->actor.speedXZ >= 0.5f) { + if (this->actor.speed >= 0.5f) { Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 2, 0x38E, 1); this->actor.shape.rot.y = this->actor.world.rot.y; } } void func_80AEF15C(EnTk* this, PlayState* play) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, D_80AEF868, 2, &this->unk_2D4); this->unk_30C = func_80AEF1B4; } @@ -1237,7 +1237,7 @@ void func_80AEF210(EnTk* this, PlayState* play) { } void func_80AEF220(EnTk* this, PlayState* play) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, D_80AEF868, 2, &this->unk_2D4); this->unk_30C = func_80AEF278; } diff --git a/src/overlays/actors/ovl_En_Trt2/z_en_trt2.c b/src/overlays/actors/ovl_En_Trt2/z_en_trt2.c index bad027d349..4693183de2 100644 --- a/src/overlays/actors/ovl_En_Trt2/z_en_trt2.c +++ b/src/overlays/actors/ovl_En_Trt2/z_en_trt2.c @@ -176,7 +176,7 @@ void func_80AD3530(EnTrt2* this, PlayState* play) { this->unk_1E4++; } } - Math_ApproachF(&this->actor.speedXZ, 1.5f, 0.2f, 1.0f); + Math_ApproachF(&this->actor.speed, 1.5f, 0.2f, 1.0f); } Actor_MoveWithGravity(&this->actor); @@ -277,7 +277,7 @@ void func_80AD38B8(EnTrt2* this, PlayState* play) { sp30.y = this->actor.wallYaw; } } - Math_ApproachF(&this->actor.speedXZ, 5.0f, 0.2f, 1.0f); + Math_ApproachF(&this->actor.speed, 5.0f, 0.2f, 1.0f); } Actor_MoveWithoutGravity(&this->actor); @@ -286,8 +286,8 @@ void func_80AD38B8(EnTrt2* this, PlayState* play) { void func_80AD3A24(EnTrt2* this, PlayState* play) { func_80AD46F8(this); - if (this->actor.speedXZ > 0.05f) { - Math_ApproachF(&this->actor.speedXZ, 0.0f, 0.2f, 1.0f); + if (this->actor.speed > 0.05f) { + Math_ApproachF(&this->actor.speed, 0.0f, 0.2f, 1.0f); } else if (DECR(this->unk_3AE) == 0) { this->unk_3AE = Rand_S16Offset(100, 50); EnTrt2_ChangeAnim(&this->skelAnime, sAnimationInfo, TRT2_ANIM_HOVER); @@ -663,7 +663,7 @@ s32 func_80AD4B4C(EnTrt2* this, PlayState* play) { if (Actor_ProcessTalkRequest(&this->actor, &play->state)) { sp24 = true; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; func_80AD349C(this); this->unk_3B4 = this->unk_3B2; if (this->actor.bgCheckFlags & 1) { @@ -702,7 +702,7 @@ s32 func_80AD4CCC(EnTrt2* this, PlayState* play) { if (((this->unk_3B2 == 4) || (this->unk_3B2 == 5)) && this->actor.isTargeted && !(this->actor.bgCheckFlags & 1) && ((player->transformation == PLAYER_FORM_HUMAN) || (player->transformation == PLAYER_FORM_FIERCE_DEITY))) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.velocity.y = 1.5f; this->unk_3B2 = 16; return true; diff --git a/src/overlays/actors/ovl_En_Tru/z_en_tru.c b/src/overlays/actors/ovl_En_Tru/z_en_tru.c index f9654349e2..24ce7fdaa5 100644 --- a/src/overlays/actors/ovl_En_Tru/z_en_tru.c +++ b/src/overlays/actors/ovl_En_Tru/z_en_tru.c @@ -736,7 +736,7 @@ s32 func_80A87400(EnTru* this, PlayState* play) { this->unk_360 = CLAMP(this->unk_360 + 2000, 0, 0x4000); Math_ApproachF(&this->unk_35C, 30.0f, 0.08f, 1000.0f); - Math_ApproachF(&this->actor.speedXZ, 30.0f, 0.2f, 1000.0f); + Math_ApproachF(&this->actor.speed, 30.0f, 0.2f, 1000.0f); if (this->path != NULL) { sp4C = Lib_SegmentedToVirtual(this->path->points); diff --git a/src/overlays/actors/ovl_En_Tru_Mt/z_en_tru_mt.c b/src/overlays/actors/ovl_En_Tru_Mt/z_en_tru_mt.c index 504fffffaf..8a680277df 100644 --- a/src/overlays/actors/ovl_En_Tru_Mt/z_en_tru_mt.c +++ b/src/overlays/actors/ovl_En_Tru_Mt/z_en_tru_mt.c @@ -247,13 +247,13 @@ void func_80B76440(EnTruMt* this, PlayState* play) { s16 temp_v1 = this->unk_394 - Math_Vec3f_Yaw(&this->unk_398, &this->actor.world.pos); if ((temp_v1 <= -0x2000) || (temp_v1 >= 0x2000)) { - Math_ApproachF(&this->actor.speedXZ, 7.0f, 0.2f, 1.0f); + Math_ApproachF(&this->actor.speed, 7.0f, 0.2f, 1.0f); } else if (this->actor.xzDistToPlayer < 300.0f) { - Math_ApproachF(&this->actor.speedXZ, 7.0f, 0.2f, 1.0f); + Math_ApproachF(&this->actor.speed, 7.0f, 0.2f, 1.0f); } else if (this->actor.xzDistToPlayer > 500.0f) { - Math_ApproachF(&this->actor.speedXZ, 2.5f, 0.2f, 1.0f); + Math_ApproachF(&this->actor.speed, 2.5f, 0.2f, 1.0f); } else { - Math_ApproachF(&this->actor.speedXZ, 4.0f, 0.2f, 1.0f); + Math_ApproachF(&this->actor.speed, 4.0f, 0.2f, 1.0f); } } } @@ -347,7 +347,7 @@ void func_80B76980(EnTruMt* this, PlayState* play) { SET_EVENTINF(EVENTINF_36); SET_EVENTINF(EVENTINF_40); player->stateFlags3 &= ~PLAYER_STATE3_400; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actionFunc = func_80B76BB8; } else if (CHECK_EVENTINF(EVENTINF_40)) { u32 score = gSaveContext.minigameScore; @@ -381,7 +381,7 @@ void func_80B76A64(EnTruMt* this, PlayState* play) { if (func_80B76600(this, this->path, this->unk_36C)) { if (this->unk_36C >= (this->path->count - 1)) { this->actionFunc = func_80B76C38; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; return; } this->unk_36C++; diff --git a/src/overlays/actors/ovl_En_Tubo_Trap/z_en_tubo_trap.c b/src/overlays/actors/ovl_En_Tubo_Trap/z_en_tubo_trap.c index c14e478d62..8ed93d9659 100644 --- a/src/overlays/actors/ovl_En_Tubo_Trap/z_en_tubo_trap.c +++ b/src/overlays/actors/ovl_En_Tubo_Trap/z_en_tubo_trap.c @@ -257,7 +257,7 @@ void EnTuboTrap_Levitate(EnTuboTrap* this, PlayState* play) { Math_ApproachF(&this->actor.world.pos.y, this->targetHeight, 0.8f, 3.0f); if (fabsf(this->actor.world.pos.y - this->targetHeight) < 10.0f) { - this->actor.speedXZ = 10.0f; + this->actor.speed = 10.0f; this->actor.world.rot.y = this->actor.yawTowardsPlayer; this->actionFunc = EnTuboTrap_FlyAtPlayer; } diff --git a/src/overlays/actors/ovl_En_Vm/z_en_vm.c b/src/overlays/actors/ovl_En_Vm/z_en_vm.c index e5479a1d7d..d70d2c43a9 100644 --- a/src/overlays/actors/ovl_En_Vm/z_en_vm.c +++ b/src/overlays/actors/ovl_En_Vm/z_en_vm.c @@ -376,7 +376,7 @@ void func_808CCBE4(EnVm* this, PlayState* play) { this->actor.world.pos.y = this->actor.focus.pos.y; this->actor.velocity.y = 8.0f; this->actor.gravity = -0.5f; - this->actor.speedXZ = Rand_ZeroOne() + 1.0f; + this->actor.speed = Rand_ZeroOne() + 1.0f; this->unk_210 = 0; this->actor.flags |= ACTOR_FLAG_10; this->actionFunc = func_808CCCF0; diff --git a/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c b/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c index 910c03cc44..38eb630a37 100644 --- a/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c +++ b/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c @@ -324,7 +324,7 @@ void EnWallmas_Stand(EnWallmas* this, PlayState* play) { void EnWallmas_SetupWalk(EnWallmas* this) { Animation_PlayOnceSetSpeed(&this->skelAnime, &gWallmasterWalkAnim, 3.0f); - this->actor.speedXZ = 3.0f; + this->actor.speed = 3.0f; this->actionFunc = EnWallmas_Walk; } @@ -343,7 +343,7 @@ void EnWallmas_Walk(EnWallmas* this, PlayState* play) { void EnWallmas_SetupJumpToCeiling(EnWallmas* this) { Animation_PlayOnce(&this->skelAnime, &gWallmasterStopWalkAnim); - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actionFunc = EnWallmas_JumpToCeiling; } @@ -355,7 +355,7 @@ void EnWallmas_JumpToCeiling(EnWallmas* this, PlayState* play) { void EnWallmas_SetupReturnToCeiling(EnWallmas* this) { this->timer = 0; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; Animation_Change(&this->skelAnime, &gWallmasterJumpAnim, 3.0f, 0.0f, Animation_GetLastFrame(&gWallmasterJumpAnim), ANIMMODE_ONCE, -3.0f); this->actionFunc = EnWallmas_ReturnToCeiling; @@ -398,7 +398,7 @@ void EnWallmas_SetupDamage(EnWallmas* this, s32 arg1) { } Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 20); - this->actor.speedXZ = 5.0f; + this->actor.speed = 5.0f; this->actor.velocity.y = 10.0f; this->actionFunc = EnWallmas_Damage; } @@ -416,12 +416,12 @@ void EnWallmas_Damage(EnWallmas* this, PlayState* play) { Actor_PlaySfx(&this->actor, NA_SE_EN_EYEGOLE_ATTACK); } - Math_StepToF(&this->actor.speedXZ, 0.0f, 0.2f); + Math_StepToF(&this->actor.speed, 0.0f, 0.2f); } void EnWallmas_SetupCooldown(EnWallmas* this) { Animation_PlayOnce(&this->skelAnime, &gWallmasterRecoverFromDamageAnim); - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.velocity.y = 0.0f; this->actor.world.rot.y = this->actor.shape.rot.y; this->actionFunc = EnWallmas_Cooldown; @@ -434,7 +434,7 @@ void EnWallmas_Cooldown(EnWallmas* this, PlayState* play) { } void EnWallmas_SetupDie(EnWallmas* this, PlayState* play) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.velocity.y = 0.0f; func_800B3030(play, &this->actor.world.pos, &gZeroVec3f, &gZeroVec3f, 250, -10, 2); SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 11, NA_SE_EN_EXTINCT); @@ -456,7 +456,7 @@ void EnWallmas_SetupTakePlayer(EnWallmas* this, PlayState* play) { Animation_MorphToPlayOnce(&this->skelAnime, &gWallmasterHoverAnim, -5.0f); this->timer = -30; this->actionFunc = EnWallmas_TakePlayer; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.velocity.y = 0.0f; this->yTarget = this->actor.playerHeightRel; func_800B724C(play, &this->actor, PLAYER_CSMODE_18); @@ -530,7 +530,7 @@ void EnWallmas_WaitForSwitchFlag(EnWallmas* this, PlayState* play) { } void EnWallmas_SetupStun(EnWallmas* this) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; if (this->actor.velocity.y > 0.0f) { this->actor.velocity.y = 0.0f; } diff --git a/src/overlays/actors/ovl_En_Wf/z_en_wf.c b/src/overlays/actors/ovl_En_Wf/z_en_wf.c index 021212ebaa..f647f570fa 100644 --- a/src/overlays/actors/ovl_En_Wf/z_en_wf.c +++ b/src/overlays/actors/ovl_En_Wf/z_en_wf.c @@ -571,7 +571,7 @@ void func_80991040(EnWf* this, PlayState* play) { void func_809910F0(EnWf* this) { this->collider2.base.acFlags &= ~AC_ON; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; Animation_Change(&this->skelAnime, &gWolfosRearUpFallOverAnim, 0.5f, 0.0f, 7.0f, ANIMMODE_ONCE_INTERP, -5.0f); this->unk_2A0 = 5; this->actionFunc = func_80991174; @@ -595,7 +595,7 @@ void func_80991200(EnWf* this) { this->unk_2A0 = (s32)Rand_ZeroFloat(10.0f) + 2; this->actor.world.rot.y = this->actor.shape.rot.y; this->actionFunc = func_80991280; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } void func_80991280(EnWf* this, PlayState* play) { @@ -644,7 +644,7 @@ void func_80991438(EnWf* this) { this->collider2.base.acFlags |= AC_ON; Animation_MorphToLoop(&this->skelAnime, &gWolfosRunAnim, -4.0f); this->actor.world.rot.y = this->actor.shape.rot.y; - this->actor.speedXZ = 8.0f; + this->actor.speed = 8.0f; this->actionFunc = func_8099149C; } @@ -761,7 +761,7 @@ void func_80991948(EnWf* this) { } else { this->unk_29A = -16000; } - this->actor.speedXZ = 6.0f; + this->actor.speed = 6.0f; this->actor.world.rot.y = this->actor.shape.rot.y; this->unk_2A0 = (s32)Rand_ZeroFloat(30.0f) + 30; this->actionFunc = func_809919F4; @@ -814,7 +814,7 @@ void func_80991C04(EnWf* this) { this->actor.shape.rot.y = this->actor.yawTowardsPlayer; this->unk_2A0 = 7; this->skelAnime.endFrame = 20.0f; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actionFunc = func_80991C80; } @@ -827,7 +827,7 @@ void func_80991C80(EnWf* this, PlayState* play) { sp2A = BINANG_SUB(player->actor.shape.rot.y, this->actor.shape.rot.y); sp30 = ABS_ALT(BINANG_SUB(this->actor.yawTowardsPlayer, this->actor.shape.rot.y)); - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; if (((this->skelAnime.curFrame >= 9.0f) && (this->skelAnime.curFrame < 13.0f)) || ((this->skelAnime.curFrame >= 17.0f) && (this->skelAnime.curFrame < 20.0f))) { if (!(this->collider1.base.atFlags & AT_ON)) { @@ -925,7 +925,7 @@ void func_8099223C(EnWf* this) { this->collider2.base.acFlags &= ~AC_ON; Animation_MorphToPlayOnce(&this->skelAnime, &gWolfosBackflipAnim, -3.0f); this->unk_2A0 = 0; - this->actor.speedXZ = -6.0f; + this->actor.speed = -6.0f; this->actor.shape.rot.y = this->actor.yawTowardsPlayer; this->actor.world.rot.y = this->actor.yawTowardsPlayer; Actor_PlaySfx(&this->actor, NA_SE_EN_TEKU_JUMP); @@ -949,7 +949,7 @@ void func_809922B4(EnWf* this, PlayState* play) { } void func_809923B0(EnWf* this) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; if (this->actor.velocity.y > 0.0f) { this->actor.velocity.y = 0.0f; } @@ -975,7 +975,7 @@ void func_8099245C(EnWf* this) { this->collider2.base.acFlags &= ~AC_ON; Animation_MorphToPlayOnce(&this->skelAnime, &gWolfosDamagedAnim, -4.0f); if (this->actor.bgCheckFlags & 1) { - this->actor.speedXZ = -4.0f; + this->actor.speed = -4.0f; } this->unk_298 = 0; this->actor.world.rot.y = this->actor.yawTowardsPlayer; @@ -987,11 +987,11 @@ void func_809924EC(EnWf* this, PlayState* play) { s16 sp26; if (this->actor.bgCheckFlags & 2) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } - if ((this->actor.bgCheckFlags & 1) && (this->actor.speedXZ < 0.0f)) { - this->actor.speedXZ += 0.05f; + if ((this->actor.bgCheckFlags & 1) && (this->actor.speed < 0.0f)) { + this->actor.speed += 0.05f; } Math_ScaledStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 3000); @@ -1024,7 +1024,7 @@ void func_809926D0(EnWf* this) { Animation_Change(&this->skelAnime, &gWolfosBackflipAnim, -1.0f, Animation_GetLastFrame(&gWolfosBackflipAnim.common), 0.0f, ANIMMODE_ONCE, -3.0f); this->unk_2A0 = 0; - this->actor.speedXZ = 6.5f; + this->actor.speed = 6.5f; this->actor.velocity.y = 15.0f; Actor_PlaySfx(&this->actor, NA_SE_EN_TEKU_JUMP); this->actor.world.rot.y = this->actor.shape.rot.y; @@ -1038,7 +1038,7 @@ void func_80992784(EnWf* this, PlayState* play) { this->actor.world.rot.y = this->actor.yawTowardsPlayer; this->actor.shape.rot.y = this->actor.yawTowardsPlayer; this->actor.velocity.y = 0.0f; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.world.pos.y = this->actor.floorHeight; if (!Actor_OtherIsTargeted(play, &this->actor)) { func_80991C04(this); @@ -1052,7 +1052,7 @@ void func_8099282C(EnWf* this) { this->collider2.base.acFlags |= AC_ON; this->collider1.base.atFlags &= ~AT_ON; this->unk_2A0 = 10; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; Animation_Change(&this->skelAnime, &gWolfosBlockAnim, -1.0f, Animation_GetLastFrame(&gWolfosBlockAnim.common), 0.0f, ANIMMODE_ONCE, -2.0f); this->actionFunc = func_809928CC; @@ -1103,7 +1103,7 @@ void func_80992A74(EnWf* this, PlayState* play) { } else { this->unk_29A = -16000; } - this->actor.speedXZ = 6.0f; + this->actor.speed = 6.0f; this->actor.world.rot.y = this->actor.shape.rot.y; this->unk_2A0 = (s32)Rand_ZeroFloat(10.0f) + 5; this->actionFunc = func_80992B8C; @@ -1156,7 +1156,7 @@ void func_80992D6C(EnWf* this) { Animation_MorphToPlayOnce(&this->skelAnime, &gWolfosRearUpFallOverAnim, -4.0f); this->actor.world.rot.y = this->actor.yawTowardsPlayer; if (this->actor.bgCheckFlags & 1) { - this->actor.speedXZ = -6.0f; + this->actor.speed = -6.0f; } this->actor.flags &= ~ACTOR_FLAG_1; this->unk_2A0 = 25; @@ -1168,11 +1168,11 @@ void func_80992E0C(EnWf* this, PlayState* play) { static Vec3f D_809942F0 = { 0.0f, 0.5f, 0.0f }; if (this->actor.bgCheckFlags & 2) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } if (this->actor.bgCheckFlags & 1) { - Math_StepToF(&this->actor.speedXZ, 0.0f, 0.5f); + Math_StepToF(&this->actor.speed, 0.0f, 0.5f); } if (SkelAnime_Update(&this->skelAnime)) { @@ -1233,7 +1233,7 @@ void func_80993018(EnWf* this, PlayState* play) { void func_80993148(EnWf* this) { Animation_MorphToLoop(&this->skelAnime, &gWolfosRunAnim, -4.0f); - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actionFunc = func_80993194; } @@ -1318,7 +1318,7 @@ void func_809933A0(EnWf* this, PlayState* play) { void func_80993524(EnWf* this) { Animation_MorphToLoop(&this->skelAnime, &gWolfosRunAnim, -4.0f); - this->actor.speedXZ = 6.0f; + this->actor.speed = 6.0f; this->actor.world.rot.y = this->actor.shape.rot.y; this->actionFunc = func_8099357C; } diff --git a/src/overlays/actors/ovl_En_Wood02/z_en_wood02.c b/src/overlays/actors/ovl_En_Wood02/z_en_wood02.c index 5b207816ba..ccf5a374f4 100644 --- a/src/overlays/actors/ovl_En_Wood02/z_en_wood02.c +++ b/src/overlays/actors/ovl_En_Wood02/z_en_wood02.c @@ -436,7 +436,7 @@ void EnWood02_Update(Actor* thisx, PlayState* play2) { if ((this->unk_146 >= -1) && (((player->rideActor == NULL) && (sqrtf(thisx->xyzDistToPlayerSq) < 20.0f) && (player->linearVelocity != 0.0f)) || ((player->rideActor != NULL) && (sqrtf(thisx->xyzDistToPlayerSq) < 60.0f) && - (player->rideActor->speedXZ != 0.0f)))) { + (player->rideActor->speed != 0.0f)))) { func_808C4458(this, play, &thisx->world.pos, 1); this->unk_146 = -0x15; Actor_PlaySfx(thisx, NA_SE_EV_TREE_SWING); diff --git a/src/overlays/actors/ovl_En_Zo/z_en_zo.c b/src/overlays/actors/ovl_En_Zo/z_en_zo.c index 06591b3cd3..8c1c9d4937 100644 --- a/src/overlays/actors/ovl_En_Zo/z_en_zo.c +++ b/src/overlays/actors/ovl_En_Zo/z_en_zo.c @@ -220,8 +220,8 @@ void EnZo_FollowPath(EnZo* this, PlayState* play) { s16 speed; Vec3f pos; - Math_SmoothStepToF(&this->actor.speedXZ, 1.0f, 0.4f, 1000.0f, 0.0f); - speed = this->actor.speedXZ * 400.0f; + Math_SmoothStepToF(&this->actor.speed, 1.0f, 0.4f, 1000.0f, 0.0f); + speed = this->actor.speed * 400.0f; if (SubS_CopyPointFromPath(this->path, this->waypoint, &pos) && SubS_MoveActorToPoint(&this->actor, &pos, speed)) { this->waypoint++; if (this->waypoint >= this->path->count) { @@ -233,7 +233,7 @@ void EnZo_FollowPath(EnZo* this, PlayState* play) { EnZo_ChangeAnim(&this->skelAnime, 1); this->actionFunc = EnZo_TreadWater; this->actor.gravity = 0.0f; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } } diff --git a/src/overlays/actors/ovl_En_Zog/z_en_zog.c b/src/overlays/actors/ovl_En_Zog/z_en_zog.c index d2de680676..81d5583058 100644 --- a/src/overlays/actors/ovl_En_Zog/z_en_zog.c +++ b/src/overlays/actors/ovl_En_Zog/z_en_zog.c @@ -173,7 +173,7 @@ void func_80B93468(EnZog* this, PlayState* play) { this->actor.world.pos.x = points[-1].x; this->actor.world.pos.z = points[-1].z; this->actor.world.rot.y = Math_Atan2S(points->x - this->actor.world.pos.x, points->z - this->actor.world.pos.z); - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } } @@ -762,9 +762,9 @@ void func_80B94A00(EnZog* this, PlayState* play) { if ((this->skelAnime.curFrame >= 35.0f) || ((this->skelAnime.curFrame >= 10.0f) && (this->skelAnime.curFrame <= 24.0f))) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } else { - this->actor.speedXZ = 1.5f; + this->actor.speed = 1.5f; } if ((this->actor.depthInWater > 0.0f) && ((play->gameplayFrames % 8) == 0)) { @@ -795,7 +795,7 @@ void func_80B94A00(EnZog* this, PlayState* play) { } void func_80B94C5C(EnZog* this, PlayState* play) { - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; if (this->unk_304 != 0) { if (this->actor.shape.yOffset > 0.0f) { this->actor.shape.yOffset -= 20.0f; @@ -818,7 +818,7 @@ void func_80B94C5C(EnZog* this, PlayState* play) { void func_80B94D0C(EnZog* this, PlayState* play) { func_80B93D2C(this, play); - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; if (this->unk_320 > 0) { this->unk_320--; this->unk_31C = 1; @@ -857,10 +857,10 @@ void func_80B94E34(EnZog* this, PlayState* play) { func_80B93D2C(this, play); func_80B93BE0(this, play); - if (this->actor.speedXZ < 0.1f) { - this->actor.speedXZ = 0.0f; + if (this->actor.speed < 0.1f) { + this->actor.speed = 0.0f; } else { - if (this->actor.speedXZ > 0.1f) { + if (this->actor.speed > 0.1f) { WaterBox* sp44; Vec3f sp38; @@ -871,15 +871,15 @@ void func_80B94E34(EnZog* this, PlayState* play) { if (WaterBox_GetSurface1(play, &play->colCtx, sp38.x, sp38.z, &sp38.y, &sp44) && (this->actor.world.pos.y < sp38.y)) { EffectSsGSplash_Spawn(play, &sp38, NULL, NULL, 1, - Rand_ZeroFloat(this->actor.speedXZ * 40.0f) + (this->actor.speedXZ * 60.0f)); + Rand_ZeroFloat(this->actor.speed * 40.0f) + (this->actor.speed * 60.0f)); } - if ((player->actor.speedXZ > 3.0f) && (this->unk_324 == 0)) { + if ((player->actor.speed > 3.0f) && (this->unk_324 == 0)) { this->unk_324 = 25; Player_PlaySfx(player, player->ageProperties->voiceSfxIdOffset + NA_SE_VO_LI_PUSH); } } - this->actor.speedXZ *= 0.3f; + this->actor.speed *= 0.3f; } if (ABS_ALT(this->actor.yawTowardsPlayer - this->actor.world.rot.y) > 0x5000) { @@ -892,12 +892,12 @@ void func_80B94E34(EnZog* this, PlayState* play) { if (Actor_ProcessTalkRequest(&this->actor, &play->state)) { this->actionFunc = func_80B94D0C; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->unk_300 = 2; } else if (this->actor.bgCheckFlags & 1) { this->actor.home.rot.z = 1; this->actionFunc = func_80B94C5C; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->unk_2FE = 1; this->actor.velocity.y = 0.0f; this->actor.terminalVelocity = 0.0f; @@ -922,7 +922,7 @@ void func_80B95128(EnZog* this, PlayState* play) { if (Actor_ProcessTalkRequest(&this->actor, &play->state)) { this->actionFunc = func_80B94D0C; this->unk_300 = 2; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; switch (CURRENT_DAY) { case 1: diff --git a/src/overlays/actors/ovl_En_Zot/z_en_zot.c b/src/overlays/actors/ovl_En_Zot/z_en_zot.c index 288424f7e4..8c45851901 100644 --- a/src/overlays/actors/ovl_En_Zot/z_en_zot.c +++ b/src/overlays/actors/ovl_En_Zot/z_en_zot.c @@ -299,7 +299,7 @@ s32 func_80B96E5C(EnZot* this) { temp_f14 = points->z - this->actor.world.pos.z; this->actor.world.rot.y = Math_Atan2S(temp_f12, temp_f14); Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.world.rot.y, 2, 2000, 200); - phi_f2 = SQ(this->actor.speedXZ) * SQ(3.0f); + phi_f2 = SQ(this->actor.speed) * SQ(3.0f); if (this->unk_2D4 == 0) { phi_f2 = SQ(20.0f); @@ -652,9 +652,9 @@ void func_80B979DC(EnZot* this, PlayState* play) { if (func_80B96E5C(this)) { this->actionFunc = func_80B97B5C; func_80B96BEC(this, 0, ANIMMODE_LOOP); - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } else { - this->actor.speedXZ = 1.5f; + this->actor.speed = 1.5f; } } @@ -737,10 +737,10 @@ void func_80B97CC8(EnZot* this, PlayState* play) { void func_80B97D6C(EnZot* this, PlayState* play) { if (func_80B96E5C(this)) { this->actionFunc = func_80B97CC8; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; func_80B96BEC(this, 0, ANIMMODE_LOOP); } else { - this->actor.speedXZ = 8.0f; + this->actor.speed = 8.0f; } if (Animation_OnFrame(&this->skelAnime, 0.0f) || Animation_OnFrame(&this->skelAnime, 5.0f)) { @@ -819,9 +819,9 @@ void func_80B980FC(EnZot* this, PlayState* play) { this->actor.home.rot.x--; } else if (func_80B96E5C(this)) { this->actionFunc = func_80B97100; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; } else { - this->actor.speedXZ = 8.0f; + this->actor.speed = 8.0f; if (this->unk_2F0 != 3) { func_80B96BEC(this, 3, ANIMMODE_LOOP); } @@ -1295,13 +1295,13 @@ void func_80B992C0(EnZot* this, PlayState* play) { if (Actor_ProcessTalkRequest(&this->actor, &play->state)) { this->actionFunc = func_80B991E4; func_80B99160(this, play); - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; func_80B96BEC(this, 0, ANIMMODE_LOOP); } else { if (Player_IsFacingActor(&this->actor, 0x3000, play) && (this->actor.xzDistToPlayer < 100.0f)) { func_800B8614(&this->actor, play, 120.0f); } - this->actor.speedXZ = 1.5f; + this->actor.speed = 1.5f; func_80B96FB0(this); } } diff --git a/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c b/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c index 349521b26e..5b577a53f3 100644 --- a/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c +++ b/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c @@ -235,15 +235,15 @@ void func_809372D0(ObjBean* this) { sp34 = Math3D_Vec3fMagnitude(&actor->velocity); temp_f2 = D_80938FF8[this->unk_1DE].x; temp_f12 = D_80938FF8[this->unk_1DE].z; - if (sp34 < (actor->speedXZ * 8.0f)) { + if (sp34 < (actor->speed * 8.0f)) { temp_f2 = ((temp_f2 - 2.0f) * 0.1f) + 2.0f; temp_f12 *= 0.4f; } - Math_StepToF(&actor->speedXZ, temp_f2, temp_f12); + Math_StepToF(&actor->speed, temp_f2, temp_f12); - if ((actor->speedXZ + 0.05f) < sp34) { - Math_Vec3f_Scale(&actor->velocity, actor->speedXZ / sp34); + if ((actor->speed + 0.05f) < sp34) { + Math_Vec3f_Scale(&actor->velocity, actor->speed / sp34); this->unk_1BC.x += actor->velocity.x; this->unk_1BC.y += actor->velocity.y; this->unk_1BC.z += actor->velocity.z; @@ -255,7 +255,7 @@ void func_809372D0(ObjBean* this) { } else { this->unk_1DC++; } - actor->speedXZ *= 0.5f; + actor->speed *= 0.5f; } } @@ -775,7 +775,7 @@ void func_80938874(ObjBean* this) { this->actionFunc = func_809388A8; this->dyna.actor.draw = func_80938E00; this->dyna.actor.flags |= ACTOR_FLAG_10; - this->dyna.actor.speedXZ = 0.0f; + this->dyna.actor.speed = 0.0f; } void func_809388A8(ObjBean* this, PlayState* play) { diff --git a/src/overlays/actors/ovl_Obj_Boat/z_obj_boat.c b/src/overlays/actors/ovl_Obj_Boat/z_obj_boat.c index e4b69cbd25..cc94527a0b 100644 --- a/src/overlays/actors/ovl_Obj_Boat/z_obj_boat.c +++ b/src/overlays/actors/ovl_Obj_Boat/z_obj_boat.c @@ -111,7 +111,7 @@ void ObjBoat_Update(Actor* thisx, PlayState* play) { } this->timer = 60; } - } else if (this->dyna.actor.speedXZ == 0.0f) { + } else if (this->dyna.actor.speed == 0.0f) { if (this->timer != 0) { this->timer--; } @@ -124,7 +124,7 @@ void ObjBoat_Update(Actor* thisx, PlayState* play) { if (this->curPointIndex == this->lastPointIndex) { if (OBJBOAT_GET_4000(thisx)) { this->curPointIndex = 0; - } else if (this->dyna.actor.speedXZ == 0.0f) { + } else if (this->dyna.actor.speed == 0.0f) { this->curPointIndex = 0; this->direction = -1; } @@ -135,11 +135,11 @@ void ObjBoat_Update(Actor* thisx, PlayState* play) { } if (player->csMode != PLAYER_CSMODE_26) { - Math_ScaledStepToS(&this->dyna.actor.shape.rot.y, yawTarget, (s32)(fabsf(this->dyna.actor.speedXZ) * 40.0f)); + Math_ScaledStepToS(&this->dyna.actor.shape.rot.y, yawTarget, (s32)(fabsf(this->dyna.actor.speed) * 40.0f)); this->dyna.actor.world.rot.y = this->dyna.actor.shape.rot.y; - Math_StepToF(&this->dyna.actor.speedXZ, speedTarget, 0.05f); + Math_StepToF(&this->dyna.actor.speed, speedTarget, 0.05f); Actor_MoveWithGravity(&this->dyna.actor); - if (this->dyna.actor.speedXZ != 0.0f) { + if (this->dyna.actor.speed != 0.0f) { func_800B9010(&this->dyna.actor, NA_SE_EV_PIRATE_SHIP - SFX_FLAG); } } @@ -166,7 +166,7 @@ void ObjBoat_UpdateCutscene(Actor* thisx, PlayState* play2) { this->maxPointIndex = path->count; this->points = Lib_SegmentedToVirtual(path->points); Math_Vec3s_ToVec3f(&this->dyna.actor.world.pos, this->points); - this->dyna.actor.speedXZ = actionIndex->urot.z * (45.0f / 0x2000); + this->dyna.actor.speed = actionIndex->urot.z * (45.0f / 0x2000); this->points++; this->curPointIndex = 1; } @@ -178,8 +178,8 @@ void ObjBoat_UpdateCutscene(Actor* thisx, PlayState* play2) { f32 distRemaining; Math_Vec3s_ToVec3f(&posTarget, this->points); - distRemaining = Math_Vec3f_StepTo(&this->dyna.actor.world.pos, &posTarget, this->dyna.actor.speedXZ); - if ((this->curPointIndex < this->maxPointIndex) && (distRemaining < this->dyna.actor.speedXZ)) { + distRemaining = Math_Vec3f_StepTo(&this->dyna.actor.world.pos, &posTarget, this->dyna.actor.speed); + if ((this->curPointIndex < this->maxPointIndex) && (distRemaining < this->dyna.actor.speed)) { this->points++; this->curPointIndex++; } diff --git a/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c b/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c index 6e0e7b6acb..24b4188975 100644 --- a/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c +++ b/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c @@ -303,10 +303,10 @@ void func_8098D99C(ObjComb* this, PlayState* play) { temp_v0->parent = &this->actor; if (this->actionFunc == func_8098DC60) { temp_v0->velocity.y = 8.0f; - temp_v0->speedXZ = 2.0f; + temp_v0->speed = 2.0f; } else { temp_v0->velocity.y = 10.0f; - temp_v0->speedXZ = 2.0f; + temp_v0->speed = 2.0f; } this->unk_1B6 = 1; play_sound(NA_SE_SY_TRE_BOX_APPEAR); @@ -431,7 +431,7 @@ void func_8098DE58(ObjComb* this) { this->unk_1B4 = 100; this->actor.terminalVelocity = -20.0f; this->actor.gravity = -1.5f; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actionFunc = func_8098DEA0; } diff --git a/src/overlays/actors/ovl_Obj_Danpeilift/z_obj_danpeilift.c b/src/overlays/actors/ovl_Obj_Danpeilift/z_obj_danpeilift.c index 9daa20badb..1a9f62edec 100644 --- a/src/overlays/actors/ovl_Obj_Danpeilift/z_obj_danpeilift.c +++ b/src/overlays/actors/ovl_Obj_Danpeilift/z_obj_danpeilift.c @@ -107,15 +107,15 @@ void ObjDanpeilift_Move(ObjDanpeilift* this, PlayState* play) { step = this->speed * 0.16f; } - Math_StepToF(&thisx->speedXZ, target, step); - if ((thisx->speedXZ + 0.05f) < speed) { - Math_Vec3f_Scale(&thisx->velocity, thisx->speedXZ / speed); + Math_StepToF(&thisx->speed, target, step); + if ((thisx->speed + 0.05f) < speed) { + Math_Vec3f_Scale(&thisx->velocity, thisx->speed / speed); thisx->world.pos.x += thisx->velocity.x; thisx->world.pos.y += thisx->velocity.y; thisx->world.pos.z += thisx->velocity.z; } else { this->curPoint += this->direction; - thisx->speedXZ *= 0.4f; + thisx->speed *= 0.4f; isTeleporting = OBJDANPEILIFT_SHOULD_TELEPORT(thisx); isPosUpdated = true; if (((this->curPoint >= this->endPoint) && (this->direction > 0)) || @@ -154,7 +154,7 @@ void ObjDanpeilift_Wait(ObjDanpeilift* this, PlayState* play) { this->waitTimer--; if (this->waitTimer <= 0) { this->actionFunc = ObjDanpeilift_Move; - this->dyna.actor.speedXZ = 0.0f; + this->dyna.actor.speed = 0.0f; } } diff --git a/src/overlays/actors/ovl_Obj_Driftice/z_obj_driftice.c b/src/overlays/actors/ovl_Obj_Driftice/z_obj_driftice.c index f0eaaf25ac..a93ab99bfe 100644 --- a/src/overlays/actors/ovl_Obj_Driftice/z_obj_driftice.c +++ b/src/overlays/actors/ovl_Obj_Driftice/z_obj_driftice.c @@ -358,10 +358,10 @@ void func_80A671E0(ObjDriftice* this, PlayState* play) { phi_f12 = this->unk_23C * 0.13f; } - Math_StepToF(&this->dyna.actor.speedXZ, phi_f0, phi_f12); + Math_StepToF(&this->dyna.actor.speed, phi_f0, phi_f12); - if ((this->dyna.actor.speedXZ + 0.05f) < sp3C) { - Math_Vec3f_Scale(&this->dyna.actor.velocity, this->dyna.actor.speedXZ / sp3C); + if ((this->dyna.actor.speed + 0.05f) < sp3C) { + Math_Vec3f_Scale(&this->dyna.actor.velocity, this->dyna.actor.speed / sp3C); this->dyna.actor.world.pos.x += this->dyna.actor.velocity.x; this->dyna.actor.world.pos.y += this->dyna.actor.velocity.y; this->dyna.actor.world.pos.z += this->dyna.actor.velocity.z; @@ -371,7 +371,7 @@ void func_80A671E0(ObjDriftice* this, PlayState* play) { if (1) {} - this->dyna.actor.speedXZ *= 0.5f; + this->dyna.actor.speed *= 0.5f; if (((this->unk_164 >= this->unk_160) && (this->unk_168 > 0)) || ((this->unk_164 <= 0) && (this->unk_168 < 0))) { if (!OBJDRIFTICE_GET_1000(&this->dyna.actor)) { @@ -421,7 +421,7 @@ void func_80A674A8(ObjDriftice* this) { void func_80A674C4(ObjDriftice* this, PlayState* play) { this->unk_24C--; if (this->unk_24C <= 0) { - this->dyna.actor.speedXZ = 0.0f; + this->dyna.actor.speed = 0.0f; func_80A671CC(this); } } diff --git a/src/overlays/actors/ovl_Obj_Etcetera/z_obj_etcetera.c b/src/overlays/actors/ovl_Obj_Etcetera/z_obj_etcetera.c index ceedeb6c49..69829d09e1 100644 --- a/src/overlays/actors/ovl_Obj_Etcetera/z_obj_etcetera.c +++ b/src/overlays/actors/ovl_Obj_Etcetera/z_obj_etcetera.c @@ -159,7 +159,7 @@ void ObjEtcetera_Idle(ObjEtcetera* this, PlayState* play) { // Player is walking onto the Deku Flower, or falling on it from a height this->oscillationTimer = 10; ObjEtcetera_StartRustleAnimation(this); - } else if ((player->actor.speedXZ > 0.1f) || + } else if ((player->actor.speed > 0.1f) || ((player->unk_ABC < 0.0f) && !(player->stateFlags3 & PLAYER_STATE3_100))) { // Player is walking on top of the Deku Flower, is at the very start of burrowing, or is at the very // start of launching diff --git a/src/overlays/actors/ovl_Obj_Flowerpot/z_obj_flowerpot.c b/src/overlays/actors/ovl_Obj_Flowerpot/z_obj_flowerpot.c index 973c40b972..fc046b0609 100644 --- a/src/overlays/actors/ovl_Obj_Flowerpot/z_obj_flowerpot.c +++ b/src/overlays/actors/ovl_Obj_Flowerpot/z_obj_flowerpot.c @@ -537,7 +537,7 @@ void func_80A1CC0C(ObjFlowerpot* this, PlayState* play) { if (Actor_HasNoParent(&this->actor, play)) { this->actor.room = play->roomCtx.curRoom.num; - if (fabsf(this->actor.speedXZ) < 0.1f) { + if (fabsf(this->actor.speed) < 0.1f) { func_80A1C818(this); Player_PlaySfx(GET_PLAYER(play), NA_SE_PL_PUT_DOWN_POT); this->collider.base.ocFlags1 &= ~OC1_TYPE_PLAYER; diff --git a/src/overlays/actors/ovl_Obj_Grass_Carry/z_obj_grass_carry.c b/src/overlays/actors/ovl_Obj_Grass_Carry/z_obj_grass_carry.c index a803f7904d..b0557d483a 100644 --- a/src/overlays/actors/ovl_Obj_Grass_Carry/z_obj_grass_carry.c +++ b/src/overlays/actors/ovl_Obj_Grass_Carry/z_obj_grass_carry.c @@ -246,8 +246,8 @@ void func_809AB610(ObjGrassCarry* this, PlayState* play) { if (Actor_HasNoParent(&this->actor, play)) { func_809AB6FC(this); - this->actor.velocity.x = Math_SinS(this->actor.world.rot.y) * this->actor.speedXZ; - this->actor.velocity.z = Math_CosS(this->actor.world.rot.y) * this->actor.speedXZ; + this->actor.velocity.x = Math_SinS(this->actor.world.rot.y) * this->actor.speed; + this->actor.velocity.z = Math_CosS(this->actor.world.rot.y) * this->actor.speed; this->actor.gravity = -0.1f; this->actor.terminalVelocity = -17.0f; func_809AAF18(this); diff --git a/src/overlays/actors/ovl_Obj_Iceblock/z_obj_iceblock.c b/src/overlays/actors/ovl_Obj_Iceblock/z_obj_iceblock.c index 1e7b8c7679..85b23d232b 100644 --- a/src/overlays/actors/ovl_Obj_Iceblock/z_obj_iceblock.c +++ b/src/overlays/actors/ovl_Obj_Iceblock/z_obj_iceblock.c @@ -206,10 +206,10 @@ s32 func_80A236D4(ObjIceblock* this, Vec3f* arg1) { s32 sp20; sp26 = Math_Vec3f_Yaw(&this->dyna.actor.world.pos, arg1); - sp2C = Math_SinS(sp26) * this->dyna.actor.speedXZ; + sp2C = Math_SinS(sp26) * this->dyna.actor.speed; sp2C = fabsf(sp2C) + 0.01f; - sp28 = Math_CosS(sp26) * this->dyna.actor.speedXZ; + sp28 = Math_CosS(sp26) * this->dyna.actor.speed; sp28 = fabsf(sp28) + 0.01f; sp20 = Math_StepToF(&this->dyna.actor.world.pos.x, arg1->x, sp2C); @@ -892,7 +892,7 @@ void func_80A25440(ObjIceblock* this) { } static InitChainEntry sInitChain[] = { - ICHAIN_F32_DIV1000(speedXZ, 16000, ICHAIN_CONTINUE), + ICHAIN_F32_DIV1000(speed, 16000, ICHAIN_CONTINUE), ICHAIN_F32_DIV1000(gravity, -1800, ICHAIN_CONTINUE), ICHAIN_F32_DIV1000(terminalVelocity, -26000, ICHAIN_CONTINUE), ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_CONTINUE), diff --git a/src/overlays/actors/ovl_Obj_Kibako/z_obj_kibako.c b/src/overlays/actors/ovl_Obj_Kibako/z_obj_kibako.c index e0c642131a..977ed92c89 100644 --- a/src/overlays/actors/ovl_Obj_Kibako/z_obj_kibako.c +++ b/src/overlays/actors/ovl_Obj_Kibako/z_obj_kibako.c @@ -340,7 +340,7 @@ void ObjKibako_Held(ObjKibako* this, PlayState* play) { func_80926394(this, play); if (Actor_HasNoParent(&this->actor, play)) { this->actor.room = play->roomCtx.curRoom.num; - if (fabsf(this->actor.speedXZ) < 0.1f) { + if (fabsf(this->actor.speed) < 0.1f) { ObjKibako_SetupIdle(this); this->collider.base.ocFlags1 &= ~OC1_TYPE_PLAYER; Actor_PlaySfx(&this->actor, NA_SE_EV_PUT_DOWN_WOODBOX); diff --git a/src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.c b/src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.c index 2f092a4f9f..e9ca6aba89 100644 --- a/src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.c +++ b/src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.c @@ -128,7 +128,7 @@ void ObjKibako2_SpawnSkulltula(ObjKibako2* this, PlayState* play) { if (skulltula != NULL) { skulltula->parent = &this->dyna.actor; skulltula->velocity.y = 13.0f; - skulltula->speedXZ = 0.0f; + skulltula->speed = 0.0f; } } } diff --git a/src/overlays/actors/ovl_Obj_Kinoko/z_obj_kinoko.c b/src/overlays/actors/ovl_Obj_Kinoko/z_obj_kinoko.c index 9c9215b24f..7e568ee170 100644 --- a/src/overlays/actors/ovl_Obj_Kinoko/z_obj_kinoko.c +++ b/src/overlays/actors/ovl_Obj_Kinoko/z_obj_kinoko.c @@ -53,9 +53,9 @@ void ObjKinoko_Update(Actor* thisx, PlayState* play) { return; } Actor_PickUp(thisx, play, GI_MAX, 20.0f, 10.0f); - if (Math_SmoothStepToF(&thisx->speedXZ, 0.0f, 0.04f, 2.0f, 0.5f) < 0.5f) { + if (Math_SmoothStepToF(&thisx->speed, 0.0f, 0.04f, 2.0f, 0.5f) < 0.5f) { thisx->scale.x = 0.0f; - thisx->speedXZ = 110.0f; + thisx->speed = 110.0f; thisx->velocity.x = 0.2f; } if (Math_SmoothStepToF(&thisx->scale.x, thisx->velocity.x, 0.04f, 0.004f, 0.001f) < @@ -76,7 +76,7 @@ void ObjKinoko_Draw(Actor* thisx, PlayState* play) { func_8012C2DC(play->state.gfxCtx); gfx = POLY_XLU_DISP; - gDPSetPrimColor(&gfx[0], 0, 0, 169, 63, 186, (u8)thisx->speedXZ); + gDPSetPrimColor(&gfx[0], 0, 0, 169, 63, 186, (u8)thisx->speed); gDPSetEnvColor(&gfx[1], 110, 44, 200, 100); gDPSetRenderMode(&gfx[2], G_RM_PASS, G_RM_ZB_CLD_SURF2); gSPMatrix(&gfx[3], Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); diff --git a/src/overlays/actors/ovl_Obj_Lupygamelift/z_obj_lupygamelift.c b/src/overlays/actors/ovl_Obj_Lupygamelift/z_obj_lupygamelift.c index a4b211bef6..7be450b3b5 100644 --- a/src/overlays/actors/ovl_Obj_Lupygamelift/z_obj_lupygamelift.c +++ b/src/overlays/actors/ovl_Obj_Lupygamelift/z_obj_lupygamelift.c @@ -131,7 +131,7 @@ void func_80AF04D8(ObjLupygamelift* this, PlayState* play) { void func_80AF0514(ObjLupygamelift* this) { this->actionFunc = func_80AF0530; - this->dyna.actor.speedXZ = this->targetSpeedXZ; + this->dyna.actor.speed = this->targetSpeedXZ; } void func_80AF0530(ObjLupygamelift* this, PlayState* play) { @@ -141,11 +141,11 @@ void func_80AF0530(ObjLupygamelift* this, PlayState* play) { target.x = this->points[this->pointIndex].x; target.y = this->points[this->pointIndex].y; target.z = this->points[this->pointIndex].z; - distRemaining = Math_Vec3f_StepTo(&this->dyna.actor.world.pos, &target, this->dyna.actor.speedXZ); + distRemaining = Math_Vec3f_StepTo(&this->dyna.actor.world.pos, &target, this->dyna.actor.speed); if (distRemaining > 30.0f) { - Math_SmoothStepToF(&this->dyna.actor.speedXZ, this->targetSpeedXZ, 0.5f, 5.0f, 0.1f); + Math_SmoothStepToF(&this->dyna.actor.speed, this->targetSpeedXZ, 0.5f, 5.0f, 0.1f); } else if (distRemaining > 0.0f) { - Math_SmoothStepToF(&this->dyna.actor.speedXZ, 5.0f, 0.5f, 5.0f, 1.0f); + Math_SmoothStepToF(&this->dyna.actor.speed, 5.0f, 0.5f, 5.0f, 1.0f); } else { if (this->pointIndex < (this->count - 1)) { this->pointIndex++; diff --git a/src/overlays/actors/ovl_Obj_Makekinsuta/z_obj_makekinsuta.c b/src/overlays/actors/ovl_Obj_Makekinsuta/z_obj_makekinsuta.c index 5fea12dd0e..d544fcbfcb 100644 --- a/src/overlays/actors/ovl_Obj_Makekinsuta/z_obj_makekinsuta.c +++ b/src/overlays/actors/ovl_Obj_Makekinsuta/z_obj_makekinsuta.c @@ -95,11 +95,11 @@ void func_8099FB64(Actor* thisx, PlayState* play) { actor->parent = thisx; if (rotCheck) { actor->velocity.y = 10.0f; - actor->speedXZ = 3.0f; + actor->speed = 3.0f; } else { speedXZ = sqrtf((destVec.x * destVec.x) + (destVec.z * destVec.z)); actor->velocity.y = (4 * destVec.y) + 4.0f; - actor->speedXZ = (2 * speedXZ) + 2.0f; + actor->speed = (2 * speedXZ) + 2.0f; } } } diff --git a/src/overlays/actors/ovl_Obj_Nozoki/z_obj_nozoki.c b/src/overlays/actors/ovl_Obj_Nozoki/z_obj_nozoki.c index a0d1b85a66..0a3f703fbd 100644 --- a/src/overlays/actors/ovl_Obj_Nozoki/z_obj_nozoki.c +++ b/src/overlays/actors/ovl_Obj_Nozoki/z_obj_nozoki.c @@ -314,17 +314,17 @@ void func_80BA2C94(ObjNozoki* this, PlayState* play) { Flags_UnsetSwitch(play, this->dyna.actor.world.rot.x); } - Math_StepToF(&this->dyna.actor.speedXZ, D_80BA34E4[this->unk_15D], 0.1f); + Math_StepToF(&this->dyna.actor.speed, D_80BA34E4[this->unk_15D], 0.1f); if ((play->actorCtx.flags & ACTORCTX_FLAG_6) || (play->actorCtx.flags & ACTORCTX_FLAG_5)) { temp_f0 = 0.5f; } else { - temp_f0 = this->dyna.actor.speedXZ; + temp_f0 = this->dyna.actor.speed; } sp34 = Math_Vec3f_StepToXZ(&this->dyna.actor.world.pos, &this->dyna.actor.home.pos, temp_f0); - D_80BA36B8 += this->dyna.actor.speedXZ; + D_80BA36B8 += this->dyna.actor.speed; if (play->actorCtx.flags & ACTORCTX_FLAG_6) { if (sp34 <= 5.0f) { @@ -355,14 +355,14 @@ void func_80BA2C94(ObjNozoki* this, PlayState* play) { } } - this->dyna.actor.velocity.x += this->dyna.actor.speedXZ * 0.66f; + this->dyna.actor.velocity.x += this->dyna.actor.speed * 0.66f; if (this->dyna.actor.velocity.x >= 0x10000) { this->dyna.actor.velocity.x -= 0x10000; } play->roomCtx.unk7A[0] = this->dyna.actor.velocity.x; - func_8019FAD8(&gSfxDefaultPos, NA_SE_EV_SECOM_CONVEYOR - SFX_FLAG, this->dyna.actor.speedXZ); + func_8019FAD8(&gSfxDefaultPos, NA_SE_EV_SECOM_CONVEYOR - SFX_FLAG, this->dyna.actor.speed); } void func_80BA3044(ObjNozoki* this, PlayState* play) { diff --git a/src/overlays/actors/ovl_Obj_Ocarinalift/z_obj_ocarinalift.c b/src/overlays/actors/ovl_Obj_Ocarinalift/z_obj_ocarinalift.c index 3a25ef4020..00d3048848 100644 --- a/src/overlays/actors/ovl_Obj_Ocarinalift/z_obj_ocarinalift.c +++ b/src/overlays/actors/ovl_Obj_Ocarinalift/z_obj_ocarinalift.c @@ -99,7 +99,7 @@ void func_80AC96A4(ObjOcarinalift* this, PlayState* play) { void func_80AC96B4(ObjOcarinalift* this) { this->actionFunc = func_80AC96D0; - this->dyna.actor.speedXZ = 0.0f; + this->dyna.actor.speed = 0.0f; } void func_80AC96D0(ObjOcarinalift* this, PlayState* play) { @@ -125,9 +125,9 @@ void func_80AC96D0(ObjOcarinalift* this, PlayState* play) { phi_fa0 = this->unk160 * 0.16f; } - Math_StepToF(&thisx->speedXZ, phi_fv0, phi_fa0); - if ((thisx->speedXZ + 0.05f) < magnitude) { - Math_Vec3f_Scale(&thisx->velocity, thisx->speedXZ / magnitude); + Math_StepToF(&thisx->speed, phi_fv0, phi_fa0); + if ((thisx->speed + 0.05f) < magnitude) { + Math_Vec3f_Scale(&thisx->velocity, thisx->speed / magnitude); thisx->world.pos.x += thisx->velocity.x; thisx->world.pos.y += thisx->velocity.y; thisx->world.pos.z += thisx->velocity.z; @@ -135,7 +135,7 @@ void func_80AC96D0(ObjOcarinalift* this, PlayState* play) { paramsC = OBJOCARINALIFT_GET_C(thisx); sp34 = true; this->unk168 += this->unk16C; - thisx->speedXZ *= 0.4f; + thisx->speed *= 0.4f; if (((this->unk168 >= this->unk164) && (this->unk16C > 0)) || ((this->unk168 <= 0) && (this->unk16C < 0))) { if (paramsC == OBJOCARINALIFT_PARAMSC_0) { this->unk16C = -this->unk16C; diff --git a/src/overlays/actors/ovl_Obj_Raillift/z_obj_raillift.c b/src/overlays/actors/ovl_Obj_Raillift/z_obj_raillift.c index d0a705cf26..0fdf0a86b0 100644 --- a/src/overlays/actors/ovl_Obj_Raillift/z_obj_raillift.c +++ b/src/overlays/actors/ovl_Obj_Raillift/z_obj_raillift.c @@ -141,15 +141,15 @@ void ObjRaillift_Move(ObjRaillift* this, PlayState* play) { step = this->speed * 0.16f; } - Math_StepToF(&thisx->speedXZ, target, step); - if ((thisx->speedXZ + 0.05f) < speed) { - Math_Vec3f_Scale(&thisx->velocity, thisx->speedXZ / speed); + Math_StepToF(&thisx->speed, target, step); + if ((thisx->speed + 0.05f) < speed) { + Math_Vec3f_Scale(&thisx->velocity, thisx->speed / speed); thisx->world.pos.x += thisx->velocity.x; thisx->world.pos.y += thisx->velocity.y; thisx->world.pos.z += thisx->velocity.z; } else { this->curPoint += this->direction; - thisx->speedXZ *= 0.4f; + thisx->speed *= 0.4f; isTeleporting = OBJRAILLIFT_SHOULD_TELEPORT(thisx); isPosUpdated = true; if (((this->curPoint >= this->endPoint) && (this->direction > 0)) || @@ -191,13 +191,13 @@ void ObjRaillift_Wait(ObjRaillift* this, PlayState* play) { this->waitTimer--; if (this->waitTimer <= 0) { this->actionFunc = ObjRaillift_Move; - this->dyna.actor.speedXZ = 0.0f; + this->dyna.actor.speed = 0.0f; } } void ObjRaillift_Idle(ObjRaillift* this, PlayState* play) { if (Flags_GetSwitch(play, OBJRAILLIFT_GET_FLAG(&this->dyna.actor))) { - this->dyna.actor.speedXZ = 0.0f; + this->dyna.actor.speed = 0.0f; ActorCutscene_SetIntentToPlay(this->dyna.actor.cutscene); this->actionFunc = ObjRaillift_StartCutscene; } diff --git a/src/overlays/actors/ovl_Obj_Snowball2/z_obj_snowball2.c b/src/overlays/actors/ovl_Obj_Snowball2/z_obj_snowball2.c index de220e7a8d..fde4204a97 100644 --- a/src/overlays/actors/ovl_Obj_Snowball2/z_obj_snowball2.c +++ b/src/overlays/actors/ovl_Obj_Snowball2/z_obj_snowball2.c @@ -417,7 +417,7 @@ void func_80B39FA8(ObjSnowball2* this, PlayState* play) { if (Actor_HasNoParent(&this->actor, play)) { this->actor.room = play->roomCtx.curRoom.num; - this->actor.speedXZ *= 3.8f; + this->actor.speed *= 3.8f; this->actor.velocity.y *= 0.4f; this->actor.gravity = -2.8f; Actor_MoveWithGravity(&this->actor); @@ -470,7 +470,7 @@ void func_80B3A13C(ObjSnowball2* this, PlayState* play) { sp30 = false; if (this->actor.bgCheckFlags & 0x60) { - if ((this->actor.bgCheckFlags & 0x40) || (this->actor.speedXZ > 3.0f)) { + if ((this->actor.bgCheckFlags & 0x40) || (this->actor.speed > 3.0f)) { if (this->actor.depthInWater < (1200.0f * this->actor.scale.y)) { func_80B39470(&this->actor, play); func_80B395EC(&this->actor, play); @@ -488,20 +488,20 @@ void func_80B3A13C(ObjSnowball2* this, PlayState* play) { this->unk_1AA >>= 1; if (sp34) { - this->actor.speedXZ *= 0.8f; + this->actor.speed *= 0.8f; } else { - this->actor.speedXZ *= 0.65f; + this->actor.speed *= 0.65f; } this->actor.velocity.y *= 0.27f; this->actor.gravity *= 0.27f; - if (this->actor.speedXZ < 0.4f) { + if (this->actor.speed < 0.4f) { sp30 = true; } } else { if (sp34) { - this->actor.speedXZ *= 0.8f; + this->actor.speed *= 0.8f; } else { - this->actor.speedXZ *= 0.96f; + this->actor.speed *= 0.96f; } this->actor.velocity.y *= 0.96f; } @@ -527,7 +527,7 @@ void func_80B3A498(ObjSnowball2* this) { this->actor.home.pos.z = this->actor.world.pos.z; this->actor.world.pos.y = this->actor.world.pos.y + (this->actor.shape.yOffset * this->actor.scale.y); this->actor.shape.yOffset = 0.0f; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actionFunc = func_80B3A500; } @@ -539,7 +539,7 @@ void func_80B3A500(ObjSnowball2* this, PlayState* play) { this->unk_1AC--; - this->actor.speedXZ *= 0.7f; + this->actor.speed *= 0.7f; this->unk_1A8 >>= 1; this->unk_1AA >>= 1; diff --git a/src/overlays/actors/ovl_Obj_Spinyroll/z_obj_spinyroll.c b/src/overlays/actors/ovl_Obj_Spinyroll/z_obj_spinyroll.c index b4f3c3d98b..4541baa2a1 100644 --- a/src/overlays/actors/ovl_Obj_Spinyroll/z_obj_spinyroll.c +++ b/src/overlays/actors/ovl_Obj_Spinyroll/z_obj_spinyroll.c @@ -195,10 +195,10 @@ void func_80A1DC5C(ObjSpinyroll* this) { void func_80A1DCCC(ObjSpinyroll* this) { f32 phi_f2; - if (this->dyna.actor.speedXZ > 3.0f) { + if (this->dyna.actor.speed > 3.0f) { phi_f2 = 3.0f; } else { - phi_f2 = this->dyna.actor.speedXZ; + phi_f2 = this->dyna.actor.speed; } if (this->unk_4D4 < phi_f2) { @@ -246,15 +246,15 @@ s32 func_80A1DEB8(ObjSpinyroll* this) { s32 sp30 = this->unk_4A8 ^ 1; Vec3f sp24; - Math_StepToF(&this->dyna.actor.speedXZ, this->unk_4A4, this->unk_4A4 * 0.2f); + Math_StepToF(&this->dyna.actor.speed, this->unk_4A4, this->unk_4A4 * 0.2f); - this->dyna.actor.world.pos.x += this->dyna.actor.speedXZ * this->unk_4C4.x; - this->dyna.actor.world.pos.y += this->dyna.actor.speedXZ * this->unk_4C4.y; - this->dyna.actor.world.pos.z += this->dyna.actor.speedXZ * this->unk_4C4.z; + this->dyna.actor.world.pos.x += this->dyna.actor.speed * this->unk_4C4.x; + this->dyna.actor.world.pos.y += this->dyna.actor.speed * this->unk_4C4.y; + this->dyna.actor.world.pos.z += this->dyna.actor.speed * this->unk_4C4.z; Math_Vec3f_Diff(&this->unk_4AC[sp30], &this->dyna.actor.world.pos, &sp24); - return Math3D_LengthSquared(&sp24) < (SQ(this->dyna.actor.speedXZ) + 0.05f); + return Math3D_LengthSquared(&sp24) < (SQ(this->dyna.actor.speed) + 0.05f); } void func_80A1DFA0(ObjSpinyroll* this) { @@ -517,7 +517,7 @@ void ObjSpinyroll_Destroy(Actor* thisx, PlayState* play) { } void func_80A1E9C4(ObjSpinyroll* this) { - this->dyna.actor.speedXZ = 0.0f; + this->dyna.actor.speed = 0.0f; this->actionFunc = func_80A1E9E0; } @@ -531,7 +531,7 @@ void func_80A1E9E0(ObjSpinyroll* this, PlayState* play) { void func_80A1EA10(ObjSpinyroll* this) { this->actionFunc = func_80A1EA4C; this->unk_4E2 = D_80A1F1E4[OBJSPINYROLL_GET_1C00(&this->dyna.actor)]; - this->dyna.actor.speedXZ = 0.0f; + this->dyna.actor.speed = 0.0f; } void func_80A1EA4C(ObjSpinyroll* this, PlayState* play) { @@ -548,7 +548,7 @@ void func_80A1EA4C(ObjSpinyroll* this, PlayState* play) { void func_80A1EAAC(ObjSpinyroll* this) { this->actionFunc = func_80A1EAE0; this->unk_4DC = D_80A1F20C[this->unk_4A8]; - this->dyna.actor.speedXZ = 0.0f; + this->dyna.actor.speed = 0.0f; } void func_80A1EAE0(ObjSpinyroll* this, PlayState* play) { diff --git a/src/overlays/actors/ovl_Obj_Swprize/z_obj_swprize.c b/src/overlays/actors/ovl_Obj_Swprize/z_obj_swprize.c index 5782442373..5e6f399a8b 100644 --- a/src/overlays/actors/ovl_Obj_Swprize/z_obj_swprize.c +++ b/src/overlays/actors/ovl_Obj_Swprize/z_obj_swprize.c @@ -64,7 +64,7 @@ void func_80C253D0(ObjSwprize* this, PlayState* play) { if (collectible != NULL) { if (sp78.y < 0.98f) { collectible->velocity.y = (sp78.y + 1.0f) * 4.0f; - collectible->speedXZ = (2.0f * (1.0f - fabsf(sp78.y))) + 2.0f; + collectible->speed = (2.0f * (1.0f - fabsf(sp78.y))) + 2.0f; collectible->world.rot.y = Math_Atan2S_XY(sp78.z, sp78.x) + D_80C257F8[i]; } else { collectible->world.rot.y = i * (0x10000 / 3); @@ -75,7 +75,7 @@ void func_80C253D0(ObjSwprize* this, PlayState* play) { collectible = Item_DropCollectible(play, &thisx->world.pos, temp_s0); if ((collectible != NULL) && (sp78.y < 0.98f)) { collectible->velocity.y = (sp78.y + 1.0f) * 4.0f; - collectible->speedXZ = (2.0f * (1.0f - fabsf(sp78.y))) + 2.0f; + collectible->speed = (2.0f * (1.0f - fabsf(sp78.y))) + 2.0f; collectible->world.rot.y = Math_Atan2S_XY(sp78.z, sp78.x); } } diff --git a/src/overlays/actors/ovl_Obj_Taru/z_obj_taru.c b/src/overlays/actors/ovl_Obj_Taru/z_obj_taru.c index 6b1058e105..5608143b3b 100644 --- a/src/overlays/actors/ovl_Obj_Taru/z_obj_taru.c +++ b/src/overlays/actors/ovl_Obj_Taru/z_obj_taru.c @@ -181,7 +181,7 @@ void func_80B9BCBC(ObjTaru* this, PlayState* play) { if (spawnedActor != NULL) { spawnedActor->parent = &this->dyna.actor; spawnedActor->velocity.y = 12.0f; - spawnedActor->speedXZ = 2.0f; + spawnedActor->speed = 2.0f; } } } diff --git a/src/overlays/actors/ovl_Obj_Toge/z_obj_toge.c b/src/overlays/actors/ovl_Obj_Toge/z_obj_toge.c index d9e899a134..b8be7538b2 100644 --- a/src/overlays/actors/ovl_Obj_Toge/z_obj_toge.c +++ b/src/overlays/actors/ovl_Obj_Toge/z_obj_toge.c @@ -148,7 +148,7 @@ void ObjToge_Init(Actor* thisx, PlayState* play) { Math_Vec3f_Copy(&thisx->world.pos, &this->unk_198[0]); thisx->world.rot.y = Math_Vec3f_Yaw(&this->unk_198[0], &this->unk_198[1]); this->unk_194 = 0; - thisx->speedXZ = 0.0f; + thisx->speed = 0.0f; if (sp3E > 0) { s16 sp36; @@ -228,7 +228,7 @@ void func_809A481C(ObjToge* this, PlayState* play) { } void func_809A488C(ObjToge* this) { - this->actor.speedXZ = 1.0f; + this->actor.speed = 1.0f; this->actionFunc = func_809A48AC; } @@ -237,9 +237,9 @@ void func_809A48AC(ObjToge* this, PlayState* play) { s32 sp30 = this->unk_194 ^ 1; if (this->unk_1B4 && (this->unk_194 == 1)) { - Math_StepToF(&this->actor.speedXZ, 2.0f, 0.4f); + Math_StepToF(&this->actor.speed, 2.0f, 0.4f); } else { - Math_StepToF(&this->actor.speedXZ, D_809A4CDC[OBJTOGE_GET_700(&this->actor)], 1.5f); + Math_StepToF(&this->actor.speed, D_809A4CDC[OBJTOGE_GET_700(&this->actor)], 1.5f); this->actor.shape.rot.y += 0x1770; } diff --git a/src/overlays/actors/ovl_Obj_Tokeidai/z_obj_tokeidai.c b/src/overlays/actors/ovl_Obj_Tokeidai/z_obj_tokeidai.c index ac238061eb..d9a0239994 100644 --- a/src/overlays/actors/ovl_Obj_Tokeidai/z_obj_tokeidai.c +++ b/src/overlays/actors/ovl_Obj_Tokeidai/z_obj_tokeidai.c @@ -332,7 +332,7 @@ void ObjTokeidai_ExteriorGear_OpenedIdle(ObjTokeidai* this, PlayState* play) { if (Cutscene_CheckActorAction(play, 132) && play->csCtx.actorActions[Cutscene_GetActorActionIndex(play, 132)]->action == 2) { this->actionFunc = ObjTokeidai_ExteriorGear_Collapse; - this->actor.speedXZ = this->actor.scale.y * 5.0f; + this->actor.speed = this->actor.scale.y * 5.0f; this->actor.velocity.y = 0.0f; this->actor.terminalVelocity = this->actor.scale.y * -50.0f; this->actor.gravity = this->actor.scale.y * -5.0f; diff --git a/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c b/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c index 115e7d8b27..30c9fef03f 100644 --- a/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c +++ b/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c @@ -148,7 +148,7 @@ void ObjTsubo_SpawnGoldSkulltula(ObjTsubo* this, PlayState* play, s32 arg2) { if (child != NULL) { child->parent = &this->actor; child->velocity.y = 0.0f; - child->speedXZ = 0.0f; + child->speed = 0.0f; } } } @@ -621,7 +621,7 @@ void func_809291DC(ObjTsubo* this) { this->actor.shape.rot.x = this->actor.home.rot.x; this->actor.world.rot.x = this->actor.home.rot.x; this->actor.velocity.y = 0.0f; - this->actor.speedXZ = 0.0f; + this->actor.speed = 0.0f; this->actor.shape.rot.y = this->actor.home.rot.y; this->actor.world.rot.y = this->actor.home.rot.y; Actor_SetScale(&this->actor, 0.0f); diff --git a/src/overlays/actors/ovl_Obj_Um/z_obj_um.c b/src/overlays/actors/ovl_Obj_Um/z_obj_um.c index 3538a5fabf..75f942e0cf 100644 --- a/src/overlays/actors/ovl_Obj_Um/z_obj_um.c +++ b/src/overlays/actors/ovl_Obj_Um/z_obj_um.c @@ -410,11 +410,11 @@ s32 func_80B783E0(ObjUm* this, PlayState* play, s32 banditIndex, EnHorse* bandit } bandit->actor.world.rot.y = Math_Vec3f_Yaw(&bandit->actor.world.pos, &sp50); - bandit->actor.speedXZ = 45.0f; + bandit->actor.speed = 45.0f; - sp3C = Math_CosS(bandit->actor.world.rot.x) * bandit->actor.speedXZ; + sp3C = Math_CosS(bandit->actor.world.rot.x) * bandit->actor.speed; bandit->actor.velocity.x = Math_SinS(bandit->actor.world.rot.y) * sp3C; - bandit->actor.velocity.y = Math_SinS(bandit->actor.world.rot.x) * bandit->actor.speedXZ; + bandit->actor.velocity.y = Math_SinS(bandit->actor.world.rot.x) * bandit->actor.speed; bandit->actor.velocity.z = Math_CosS(bandit->actor.world.rot.y) * sp3C; bandit->banditPosition.x = @@ -1122,9 +1122,9 @@ ObjUmPathState ObjUm_UpdatePath(ObjUm* this, PlayState* play) { } if (this->animIndex == OBJ_UM_ANIM_TROT) { - this->dyna.actor.speedXZ = 4.0f; + this->dyna.actor.speed = 4.0f; } else if (this->animIndex == OBJ_UM_ANIM_GALLOP) { - this->dyna.actor.speedXZ = 8.0f; + this->dyna.actor.speed = 8.0f; } return sp3C; @@ -1656,9 +1656,9 @@ void ObjUm_ChangeAnim(ObjUm* this, PlayState* play, ObjUmAnimation animIndex) { } if (animIndex == OBJ_UM_ANIM_TROT) { - animPlaybackSpeed = this->dyna.actor.speedXZ * 0.25f; + animPlaybackSpeed = this->dyna.actor.speed * 0.25f; } else if (animIndex == OBJ_UM_ANIM_GALLOP) { - animPlaybackSpeed = this->dyna.actor.speedXZ * 0.2f; + animPlaybackSpeed = this->dyna.actor.speed * 0.2f; } else if (animIndex == OBJ_UM_ANIM_IDLE) { animPlaybackSpeed = 1.0f; } diff --git a/src/overlays/actors/ovl_Obj_Vspinyroll/z_obj_vspinyroll.c b/src/overlays/actors/ovl_Obj_Vspinyroll/z_obj_vspinyroll.c index 514a68c5fa..257e9eb79b 100644 --- a/src/overlays/actors/ovl_Obj_Vspinyroll/z_obj_vspinyroll.c +++ b/src/overlays/actors/ovl_Obj_Vspinyroll/z_obj_vspinyroll.c @@ -123,14 +123,14 @@ s32 func_80A3C700(ObjVspinyroll* this) { s32 sp30 = this->unk_398 ^ 1; Vec3f sp24; - Math_StepToF(&this->dyna.actor.speedXZ, this->unk_394, this->unk_394 * 0.2f); + Math_StepToF(&this->dyna.actor.speed, this->unk_394, this->unk_394 * 0.2f); - this->dyna.actor.world.pos.x += this->dyna.actor.speedXZ * this->unk_3B4.x; - this->dyna.actor.world.pos.y += this->dyna.actor.speedXZ * this->unk_3B4.y; - this->dyna.actor.world.pos.z += this->dyna.actor.speedXZ * this->unk_3B4.z; + this->dyna.actor.world.pos.x += this->dyna.actor.speed * this->unk_3B4.x; + this->dyna.actor.world.pos.y += this->dyna.actor.speed * this->unk_3B4.y; + this->dyna.actor.world.pos.z += this->dyna.actor.speed * this->unk_3B4.z; Math_Vec3f_Diff(&this->unk_39C[sp30], &this->dyna.actor.world.pos, &sp24); - return Math3D_LengthSquared(&sp24) < (SQ(this->dyna.actor.speedXZ) + 0.05f); + return Math3D_LengthSquared(&sp24) < (SQ(this->dyna.actor.speed) + 0.05f); } void func_80A3C7E8(ObjVspinyroll* this) { @@ -322,7 +322,7 @@ void ObjVspinyroll_Destroy(Actor* thisx, PlayState* play) { } void func_80A3CEC4(ObjVspinyroll* this) { - this->dyna.actor.speedXZ = 0.0f; + this->dyna.actor.speed = 0.0f; this->actionFunc = func_80A3CEE0; } @@ -336,7 +336,7 @@ void func_80A3CEE0(ObjVspinyroll* this, PlayState* play) { void func_80A3CF10(ObjVspinyroll* this) { this->actionFunc = func_80A3CF4C; this->unk_3C8 = D_80A3D478[OBJVSPINYROLL_GET_1C00(&this->dyna.actor)]; - this->dyna.actor.speedXZ = 0.0f; + this->dyna.actor.speed = 0.0f; } void func_80A3CF4C(ObjVspinyroll* this, PlayState* play) { @@ -351,7 +351,7 @@ void func_80A3CF4C(ObjVspinyroll* this, PlayState* play) { void func_80A3CFAC(ObjVspinyroll* this) { this->actionFunc = func_80A3CFE0; this->unk_3C2 = D_80A3D4DC[this->unk_398]; - this->dyna.actor.speedXZ = 0.0f; + this->dyna.actor.speed = 0.0f; } void func_80A3CFE0(ObjVspinyroll* this, PlayState* play) { diff --git a/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c b/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c index 74e711cfa5..851cf7d355 100644 --- a/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c +++ b/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c @@ -160,7 +160,7 @@ void ShotSun_UpdateHyliaSun(ShotSun* this, PlayState* play) { collectible = (EnItem00*)Item_DropCollectible(play, &spawnPos, ITEM00_MAGIC_LARGE); if (collectible != NULL) { collectible->unk152 = 0x1770; - collectible->actor.speedXZ = 0.0f; + collectible->actor.speed = 0.0f; } } diff --git a/src/overlays/actors/ovl_TG_Sw/z_tg_sw.c b/src/overlays/actors/ovl_TG_Sw/z_tg_sw.c index 8c1e98bedd..5b4f80ee66 100644 --- a/src/overlays/actors/ovl_TG_Sw/z_tg_sw.c +++ b/src/overlays/actors/ovl_TG_Sw/z_tg_sw.c @@ -62,7 +62,7 @@ void TGSw_ActionExecuteOneShot(TGSw* this, PlayState* play) { } if ((((this->actor.params & 0xFC) >> 2) & 0xFF) == (((actor->params & 0xFC) >> 2) & 0xFF)) { actor->parent = &this->actor; - actor->speedXZ = ABS_ALT(this->actor.world.rot.x); + actor->speed = ABS_ALT(this->actor.world.rot.x); break; } actor = actor->next; @@ -78,7 +78,7 @@ void TGSw_ActionExecuteOneShot(TGSw* this, PlayState* play) { } if ((((this->actor.params & 0xFC) >> 2) & 0xFF) == (((actor->params & 0xFC) >> 2) & 0xFF)) { actor->parent = &this->actor; - actor->speedXZ = ABS_ALT(this->actor.world.rot.x); + actor->speed = ABS_ALT(this->actor.world.rot.x); break; } actor = actor->next; diff --git a/src/overlays/effects/ovl_Effect_Ss_G_Spk/z_eff_ss_g_spk.c b/src/overlays/effects/ovl_Effect_Ss_G_Spk/z_eff_ss_g_spk.c index 260541b511..f7b7808835 100644 --- a/src/overlays/effects/ovl_Effect_Ss_G_Spk/z_eff_ss_g_spk.c +++ b/src/overlays/effects/ovl_Effect_Ss_G_Spk/z_eff_ss_g_spk.c @@ -134,8 +134,8 @@ void EffectSsGSpk_Update(PlayState* play, u32 index, EffectSs* this) { void EffectSsGSpk_UpdateNoAccel(PlayState* play, u32 index, EffectSs* this) { if (this->actor != NULL) { if ((this->actor->category == ACTORCAT_EXPLOSIVES) && (this->actor->update != NULL)) { - this->pos.x += (Math_SinS(this->actor->world.rot.y) * this->actor->speedXZ); - this->pos.z += (Math_CosS(this->actor->world.rot.y) * this->actor->speedXZ); + this->pos.x += (Math_SinS(this->actor->world.rot.y) * this->actor->speed); + this->pos.z += (Math_CosS(this->actor->world.rot.y) * this->actor->speed); } } diff --git a/tools/namefixer.py b/tools/namefixer.py index 17c33fc5c1..12356ba595 100755 --- a/tools/namefixer.py +++ b/tools/namefixer.py @@ -693,6 +693,8 @@ wordReplace = { "actor.minVelocityY": "actor.terminalVelocity", "actor.yDistToWater": "actor.depthInWater", "actor.yDistToPlayer": "actor.playerHeightRel", + "actor.speedXZ": "actor.speed", + "thisx->speedXZ": "thisx->speed", "gSaveContext.unk_3F1E": "gSaveContext.hudVisibilityForceButtonAlphasByStatus", "gSaveContext.unk_3F20": "gSaveContext.nextHudVisibility",