Intro
This plugin sets proper rates for each connected client:
Quote:
cl_updaterate
cl_cmdrate
cl_cmdbackup
rate
ex_interp
|
There are many ex_interp.amxx or rates.amxx plugins out there, but I found all of them not doing proper job. The clue is to truly understand relation between ex_interp, cl_updaterate and sv_min/maxupdaterate.
Install guide
1. Download ex_interp_complete.amxx to plugins/ dir
2. Add line "ex_interp_complete.amxx" (without quotes) in configs/plugins.ini
3. Set 2 cvars (you can do it in server.cfg or in amxx.cfg)
Quote:
sv_minupdaterate (recommended 30-50)
sv_maxupdaterate (recommended 100)
|
[ OPTIONAL ]
4. You can set these cvars, but do it only if you really understand rates in HL games:
Quote:
amx_rate (default 25000)
amx_cl_cmdrate (default 100)
amx_cl_cmdbackup (default 2)
|
Description
Most important thing about setting server rates are 2 cvars sv_minupdaterate and sv_maxupdaterate. If unset they default to 10 and 30 respectively. Admins often forget it and force something like:
Quote:
cl_updaterate 101
ex_interp 0.01
|
Total nonsense.. Real cl_updaterate is 30 (due to sv_maxupdaterate), i.e. a packet each 33ms while models can be interpolated for only 10ms (due to ex_interp). Models must flicker...
My plugin forces each client's cl_updaterate to be between sv_minupdaterate and sv_maxupdaterate. Then it sets ex_interp 0.01 which is recalculated by client to match actual cl_updaterate.
It also forces rate, cl_cmdrate, cl_cmdbackup (set by cvars, see above). Forcing high (unlimited) rate is necessary, because if an admin wants sv_minupdaterate to be 50 (e.g. me) then default rate of 2500 would be insufficient - big choke. The only way a client can control his rate is setting the cl_updaterate cvar - of course it must fit in the bounderies that admin allows.
The same behavior can be achieved by properly using cvarguard plugin, but there are 2 drawbacks:
1. It requires clever and complex configuration
2. It uses cvar_query mechanism - it's slow, generates traffic and doesn't work on old HL engines (I know people who still use it..)
ex_interp vs cl_updaterate
I said above that ex_interp is calculated from cl_updaterate. The formula is:
ex_interp = 1 / cl_updaterate
Quote:
cl_updaterate 10 => ex_interp 0.1
cl_updaterate 20 => ex_interp 0.05
cl_updaterate 30 => ex_interp 0.033
cl_updaterate 50 => ex_interp 0.02
cl_updaterate 100 => ex_interp 0.01
|
So if you want to force ex_interp 0.01 you need to set:
Quote:
sv_minupdaterate 100
sv_maxupdaterate 100
|
(not recommanded - clients with slow connection will lag)