The design of BotF (like most games) causes it to consume 100% of CPU, even when it doesn't need to, e.g. you'll notice your CPU running at 100% even on the opening screen when the mouse is not moving. This patch limits BotF to use a certain percentage of CPU. This patch is more of a hack than anything. Use at your own risk!
Note this patch may impact performance, particularly in tactical combat, especially with a slow CPU or with really heavy mods.
You can check framerate in 3D by pressing T.
But if you're a laptop user with overheating problems, an ecowarrior, or perfectionist, I think you'll like it. I never play BotF without it!
Just change all these numbers to a number anywhere up to about 10 hex (16). Setting it higher than 10 hex may reduce performance.
Code: Select all
offset ======== == == 0x00182a 00 -> 10 0x00189c 00 -> 10 0x1154ae 01 -> 10 0x115526 10 -> 10 0x11747d 00 -> 10 0x1176d1 00 -> 10 0x1179e8 00 -> 10
BotF uses the Windows API command "sleep" to temporarily suspend execution of the program:
In most cases, BotF issues the sleep command for 0 milliseconds:MSDN wrote:Sleep(milliseconds) suspends the execution of the current thread until the time-out interval elapses.
This patch changes the milliseconds parameter. You can think of this as a framerate limiter.MSDN wrote:A value of zero causes the thread to relinquish the remainder of its time slice to any other thread that is ready to run. If there are no other threads ready to run, the function returns immediately, and the thread continues execution.
Edit: see later discussions on this issue -- it does actually reduce framerate.