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
26 changed files with 112 additions and 112 deletions
+4 -4
View File
@@ -1358,8 +1358,8 @@ void Actor_UpdateBgCheckInfo(PlayState* play, Actor* actor, f32 wallCheckHeight,
waterBoxYSurface = actor->world.pos.y;
if (WaterBox_GetSurface1(play, &play->colCtx, actor->world.pos.x, actor->world.pos.z, &waterBoxYSurface,
&waterBox)) {
actor->yDistToWater = waterBoxYSurface - actor->world.pos.y;
if (actor->yDistToWater < 0.0f) {
actor->depthInWater = waterBoxYSurface - actor->world.pos.y;
if (actor->depthInWater < 0.0f) {
actor->bgCheckFlags &= ~(BGCHECKFLAG_WATER | BGCHECKFLAG_WATER_TOUCH);
} else {
if (!(actor->bgCheckFlags & BGCHECKFLAG_WATER)) {
@@ -1379,7 +1379,7 @@ void Actor_UpdateBgCheckInfo(PlayState* play, Actor* actor, f32 wallCheckHeight,
}
} else {
actor->bgCheckFlags &= ~(BGCHECKFLAG_WATER | BGCHECKFLAG_WATER_TOUCH);
actor->yDistToWater = BGCHECK_Y_MIN;
actor->depthInWater = BGCHECK_Y_MIN;
}
}
}
@@ -1835,7 +1835,7 @@ void func_8002F850(PlayState* play, Actor* actor) {
s32 surfaceSfxOffset;
if (actor->bgCheckFlags & BGCHECKFLAG_WATER) {
if (actor->yDistToWater < 20.0f) {
if (actor->depthInWater < 20.0f) {
surfaceSfxOffset = SURFACE_SFX_OFFSET_WATER_SHALLOW;
} else {
surfaceSfxOffset = SURFACE_SFX_OFFSET_WATER_DEEP;