Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Cleanup of ease functions operations. #1354
Issue found with PVS-Studio:
Many instances of a variable being modified inside of a complex operation. This could lead to unintended results depending on the whims of the compiler.
Resolved by restructuring the functions to modify the variable first, then do the rest of the operation.
Also some minor reformatting to be more code-style compliant.
Btw, best way I found to test this is to load a mission and select the level info. it's ambient light setting uses an ease curve. Open that editor up, and go through the various curve options(I took screencaps of each).
Then implement the fixes, and go back and compare them to the prior results. Everything matched up to the unmodified to me, and I believe Az confirmed as well.