FPS-Threshold

Creates a forward for when the average server FPS goes under a threshold.

Stars
11

FPS Threshold

Description

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.

ConVars

  • 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.

Forwards

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);

Useful Plugins

  • Force Noblock - Forces Noblock on all players when average FPS goes under threshold.

Credits