- SW: Remove random element from player's weapon left/right bobbing causing bob value to be between 24-48 and lock to 36.

This commit is contained in:
Mitchell Richters 2020-08-19 14:54:31 +10:00 committed by Christoph Oelckers
parent 88a49b0d22
commit 50793184ee

View file

@ -6808,12 +6808,8 @@ pWeaponBob(PANEL_SPRITEp psp, short condition)
// sin_xxx moves the weapon left-right
// //
// increment the ndx into the sin table
psp->sin_ndx = psp->sin_ndx + (synctics << 3);
// add a random factor to it
psp->sin_ndx += (RANDOM_P2(8) * synctics);
// wrap
psp->sin_ndx &= 2047;
// increment the ndx into the sin table and wrap.
psp->sin_ndx = (psp->sin_ndx + (synctics * 12)) & 2047;
// get height
xdiff = psp->sin_amt * calcSinTableValue(psp->sin_ndx) / 16384.;