1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-22 15:01:17 +00:00

Rename yDistToWater -> depthInWater (#1950)

* Rename yDistToWater -> yDistUnderWater

* yDistUnderWater -> depthInWater
This commit is contained in:
cadmic 2024-04-28 14:29:06 -07:00 committed by GitHub
parent d4d7512cb6
commit b86e1774cf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
26 changed files with 112 additions and 112 deletions

View file

@ -152,7 +152,7 @@ void EnNy_Destroy(Actor* thisx, PlayState* play) {
void func_80ABCD40(EnNy* this) {
f32 temp;
temp = (this->actor.yDistToWater > 0.0f) ? 0.7f : 1.0f;
temp = (this->actor.depthInWater > 0.0f) ? 0.7f : 1.0f;
this->unk_1E8 = 2.8f * temp;
}
@ -224,7 +224,7 @@ void EnNy_Move(EnNy* this, PlayState* play) {
f32 yawDiff;
s32 stoneTimer;
if (!(this->unk_1F0 < this->actor.yDistToWater)) {
if (!(this->unk_1F0 < this->actor.depthInWater)) {
func_8002F974(&this->actor, NA_SE_EN_NYU_MOVE - SFX_FLAG);
}
func_80ABCD40(this);
@ -238,7 +238,7 @@ void EnNy_Move(EnNy* this, PlayState* play) {
this->actor.world.rot.y = this->actor.shape.rot.y;
yawDiff = Math_FAtan2F(this->actor.yDistToPlayer, this->actor.xzDistToPlayer);
this->actor.speed = fabsf(cosf(yawDiff) * this->unk_1E8);
if (this->unk_1F0 < this->actor.yDistToWater) {
if (this->unk_1F0 < this->actor.depthInWater) {
this->unk_1EC = sinf(yawDiff) * this->unk_1E8;
}
}
@ -252,7 +252,7 @@ void EnNy_TurnToStone(EnNy* this, PlayState* play) {
if (phi_f0 <= 0.25f) {
phi_f0 = 0.25f;
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH) {
if (!(this->unk_1F0 < this->actor.yDistToWater)) {
if (!(this->unk_1F0 < this->actor.depthInWater)) {
Actor_PlaySfx(&this->actor, NA_SE_EN_DODO_M_GND);
}
this->actor.bgCheckFlags &= ~BGCHECKFLAG_GROUND_TOUCH;
@ -346,9 +346,9 @@ s32 EnNy_CollisionCheck(EnNy* this, PlayState* play) {
void func_80ABD3B8(EnNy* this, f32 arg1, f32 arg2) {
if (this->unk_1E8 == 0.0f) {
this->actor.gravity = -0.4f;
} else if (!(arg1 < this->actor.yDistToWater)) {
} else if (!(arg1 < this->actor.depthInWater)) {
this->actor.gravity = -0.4f;
} else if (arg2 < this->actor.yDistToWater) {
} else if (arg2 < this->actor.depthInWater) {
this->actor.gravity = 0.0;
if (this->unk_1EC < this->actor.velocity.y) {
this->actor.velocity.y -= 0.4f;
@ -418,7 +418,7 @@ void EnNy_SetupDie(EnNy* this, PlayState* play) {
Vec3f effectAccel = { 0.0f, 0.1f, 0.0f };
if (this->timer >= 2) {
if (this->actor.yDistToWater > 0.0f) {
if (this->actor.depthInWater > 0.0f) {
for (i = 0; i < 10; i++) {
effectPos.x = Rand_CenteredFloat(30.0f) + this->actor.world.pos.x;
effectPos.y = Rand_CenteredFloat(30.0f) + this->actor.world.pos.y;
@ -453,7 +453,7 @@ void EnNy_SetupDie(EnNy* this, PlayState* play) {
void EnNy_Die(EnNy* this, PlayState* play) {
s32 i;
if (this->actor.yDistToWater > 0.0f) {
if (this->actor.depthInWater > 0.0f) {
for (i = 0; i < 8; i += 1) {
this->unk_1F8[i].x += this->unk_1F8[i + 8].x;
this->unk_1F8[i].y += this->unk_1F8[i + 8].y;