1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-21 06:21:16 +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

@ -45,13 +45,13 @@ void func_80ACDDE8(EnPart* this, PlayState* play) {
this->actor.gravity = -0.3f - Rand_ZeroOne() * 0.5f;
this->rotZSpeed = 0.3f;
this->timer = 25;
this->actor.speedXZ = (Rand_ZeroOne() - 0.5f) * 2.0f;
this->actor.speed = (Rand_ZeroOne() - 0.5f) * 2.0f;
break;
case 13:
this->timer = 400;
FALLTHROUGH;
case 12:
this->actor.speedXZ = Rand_CenteredFloat(6.0f);
this->actor.speed = Rand_CenteredFloat(6.0f);
this->actor.home.pos = this->actor.world.pos;
this->timer += 60;
this->actor.velocity.y = Rand_ZeroOne() * 5.0f + 4.0f;
@ -76,7 +76,7 @@ void func_80ACDDE8(EnPart* this, PlayState* play) {
EffectSsEnFire_SpawnVec3f(play, &this->actor, &this->actor.world.pos, 40, 0x8001, 0, -1);
FALLTHROUGH;
case 3:
this->actor.speedXZ = (Rand_ZeroOne() - 0.5f) * 3.0f;
this->actor.speed = (Rand_ZeroOne() - 0.5f) * 3.0f;
this->timer = (s16)(Rand_ZeroOne() * 17.0f) + 10;
this->actor.velocity.y = Rand_ZeroOne() * 3.0f + 8.0f;
this->actor.gravity = -0.6f - Rand_ZeroOne() * 0.3f;
@ -91,7 +91,7 @@ void func_80ACDDE8(EnPart* this, PlayState* play) {
sign = -1.0f;
}
this->actor.velocity.y = 0.0f;
this->actor.speedXZ = 6.0f * sign;
this->actor.speed = 6.0f * sign;
this->actor.gravity = -1.2f;
this->rotZSpeed = 0.15f * sign;
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
@ -114,7 +114,7 @@ void func_80ACE13C(EnPart* this, PlayState* play) {
if ((this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) || (this->actor.world.pos.y <= this->actor.floorHeight)) {
this->action = 4;
this->actor.speedXZ = 0.0f;
this->actor.speed = 0.0f;
this->actor.gravity = 0.0f;
this->actor.velocity.y = 0.0f;
}
@ -252,7 +252,7 @@ void EnPart_Update(Actor* thisx, PlayState* play) {
if ((this->actor.params > 4 && this->actor.params < 9) || this->actor.params < 0) {
Actor_UpdateBgCheckInfo(play, &this->actor, 5.0f, 15.0f, 0.0f, UPDBGCHECKINFO_FLAG_0 | UPDBGCHECKINFO_FLAG_2);
if (this->actor.params >= 0) {
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 (thisx->bgCheckFlags & BGCHECKFLAG_GROUND) {
thisx->bgCheckFlags &= ~BGCHECKFLAG_GROUND;
thisx->velocity.y = 6.0f;