Skip to content

Commit

Permalink
Name movement related functions in z_actor (zeldaret#1476)
Browse files Browse the repository at this point in the history
* rename functions

* dragorns name suggestions

* Revert "dragorns name suggestions"

This reverts commit dd4626c.

* lets try that again

* reword comment

* comments

* projectile speed

* arg name

* more comments

* minVelY comment

* merge master and format
  • Loading branch information
fig02 committed Dec 30, 2022
1 parent 41e80b9 commit e37b993
Show file tree
Hide file tree
Showing 191 changed files with 349 additions and 324 deletions.
12 changes: 6 additions & 6 deletions include/functions.h
Original file line number Diff line number Diff line change
Expand Up @@ -358,12 +358,12 @@ void Actor_Kill(Actor* actor);
void Actor_SetFocus(Actor* actor, f32 yOffset);
void Actor_SetScale(Actor* actor, f32 scale);
void Actor_SetObjectDependency(PlayState* play, Actor* actor);
void func_8002D7EC(Actor* actor);
void func_8002D868(Actor* actor);
void Actor_MoveForward(Actor* actor);
void func_8002D908(Actor* actor);
void func_8002D97C(Actor* actor);
void func_8002D9A4(Actor* actor, f32 arg1);
void Actor_UpdatePos(Actor* actor);
void Actor_UpdateVelocityXZGravity(Actor* actor);
void Actor_MoveXZGravity(Actor* actor);
void Actor_UpdateVelocityXYZ(Actor* actor);
void Actor_MoveXYZ(Actor* actor);
void Actor_SetProjectileSpeed(Actor* actor, f32 speedXYZ);
s16 Actor_WorldYawTowardActor(Actor* actorA, Actor* actorB);
s16 Actor_WorldYawTowardPoint(Actor* actor, Vec3f* refPoint);
f32 Actor_WorldDistXYZToActor(Actor* actorA, Actor* actorB);
Expand Down
2 changes: 1 addition & 1 deletion include/z64actor.h
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ typedef struct Actor {
/* 0x05C */ Vec3f velocity; // Velocity of the actor in each axis
/* 0x068 */ f32 speed; // Context dependent speed value. Can be used for XZ or XYZ depending on which move function is used
/* 0x06C */ f32 gravity; // Acceleration due to gravity. Value is added to Y velocity every frame
/* 0x070 */ f32 minVelocityY; // Sets the lower bounds cap on velocity along the Y axis
/* 0x070 */ f32 minVelocityY; // Sets the lower bounds cap for velocity along the Y axis. Only relevant when moved with gravity.
/* 0x074 */ CollisionPoly* wallPoly; // Wall polygon the actor is touching
/* 0x078 */ CollisionPoly* floorPoly; // Floor polygon directly below the actor
/* 0x07C */ u8 wallBgId; // Bg ID of the wall polygon the actor is touching
Expand Down
63 changes: 44 additions & 19 deletions src/code/z_actor.c
Original file line number Diff line number Diff line change
Expand Up @@ -841,54 +841,79 @@ void Actor_Destroy(Actor* actor, PlayState* play) {
}
}

void func_8002D7EC(Actor* actor) {
/**
* Update actor's position factoring in velocity and collider displacement
*/
void Actor_UpdatePos(Actor* actor) {
f32 speedRate = R_UPDATE_RATE * 0.5f;

actor->world.pos.x += (actor->velocity.x * speedRate) + actor->colChkInfo.displacement.x;
actor->world.pos.y += (actor->velocity.y * speedRate) + actor->colChkInfo.displacement.y;
actor->world.pos.z += (actor->velocity.z * speedRate) + actor->colChkInfo.displacement.z;
}

void func_8002D868(Actor* actor) {
/**
* Update actor's velocity accounting for gravity (without dropping below minimum y velocity)
*/
void Actor_UpdateVelocityXZGravity(Actor* actor) {
actor->velocity.x = Math_SinS(actor->world.rot.y) * actor->speed;
actor->velocity.z = Math_CosS(actor->world.rot.y) * actor->speed;

actor->velocity.y += actor->gravity;

if (actor->velocity.y < actor->minVelocityY) {
actor->velocity.y = actor->minVelocityY;
}
}

void Actor_MoveForward(Actor* actor) {
func_8002D868(actor);
func_8002D7EC(actor);
/**
* Move actor while accounting for its current velocity and gravity.
* `actor.speed` is used as the XZ velocity.
* The actor will move in the direction of its world yaw.
*/
void Actor_MoveXZGravity(Actor* actor) {
Actor_UpdateVelocityXZGravity(actor);
Actor_UpdatePos(actor);
}

void func_8002D908(Actor* actor) {
/**
* Update actor's velocity without gravity.
*/
void Actor_UpdateVelocityXYZ(Actor* actor) {
f32 speedXZ = Math_CosS(actor->world.rot.x) * actor->speed;

actor->velocity.x = Math_SinS(actor->world.rot.y) * speedXZ;
actor->velocity.y = Math_SinS(actor->world.rot.x) * actor->speed;
actor->velocity.z = Math_CosS(actor->world.rot.y) * speedXZ;
}

void func_8002D97C(Actor* actor) {
func_8002D908(actor);
func_8002D7EC(actor);
/**
* Move actor while accounting for its current velocity.
* `actor.speed` is used as the XYZ velocity.
* The actor will move in the direction of its world yaw and pitch, with positive pitch moving upwards.
*/
void Actor_MoveXYZ(Actor* actor) {
Actor_UpdateVelocityXYZ(actor);
Actor_UpdatePos(actor);
}

void func_8002D9A4(Actor* actor, f32 arg1) {
actor->speed = Math_CosS(actor->world.rot.x) * arg1;
actor->velocity.y = -Math_SinS(actor->world.rot.x) * arg1;
/**
* From a given XYZ speed value, set the corresponding XZ speed as `actor.speed`, and Y speed as Y velocity.
* Only the actor's world pitch is factored in, with positive pitch moving downwards.
*/
void Actor_SetProjectileSpeed(Actor* actor, f32 speedXYZ) {
actor->speed = Math_CosS(actor->world.rot.x) * speedXYZ;
actor->velocity.y = -Math_SinS(actor->world.rot.x) * speedXYZ;
}

void func_8002D9F8(Actor* actor, SkelAnime* skelAnime) {
Vec3f sp1C;
void Actor_UpdatePosByAnimation(Actor* actor, SkelAnime* skelAnime) {
Vec3f posDiff;

SkelAnime_UpdateTranslation(skelAnime, &posDiff, actor->shape.rot.y);

SkelAnime_UpdateTranslation(skelAnime, &sp1C, actor->shape.rot.y);
actor->world.pos.x += sp1C.x * actor->scale.x;
actor->world.pos.y += sp1C.y * actor->scale.y;
actor->world.pos.z += sp1C.z * actor->scale.z;
actor->world.pos.x += posDiff.x * actor->scale.x;
actor->world.pos.y += posDiff.y * actor->scale.y;
actor->world.pos.z += posDiff.z * actor->scale.z;
}

s16 Actor_WorldYawTowardActor(Actor* actorA, Actor* actorB) {
Expand Down Expand Up @@ -4090,7 +4115,7 @@ s32 func_80035124(Actor* actor, PlayState* play) {
if (Actor_HasParent(actor, play)) {
actor->params = 1;
} else if (!(actor->bgCheckFlags & BGCHECKFLAG_GROUND)) {
Actor_MoveForward(actor);
Actor_MoveXZGravity(actor);
Math_SmoothStepToF(&actor->speed, 0.0f, 1.0f, 0.1f, 0.0f);
} else if ((actor->bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH) && (actor->velocity.y < -4.0f)) {
ret = 1;
Expand Down
2 changes: 1 addition & 1 deletion src/code/z_debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ void DbCamera_DrawScreenText(GfxPrint* printer) {
/**
* Updates the state of the Reg Editor according to user input.
* Also contains a controller rumble test that can be interfaced with via related REGs.
*/
*/
void Regs_UpdateEditor(Input* input) {
s32 dPadInputCur;
s32 pageDataStart = ((gRegEditor->regGroup * REG_PAGES) + gRegEditor->regPage - 1) * REGS_PER_PAGE;
Expand Down
2 changes: 1 addition & 1 deletion src/code/z_en_a_keep.c
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ void EnAObj_Update(Actor* thisx, PlayState* play) {
EnAObj* this = (EnAObj*)thisx;

this->actionFunc(this, play);
Actor_MoveForward(&this->dyna.actor);
Actor_MoveXZGravity(&this->dyna.actor);

if (this->dyna.actor.gravity != 0.0f) {
if (this->dyna.actor.params != A_OBJ_BOULDER_FRAGMENT) {
Expand Down
2 changes: 1 addition & 1 deletion src/code/z_en_item00.c
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ void EnItem00_Update(Actor* thisx, PlayState* play) {

} else {
sp3A = 1;
Actor_MoveForward(&this->actor);
Actor_MoveXZGravity(&this->actor);
}

if (sp3A || D_80157D94[0]) {
Expand Down
4 changes: 2 additions & 2 deletions src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ void ArmsHook_Wait(ArmsHook* this, PlayState* play) {
s32 length = (player->heldItemAction == PLAYER_IA_HOOKSHOT) ? 13 : 26;

ArmsHook_SetupAction(this, ArmsHook_Shoot);
func_8002D9A4(&this->actor, 20.0f);
Actor_SetProjectileSpeed(&this->actor, 20.0f);
this->actor.parent = &GET_PLAYER(play)->actor;
this->timer = length;
}
Expand Down Expand Up @@ -250,7 +250,7 @@ void ArmsHook_Shoot(ArmsHook* this, PlayState* play) {
}
}
} else {
Actor_MoveForward(&this->actor);
Actor_MoveXZGravity(&this->actor);
Math_Vec3f_Diff(&this->actor.world.pos, &this->actor.prevPos, &prevFrameDiff);
Math_Vec3f_Sum(&this->unk_1E8, &prevFrameDiff, &this->unk_1E8);
this->actor.shape.rot.x = Math_Atan2S(this->actor.speed, -this->actor.velocity.y);
Expand Down
2 changes: 1 addition & 1 deletion src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.c
Original file line number Diff line number Diff line change
Expand Up @@ -855,7 +855,7 @@ void BgDyYoseizo_Update(Actor* thisx, PlayState* play2) {
}
}

Actor_MoveForward(&this->actor);
Actor_MoveXZGravity(&this->actor);
this->heightOffset = this->scale * 7500.0f;
Actor_SetFocus(&this->actor, this->heightOffset);
this->actor.focus.pos.y = this->heightOffset;
Expand Down
2 changes: 1 addition & 1 deletion src/overlays/actors/ovl_Bg_Haka_Ship/z_bg_haka_ship.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ void BgHakaShip_Update(Actor* thisx, PlayState* play) {

this->actionFunc(this, play);
if (this->dyna.actor.params == 0) {
Actor_MoveForward(&this->dyna.actor);
Actor_MoveXZGravity(&this->dyna.actor);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/overlays/actors/ovl_Bg_Haka_Zou/z_bg_haka_zou.c
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ void BgHakaZou_Update(Actor* thisx, PlayState* play) {
this->actionFunc(this, play);

if (this->dyna.actor.params == 3) {
Actor_MoveForward(&this->dyna.actor);
Actor_MoveXZGravity(&this->dyna.actor);
}
}

Expand Down
6 changes: 3 additions & 3 deletions src/overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ void BgHeavyBlock_MovePiece(BgHeavyBlock* this, PlayState* play) {

thisx->velocity.x *= 0.98f;
thisx->velocity.z *= 0.98f;
func_8002D7EC(thisx);
Actor_UpdatePos(thisx);
thisx->shape.rot.x += thisx->world.rot.x;
thisx->shape.rot.y += thisx->world.rot.y;
thisx->shape.rot.z += thisx->world.rot.z;
Expand Down Expand Up @@ -382,7 +382,7 @@ void BgHeavyBlock_Fly(BgHeavyBlock* this, PlayState* play) {
Vec3f checkPos;
f32 yIntersect;

Actor_MoveForward(&this->dyna.actor);
Actor_MoveXZGravity(&this->dyna.actor);
checkPos.x = this->dyna.actor.home.pos.x;
checkPos.y = this->dyna.actor.home.pos.y + 1000.0f;
checkPos.z = this->dyna.actor.home.pos.z;
Expand Down Expand Up @@ -455,7 +455,7 @@ void BgHeavyBlock_Land(BgHeavyBlock* this, PlayState* play) {
Math_StepToF(&this->dyna.actor.velocity.y, 0.0f, 3.0f);
this->dyna.actor.gravity = 0.0f;
this->dyna.actor.world.pos = this->dyna.actor.home.pos;
Actor_MoveForward(&this->dyna.actor);
Actor_MoveXZGravity(&this->dyna.actor);
this->dyna.actor.home.pos = this->dyna.actor.world.pos;
switch (this->dyna.actor.params & 0xFF) {
case HEAVYBLOCK_UNBREAKABLE_OUTSIDE_CASTLE:
Expand Down
2 changes: 1 addition & 1 deletion src/overlays/actors/ovl_Bg_Hidan_Dalm/z_bg_hidan_dalm.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ void BgHidanDalm_Update(Actor* thisx, PlayState* play) {
BgHidanDalm* this = (BgHidanDalm*)thisx;

this->actionFunc(this, play);
Actor_MoveForward(&this->dyna.actor);
Actor_MoveXZGravity(&this->dyna.actor);
Actor_UpdateBgCheckInfo(play, &this->dyna.actor, 10.0f, 15.0f, 32.0f,
UPDBGCHECKINFO_FLAG_0 | UPDBGCHECKINFO_FLAG_2);
}
Expand Down
4 changes: 2 additions & 2 deletions src/overlays/actors/ovl_Bg_Hidan_Hamstep/z_bg_hidan_hamstep.c
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ void func_80888860(BgHidanHamstep* this, PlayState* play) {
s32 pad2;
s32 quakeIndex;

Actor_MoveForward(&this->dyna.actor);
Actor_MoveXZGravity(&this->dyna.actor);

if (((this->dyna.actor.world.pos.y - this->dyna.actor.home.pos.y) < (-20.0f - this->dyna.actor.minVelocityY)) &&
(this->dyna.actor.velocity.y <= 0.0f)) {
Expand Down Expand Up @@ -344,7 +344,7 @@ void func_80888A58(BgHidanHamstep* this, PlayState* play) {
s32 pad2;
s32 quakeIndex;

Actor_MoveForward(&this->dyna.actor);
Actor_MoveXZGravity(&this->dyna.actor);
func_80888694(this, (BgHidanHamstep*)this->dyna.actor.parent);

if (((this->dyna.actor.params & 0xFF) <= 0) || ((this->dyna.actor.params & 0xFF) >= 6)) {
Expand Down
4 changes: 2 additions & 2 deletions src/overlays/actors/ovl_Bg_Hidan_Kousi/z_bg_hidan_kousi.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,12 @@ void func_80889C18(BgHidanKousi* this, PlayState* play) {
this->dyna.actor.speed = 2.0f;
BgHidanKousi_SetupAction(this, func_80889C90);
}
Actor_MoveForward(&this->dyna.actor);
Actor_MoveXZGravity(&this->dyna.actor);
func_8002F974(&this->dyna.actor, NA_SE_EV_METALDOOR_SLIDE - SFX_FLAG);
}

void func_80889C90(BgHidanKousi* this, PlayState* play) {
func_8002D7EC(&this->dyna.actor);
Actor_UpdatePos(&this->dyna.actor);
if (D_80889E40[this->dyna.actor.params & 0xFF] <
Math_Vec3f_DistXYZ(&this->dyna.actor.home.pos, &this->dyna.actor.world.pos)) {
func_80889ACC(this);
Expand Down
2 changes: 1 addition & 1 deletion src/overlays/actors/ovl_Bg_Hidan_Rock/z_bg_hidan_rock.c
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ void BgHidanRock_Update(Actor* thisx, PlayState* play) {

this->actionFunc(this, play);
if (this->actionFunc == func_8088B79C) {
Actor_MoveForward(&this->dyna.actor);
Actor_MoveXZGravity(&this->dyna.actor);
Actor_UpdateBgCheckInfo(play, &this->dyna.actor, 0.0f, 0.0f, 0.0f, UPDBGCHECKINFO_FLAG_2);
}

Expand Down
2 changes: 1 addition & 1 deletion src/overlays/actors/ovl_Bg_Ice_Turara/z_bg_ice_turara.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ void BgIceTurara_Fall(BgIceTurara* this, PlayState* play) {
return;
}
} else {
Actor_MoveForward(&this->dyna.actor);
Actor_MoveXZGravity(&this->dyna.actor);
this->dyna.actor.world.pos.y += 40.0f;
Actor_UpdateBgCheckInfo(play, &this->dyna.actor, 0.0f, 0.0f, 0.0f, UPDBGCHECKINFO_FLAG_2);
this->dyna.actor.world.pos.y -= 40.0f;
Expand Down
4 changes: 2 additions & 2 deletions src/overlays/actors/ovl_Bg_Jya_Haheniron/z_bg_jya_haheniron.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ void BgJyaHaheniron_SetupChairCrumble(BgJyaHaheniron* this) {
void BgJyaHaheniron_ChairCrumble(BgJyaHaheniron* this, PlayState* play) {
Vec3f vec;

Actor_MoveForward(&this->actor);
Actor_MoveXZGravity(&this->actor);
Actor_UpdateBgCheckInfo(play, &this->actor, 5.0f, 8.0f, 0.0f,
UPDBGCHECKINFO_FLAG_0 | UPDBGCHECKINFO_FLAG_2 | UPDBGCHECKINFO_FLAG_7);
if ((this->actor.bgCheckFlags & (BGCHECKFLAG_GROUND | BGCHECKFLAG_WALL)) ||
Expand All @@ -174,7 +174,7 @@ void BgJyaHaheniron_SetupPillarCrumble(BgJyaHaheniron* this) {

void BgJyaHaheniron_PillarCrumble(BgJyaHaheniron* this, PlayState* play) {
if (this->timer >= 8) {
Actor_MoveForward(&this->actor);
Actor_MoveXZGravity(&this->actor);
} else if (this->timer >= 17) {
BgJyaHaheniron_SpawnFragments(play, &this->actor.world.pos, D_808987A0);
Actor_Kill(&this->actor);
Expand Down
2 changes: 1 addition & 1 deletion src/overlays/actors/ovl_Bg_Mizu_Movebg/z_bg_mizu_movebg.c
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ void func_8089E650(BgMizuMovebg* this, PlayState* play) {
this->dyna.actor.speed = dist;
}
func_80035844(&this->dyna.actor.world.pos, &waypoint, &this->dyna.actor.world.rot, 1);
func_8002D97C(&this->dyna.actor);
Actor_MoveXYZ(&this->dyna.actor);
dx = waypoint.x - this->dyna.actor.world.pos.x;
dy = waypoint.y - this->dyna.actor.world.pos.y;
dz = waypoint.z - this->dyna.actor.world.pos.z;
Expand Down
2 changes: 1 addition & 1 deletion src/overlays/actors/ovl_Bg_Mori_Bigst/z_bg_mori_bigst.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ void BgMoriBigst_SetupFall(BgMoriBigst* this, PlayState* play) {
}

void BgMoriBigst_Fall(BgMoriBigst* this, PlayState* play) {
Actor_MoveForward(&this->dyna.actor);
Actor_MoveXZGravity(&this->dyna.actor);
if (this->dyna.actor.world.pos.y <= this->dyna.actor.home.pos.y) {
this->dyna.actor.world.pos.y = this->dyna.actor.home.pos.y;
BgMoriBigst_SetupLanding(this, play);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ void BgMoriHashigo_LadderFall(BgMoriHashigo* this, PlayState* play) {
static f32 bounceSpeed[3] = { 4.0f, 2.7f, 1.7f };
Actor* thisx = &this->dyna.actor;

Actor_MoveForward(thisx);
Actor_MoveXZGravity(thisx);
if ((thisx->bgCheckFlags & BGCHECKFLAG_GROUND) && (thisx->velocity.y < 0.0f)) {
if (this->bounceCounter >= ARRAY_COUNT(bounceSpeed)) {
BgMoriHashigo_SetupLadderRest(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ void BgMoriRakkatenjo_Fall(BgMoriRakkatenjo* this, PlayState* play) {
Actor* thisx = &this->dyna.actor;
s32 quakeIndex;

Actor_MoveForward(thisx);
Actor_MoveXZGravity(thisx);
if ((thisx->velocity.y < 0.0f) && (thisx->world.pos.y <= 403.0f)) {
if (this->bounceCount >= ARRAY_COUNT(bounceVel)) {
BgMoriRakkatenjo_SetupRest(this);
Expand Down
2 changes: 1 addition & 1 deletion src/overlays/actors/ovl_Bg_Pushbox/z_bg_pushbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ void BgPushbox_UpdateImpl(BgPushbox* this, PlayState* play) {
this->dyna.actor.speed = CLAMP(this->dyna.actor.speed, -1.0f, 1.0f);
Math_StepToF(&this->dyna.actor.speed, 0.0f, 0.2f);
this->dyna.actor.world.rot.y = this->dyna.unk_158;
Actor_MoveForward(&this->dyna.actor);
Actor_MoveXZGravity(&this->dyna.actor);
Actor_UpdateBgCheckInfo(play, &this->dyna.actor, 20.0f, 40.0f, 40.0f,
UPDBGCHECKINFO_FLAG_0 | UPDBGCHECKINFO_FLAG_2 | UPDBGCHECKINFO_FLAG_3 |
UPDBGCHECKINFO_FLAG_4);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ void func_808B43D0(BgSpot15Rrbox* this, PlayState* play) {
player->stateFlags2 &= ~PLAYER_STATE2_4;
}

Actor_MoveForward(actor);
Actor_MoveXZGravity(actor);

if (actor->world.pos.y <= BGCHECK_Y_MIN + 10.0f) {
// "Lon Lon wooden crate fell too much"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ void func_808B5B58(BgSpot16Bombstone* this) {
void func_808B5B6C(BgSpot16Bombstone* this, PlayState* play) {
Actor* actor = &this->actor;

Actor_MoveForward(actor);
Actor_MoveXZGravity(actor);
actor->shape.rot.x += this->unk_210;
actor->shape.rot.z += this->unk_212;

Expand Down
2 changes: 1 addition & 1 deletion src/overlays/actors/ovl_Bg_Spot18_Obj/z_bg_spot18_obj.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ void func_808B8F08(BgSpot18Obj* this, PlayState* play) {
Player* player = GET_PLAYER(play);

Math_StepToF(&this->dyna.actor.speed, 1.2f, 0.1f);
Actor_MoveForward(&this->dyna.actor);
Actor_MoveXZGravity(&this->dyna.actor);
func_808B8DDC(this, play);

if (Math3D_Dist2DSq(this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.z, this->dyna.actor.home.pos.x,
Expand Down
2 changes: 1 addition & 1 deletion src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c
Original file line number Diff line number Diff line change
Expand Up @@ -868,7 +868,7 @@ void BossDodongo_Update(Actor* thisx, PlayState* play2) {
thisx->shape.rot.y = thisx->world.rot.y;

Math_SmoothStepToF(&thisx->shape.yOffset, this->unk_228, 1.0f, 100.0f, 0.0f);
Actor_MoveForward(thisx);
Actor_MoveXZGravity(thisx);
BossDodongo_UpdateDamage(this, play);
Actor_UpdateBgCheckInfo(play, thisx, 10.0f, 10.0f, 20.0f, UPDBGCHECKINFO_FLAG_2);
Math_SmoothStepToF(&this->unk_208, 0, 1, 0.001f, 0.0);
Expand Down
Loading

0 comments on commit e37b993

Please sign in to comment.