diff options
| author | engineer124 <47598039+engineer124@users.noreply.github.com> | 2024-12-01 23:55:50 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-01 07:55:50 -0500 |
| commit | 6199634ffb42872d053abb1502eb80474de4ae56 (patch) | |
| tree | 7c3dc31b0e32bba45547fe49a435006a54ec1ca6 /src | |
| parent | e0bd123312977aebd661dad0bf68924169f0c550 (diff) | |
Minor Cleanup (#2308)
* cleanup
* more
* fix floats
Diffstat (limited to 'src')
| -rw-r--r-- | src/overlays/actors/ovl_En_Torch2/z_en_torch2.c | 2 | ||||
| -rw-r--r-- | src/overlays/actors/ovl_player_actor/z_player.c | 13 |
2 files changed, 8 insertions, 7 deletions
diff --git a/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c b/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c index 6b0ba4cea..bef80ab31 100644 --- a/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c +++ b/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c @@ -618,7 +618,7 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) { } } this->actor.colChkInfo.damage = 0; - this->knockbackDamage = PLAYER_KNOCKBACK_NONE; + this->knockbackDamage = 0; } // Handles being frozen by a deku nut diff --git a/src/overlays/actors/ovl_player_actor/z_player.c b/src/overlays/actors/ovl_player_actor/z_player.c index 082f6ccfc..ceed64a30 100644 --- a/src/overlays/actors/ovl_player_actor/z_player.c +++ b/src/overlays/actors/ovl_player_actor/z_player.c @@ -7254,7 +7254,7 @@ s32 Player_HandleSlopes(PlayState* play, Player* this, CollisionPoly* floorPoly) if (sFloorShapePitch >= 0) { this->av1.facingUpSlope = true; } - Player_AnimChangeLoopMorph(play, this, sSlopeSlideAnims[this->av1.actionVar1]); + Player_AnimChangeLoopMorph(play, this, sSlopeSlideAnims[this->av1.facingUpSlope]); this->speedXZ = sqrtf(SQ(this->actor.velocity.x) + SQ(this->actor.velocity.z)); this->yaw = playerVelYaw; return true; @@ -14244,17 +14244,17 @@ void Player_Action_SlideOnSlope(Player* this, PlayState* play) { shapeYawTarget = downwardSlopeYaw + 0x8000; } - if (this->speedXZ < 0) { + if (this->speedXZ < 0.0f) { downwardSlopeYaw += 0x8000; } xzSpeedTarget = (1.0f - slopeNormal.y) * 40.0f; - xzSpeedTarget = CLAMP(xzSpeedTarget, 0, 10.0f); + xzSpeedTarget = CLAMP(xzSpeedTarget, 0.0f, 10.0f); xzSpeedIncrStep = SQ(xzSpeedTarget) * 0.015f; xzSpeedDecrStep = slopeNormal.y * 0.01f; if (SurfaceType_GetFloorEffect(&play->colCtx, floorPoly, this->actor.floorBgId) != FLOOR_EFFECT_1) { - xzSpeedTarget = 0; + xzSpeedTarget = 0.0f; xzSpeedDecrStep = slopeNormal.y * 10.0f; } @@ -14262,7 +14262,8 @@ void Player_Action_SlideOnSlope(Player* this, PlayState* play) { xzSpeedIncrStep = 1.0f; } - if (Math_AsymStepToF(&this->speedXZ, xzSpeedTarget, xzSpeedIncrStep, xzSpeedDecrStep) && (xzSpeedTarget == 0)) { + if (Math_AsymStepToF(&this->speedXZ, xzSpeedTarget, xzSpeedIncrStep, xzSpeedDecrStep) && + (xzSpeedTarget == 0.0f)) { LinkAnimationHeader* slideAnimation; if (!this->av1.facingUpSlope) { @@ -14315,7 +14316,7 @@ void Player_Action_BlueWarpArrive(Player* this, PlayState* play) { if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) { this->skelAnime.endFrame = this->skelAnime.animLength - 1.0f; Player_PlayLandingSfx(this); - this->av2.actionVar2 = 1; + this->av2.playedLandingSfx = true; } } else { if ((play->sceneId == SCENE_KOKIRI_FOREST) && Player_StartCsAction(play, this)) { |
