- buildutils: Replace sintable[] use within Duke's sectors.cpp with bsin()/bcos().

This commit is contained in:
Mitchell Richters 2020-11-15 15:15:30 +11:00 committed by Christoph Oelckers
parent 410c2cf41f
commit 6ccf925429

View file

@ -1255,8 +1255,8 @@ void moveclouds(double smoothratio)
cloudclock = myclock + 6; cloudclock = myclock + 6;
// cloudx/y were an array, but all entries were always having the same value so a single pair is enough. // cloudx/y were an array, but all entries were always having the same value so a single pair is enough.
cloudx += (sintable[(ps[screenpeek].angle.ang.asbuild() + 512) & 2047] >> 9); cloudx += ps[screenpeek].angle.ang.bcos(-9);
cloudy += (sintable[ps[screenpeek].angle.ang.asbuild() & 2047] >> 9); cloudy += ps[screenpeek].angle.ang.bsin(-9);
for (int i = 0; i < numclouds; i++) for (int i = 0; i < numclouds; i++)
{ {
sector[clouds[i]].ceilingxpanning = cloudx >> 6; sector[clouds[i]].ceilingxpanning = cloudx >> 6;