diff options
Diffstat (limited to 'src/code/z_player_lib.c')
| -rw-r--r-- | src/code/z_player_lib.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/code/z_player_lib.c b/src/code/z_player_lib.c index 2c0a79d21..2e2d2222d 100644 --- a/src/code/z_player_lib.c +++ b/src/code/z_player_lib.c @@ -1540,10 +1540,8 @@ void Player_UpdateBunnyEars(Player* player) { sBunnyEarKinematics.angVel.y += -sBunnyEarKinematics.rot.y >> 2; angle = player->actor.world.rot.y - player->actor.shape.rot.y; - force.x = - (s32)(player->actor.speed * -200.0f * Math_CosS(angle) * (randPlusMinusPoint5Scaled(2.0f) + 10.0f)) & 0xFFFF; - force.y = - (s32)(player->actor.speed * 100.0f * Math_SinS(angle) * (randPlusMinusPoint5Scaled(2.0f) + 10.0f)) & 0xFFFF; + force.x = (s32)(player->actor.speed * -200.0f * Math_CosS(angle) * (Rand_CenteredFloat(2.0f) + 10.0f)) & 0xFFFF; + force.y = (s32)(player->actor.speed * 100.0f * Math_SinS(angle) * (Rand_CenteredFloat(2.0f) + 10.0f)) & 0xFFFF; sBunnyEarKinematics.angVel.x += force.x >> 2; sBunnyEarKinematics.angVel.y += force.y >> 2; @@ -1801,7 +1799,7 @@ void Player_AdjustSingleLeg(PlayState* play, Player* player, SkelAnime* skelAnim temp_f20 = sp74 - SQ(sp58); temp_f20 = (temp_f20 < 0.0f) ? 0.0f : sqrtf(temp_f20); - sp4C = func_80086B30(temp_f20, sp58); + sp4C = Math_FAtan2F(temp_f20, sp58); distance = sqrtf(SQ(diffX) + SQ(yIntersect - sp90.y) + SQ(diffZ)); sp58 = (SQ(distance) + sp70) / (2.0f * distance); sp54 = distance - sp58; @@ -1809,8 +1807,8 @@ void Player_AdjustSingleLeg(PlayState* play, Player* player, SkelAnime* skelAnim temp_f20 = sp74 - SQ(sp58); temp_f20 = (temp_f20 < 0.0f) ? 0.0f : sqrtf(temp_f20); - sp48 = func_80086B30(temp_f20, sp58); - phi_t1 = (M_PI - (func_80086B30(sp54, temp_f20) + ((M_PI / 2.0f) - sp48))) * (0x8000 / M_PI); + sp48 = Math_FAtan2F(temp_f20, sp58); + phi_t1 = (M_PI - (Math_FAtan2F(sp54, temp_f20) + ((M_PI / 2.0f) - sp48))) * (0x8000 / M_PI); phi_t1 = -skelAnime->jointTable[shinLimbIndex].z + phi_t1; temp_f8 = (sp48 - sp4C) * (0x8000 / M_PI); |
