mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-23 07:21:19 +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:
parent
4a9873775c
commit
92e03cf747
171 changed files with 1771 additions and 1773 deletions
|
@ -201,7 +201,7 @@ void EnFirefly_Destroy(Actor* thisx, 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->targetPitch = ((this->maxAltitude < this->actor.world.pos.y) ? 0xC00 : -0xC00) + 0x1554;
|
||||
this->skelAnime.playSpeed = 1.0f;
|
||||
|
@ -220,7 +220,7 @@ void EnFirefly_SetupFall(EnFirefly* this) {
|
|||
|
||||
void EnFirefly_SetupDie(EnFirefly* this) {
|
||||
this->timer = 15;
|
||||
this->actor.speedXZ = 0.0f;
|
||||
this->actor.speed = 0.0f;
|
||||
this->actionFunc = EnFirefly_Die;
|
||||
}
|
||||
|
||||
|
@ -228,7 +228,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;
|
||||
}
|
||||
|
||||
|
@ -262,7 +262,7 @@ void EnFirefly_SetupFrozenFall(EnFirefly* this, PlayState* play) {
|
|||
|
||||
this->actor.flags |= ACTOR_FLAG_4;
|
||||
this->auraType = KEESE_AURA_NONE;
|
||||
this->actor.speedXZ = 0.0f;
|
||||
this->actor.speed = 0.0f;
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 255, COLORFILTER_BUFFLAG_OPA, 255);
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EN_FFLY_DEAD);
|
||||
|
||||
|
@ -279,7 +279,7 @@ void EnFirefly_SetupFrozenFall(EnFirefly* this, PlayState* play) {
|
|||
|
||||
void EnFirefly_SetupPerch(EnFirefly* this) {
|
||||
this->timer = 1;
|
||||
this->actor.speedXZ = 0.0f;
|
||||
this->actor.speed = 0.0f;
|
||||
this->actionFunc = EnFirefly_Perch;
|
||||
}
|
||||
|
||||
|
@ -287,7 +287,7 @@ void EnFirefly_SetupDisturbDiveAttack(EnFirefly* this) {
|
|||
this->skelAnime.playSpeed = 3.0f;
|
||||
this->actor.shape.rot.x = 0x1554;
|
||||
this->actor.shape.rot.y = this->actor.yawTowardsPlayer;
|
||||
this->actor.speedXZ = 3.0f;
|
||||
this->actor.speed = 3.0f;
|
||||
this->timer = 50;
|
||||
this->actionFunc = EnFirefly_DisturbDiveAttack;
|
||||
}
|
||||
|
@ -311,7 +311,7 @@ s32 EnFirefly_ReturnToPerch(EnFirefly* this, PlayState* play) {
|
|||
distFromHome *= 0.05f;
|
||||
|
||||
if (distFromHome < 1.0f) {
|
||||
this->actor.speedXZ *= distFromHome;
|
||||
this->actor.speed *= distFromHome;
|
||||
}
|
||||
|
||||
Math_ScaledStepToS(&this->actor.shape.rot.y, Actor_WorldYawTowardPoint(&this->actor, &this->actor.home.pos),
|
||||
|
@ -373,7 +373,7 @@ void EnFirefly_FlyIdle(EnFirefly* this, PlayState* play) {
|
|||
this->timer--;
|
||||
}
|
||||
skelanimeUpdated = 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 (this->onFire || (this->actor.params == KEESE_ICE_FLY) ||
|
||||
((EnFirefly_ReturnToPerch(this, play) == 0) && (EnFirefly_SeekTorch(this, play) == 0))) {
|
||||
if (skelanimeUpdated) {
|
||||
|
@ -421,7 +421,7 @@ void EnFirefly_Fall(EnFirefly* this, PlayState* play) {
|
|||
}
|
||||
this->actor.colorFilterTimer = 40;
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
Math_StepToF(&this->actor.speedXZ, 0.0f, 0.5f);
|
||||
Math_StepToF(&this->actor.speed, 0.0f, 0.5f);
|
||||
if (this->actor.flags & ACTOR_FLAG_15) {
|
||||
this->actor.colorFilterTimer = 40;
|
||||
} else {
|
||||
|
@ -457,7 +457,7 @@ void EnFirefly_DiveAttack(EnFirefly* this, PlayState* play) {
|
|||
if (this->timer != 0) {
|
||||
this->timer--;
|
||||
}
|
||||
Math_StepToF(&this->actor.speedXZ, 4.0f, 0.5f);
|
||||
Math_StepToF(&this->actor.speed, 4.0f, 0.5f);
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.wallYaw, 2, 0xC00, 0x300);
|
||||
Math_ScaledStepToS(&this->actor.shape.rot.x, this->targetPitch, 0x100);
|
||||
|
@ -497,7 +497,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--;
|
||||
}
|
||||
|
@ -518,7 +518,7 @@ void EnFirefly_FlyAway(EnFirefly* this, PlayState* play) {
|
|||
EnFirefly_SetupFlyIdle(this);
|
||||
return;
|
||||
}
|
||||
Math_StepToF(&this->actor.speedXZ, 3.0f, 0.3f);
|
||||
Math_StepToF(&this->actor.speed, 3.0f, 0.3f);
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
this->targetPitch = 0x954;
|
||||
} else if ((this->actor.bgCheckFlags & BGCHECKFLAG_CEILING) || (this->maxAltitude < this->actor.world.pos.y)) {
|
||||
|
@ -537,7 +537,7 @@ void EnFirefly_FlyAway(EnFirefly* this, PlayState* play) {
|
|||
|
||||
void EnFirefly_Stunned(EnFirefly* this, PlayState* play) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
Math_StepToF(&this->actor.speedXZ, 0.0f, 0.5f);
|
||||
Math_StepToF(&this->actor.speed, 0.0f, 0.5f);
|
||||
Math_ScaledStepToS(&this->actor.shape.rot.x, 0x1554, 0x100);
|
||||
if (this->timer != 0) {
|
||||
this->timer--;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue