Flayra/NS2-Scripts — pull request #12 by matso (2011-10-12 17:28:21+00:00)
Title: Add ROF compensation

The rifle has a high ROF (18) which makes it sensitive to client fps. If your pfs is lower than 18, then that's your maximum rof.

This wouldn't be too bad (< 18 ROF are not playable anyhow), but it turns out that due to using a fixed delay from the current time rather than from when the last shot delay ended, the actual ROF is 15-25% lower than 18. Depending on your rig, effective ROF was measuerd at 14.5 to 16.

This patch calculates the dealy using the time when the last shot was fired, thus ensuring a steady 18 ROF as long as the average FPS > 18 during the time you fire.

In addition, I needed a way to artificially load the server and client to vary their tickrate. I've left that code in, because I belive it can be handy.

It adds a clientdelay and serverdelay command that are available if cheats are on.