Add support for framerates that require higher resolution than 1ms.
UT2004's original timers caused framerates to vary wildly due to their low resolution. Now you can maintain any desired framerate.
Fix the framerate limiting algorithm.
UT2004 performed additional operations after limiting your framerate, resulting in a reported framerate less than MaxClientFrameRate. The limit is now applied after those operations to provide a more stable fps.
NOTE: You may notice that single player no longer hits up to 1000 fps. This was a misleading metric, as it only occurs when there are no OS events to process. The counter now reports an accurate fps.
It works very well! My FPS is very stable now.
*note* if you have the Steam version of the game it was already patched by Valve to work with Steam, so if you apply this patch you'll no longer have Steam integration. It's not a big deal though.
Ok, I just checked, nothing in AntiTCC logs for this. If it were an issue I think it would have been complaining about my Steam patched version for a while now.
Microsoft broke the timers in Win10+. sleep(1) doesn't actually sleep for 1ms anymore, so it broke UT fps stability. This patch fixes that. It doesn't use sleep(1) anymore in the engine.