diff options
| author | engineer124 <47598039+engineer124@users.noreply.github.com> | 2023-06-06 12:16:34 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-05 22:16:34 -0400 |
| commit | 7f5087d0b2014dc1ba2bbfc7ce858f0059a8a7cb (patch) | |
| tree | a56edb9e5d173d9e24bdce4a373e9fe38253cb34 /src/code/z_player_lib.c | |
| parent | f92a61db27ed8ee213072df11169777c6794bc1b (diff) | |
sys_math.c Rename (#1258)
* rename via comments
* missed a comment
* math header
* name boot_80086760.c functions
* PR Review
* rm cam comment
* Elliptic review
* alphabetical
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); |
