A simple SourceMod plugin that calculates the server FPS every second and when it goes under a certain threshold based off of the average FPS in x seconds, offers a forward on detection,
I've made this in hopes to mitigate damage on Elite Hunterz's Zombie Hunting server from poor performance issues when multiple players are stuck inside of each other.
- sm_fpsth_avgtime - Calculate the average FPS for x seconds (x representing the CVar value).
- sm_fpsth_threshold - If the average FPS goes below this average, call
FPSTH_OnDetect()
forward.
This plugin comes with one forward to allow other plugins to interact. The forward may be found below.
/**
* Called when the server is caught going under the average FPS threshold.
*
* @param avgfps The average FPS detected.
* @param curfps The current FPS detected.
*
* @return void
*/
forward void FPSTH_OnDetect(float avgfps, int curfps);
- Force Noblock - Forces Noblock on all players when average FPS goes under threshold.