1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-22 06:52:03 +00:00

speedXZ -> speed (#1477)

* speedXZ -> speed

* +=

* revert arg in player function

* anon review

* engineer review

* forgot one

* last review

* revert decimal
This commit is contained in:
fig02 2022-12-24 12:18:57 -05:00 committed by GitHub
parent 4a9873775c
commit 92e03cf747
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
171 changed files with 1771 additions and 1773 deletions

View file

@ -50,8 +50,8 @@ void EnBird_Init(Actor* thisx, PlayState* play) {
this->timer = 0;
this->rotYStep = 2500;
this->actor.colChkInfo.mass = 0;
this->speedXZTarget = 1.5f;
this->speedXZStep = 0.5f;
this->speedTarget = 1.5f;
this->speedStep = 0.5f;
this->posYMag = 0.0f;
this->rotYMag = 0.0f;
this->posYPhaseStep = 0.0f;
@ -74,10 +74,10 @@ void EnBird_SetupIdle(EnBird* this, s16 params) {
void EnBird_Idle(EnBird* this, PlayState* play) {
this->actor.shape.yOffset += sinf(this->posYPhase) * this->posYMag;
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);
if (this->scaleAnimSpeed) {
this->skelAnime.playSpeed = this->actor.speedXZ * 2.0f;
this->skelAnime.playSpeed = this->actor.speed * 2.0f;
}
SkelAnime_Update(&this->skelAnime);
@ -95,7 +95,7 @@ void EnBird_SetupMove(EnBird* this, s16 params) {
void EnBird_Move(EnBird* this, PlayState* play) {
this->actor.shape.yOffset += sinf(this->posYPhase) * this->posYMag;
Math_SmoothStepToF(&this->actor.speedXZ, this->speedXZTarget, 0.1f, this->speedXZStep, 0.0f);
Math_SmoothStepToF(&this->actor.speed, this->speedTarget, 0.1f, this->speedStep, 0.0f);
if (this->flightDistance < Math_Vec3f_DistXZ(&this->actor.world.pos, &this->actor.home.pos) || this->timer < 4) {
Math_StepToAngleS(&this->actor.world.rot.y, Math_Vec3f_Yaw(&this->actor.world.pos, &this->actor.home.pos),

View file

@ -17,8 +17,8 @@ typedef struct EnBird {
/* 0x019C */ s16 scaleAnimSpeed; // when true, anim speed scales with XZ speed while slowing down. otherwise anim plays full speed
/* 0x01A0 */ f32 posYMag;
/* 0x01A4 */ f32 rotYMag;
/* 0x01A8 */ f32 speedXZTarget;
/* 0x01AC */ f32 speedXZStep;
/* 0x01A8 */ f32 speedTarget;
/* 0x01AC */ f32 speedStep;
/* 0x01B0 */ f32 flightDistance; // radius of "home" area
/* 0x01B4 */ f32 posYPhase;
/* 0x01B8 */ f32 posYPhaseStep;