From 6b66a958d00eb5d89b3bad0a78739f96d38a92fa Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Sun, 22 Nov 2020 21:23:08 +1100 Subject: [PATCH] - buildutils: Replace `calcSinTableValue()` use within Exhumed with `bsinf()`/`bcosf()`. --- source/exhumed/src/gun.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/exhumed/src/gun.cpp b/source/exhumed/src/gun.cpp index 613981525..503596920 100644 --- a/source/exhumed/src/gun.cpp +++ b/source/exhumed/src/gun.cpp @@ -962,8 +962,8 @@ void DrawWeapons(double smooth) { // CHECKME - not & 0x7FF? double nBobAngle = obobangle + fmulscale16(((bobangle + 1024 - obobangle) & 2047) - 1024, smooth); - double nVal = (ototalvel[nLocalPlayer] + fmulscale16(totalvel[nLocalPlayer] - ototalvel[nLocalPlayer], smooth)) / 2.; - yOffset = (nVal * (calcSinTableValue(fmod(nBobAngle, 1024)) / 256.)) / 512.; + double nVal = (ototalvel[nLocalPlayer] + fmulscale16(totalvel[nLocalPlayer] - ototalvel[nLocalPlayer], smooth)) * 0.5; + yOffset = fmulscale9(nVal, bsinf(fmod(nBobAngle, 1024.), -8)); if (var_34 == 1) {