diff --git a/source/games/duke/src/sectors.cpp b/source/games/duke/src/sectors.cpp index 2bf2f8903..9ab647c4b 100644 --- a/source/games/duke/src/sectors.cpp +++ b/source/games/duke/src/sectors.cpp @@ -1255,8 +1255,8 @@ void moveclouds(double smoothratio) cloudclock = myclock + 6; // 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); - cloudy += (sintable[ps[screenpeek].angle.ang.asbuild() & 2047] >> 9); + cloudx += ps[screenpeek].angle.ang.bcos(-9); + cloudy += ps[screenpeek].angle.ang.bsin(-9); for (int i = 0; i < numclouds; i++) { sector[clouds[i]].ceilingxpanning = cloudx >> 6;