ET Pro Cvar restriction system

ET Pro Documentation Project

Moderators: Forum moderators, developers, ET Pro Documentation

Post Reply
User avatar
Deus
Posts: 1053
Joined: Fri Mar 12, 2004 2:24 am
Location: Germany
Contact:

ET Pro Cvar restriction system

Post by Deus »

:!: This is only collected information from the original cvar restriction thread to have all important information close together.

The sv_cvar stuff is the new etpro cvar range enforcement mechanism. Its similar to PB's cvar range checking in that it uses nearly the same syntax. However it is different in that instead of simply warning the user that their cvars are out of range, it actually forces them to server-enforced values. This imo is better than having players scramble typing on the console trying to get their cvars into compliance before they get kicked 8)
<hr>Possibillities:
sv_cvar cvarname EQ value
sv_cvar cvarname GE value
sv_cvar cvarname LE value
sv_cvar cvarname WITHBITS bitflag
sv_cvar cvarname WITHOUTBITS bitflag
sv_cvar cvarname IN low_value high_value
sv_cvar cvarname OUT low_value high_value
sv_cvar cvarname INCLUDE substring default
sv_cvar cvarname EXCLUDE substring default
<hr>EQ

EQ requieres one argument
EQ is used when a cvar is supposed to EQual a certain value.
<hr>GE

GE requieres one argument
GE is used when a cvar is supposed to be Greater or Equal a certain value.
<hr>LE

LE requieres one argument
LE is used when a cvar is supposed to be Lower or Equal a certain value.
<hr>WITHBITS

WITHBITS requieres one argument
WITHBITS is used when a bitmask-cvar is supposed to include a certain bitflag
:!: For further information regarding bitmask-cvars look here
<hr>WITHOUTBITS

WITHOUTBITS requieres one argument
WITHOUTBITS is used when a bitmask-cvar is supposed to not include a certain bitflag
:!: For further information regarding bitmask-cvars look here
<hr>IN

IN requieres two arguments
With the IN enforcement, cvars that are non compliant are snapped to the nearest IN parameter.
Example: sv_cvar cg_fov IN 90 120
A player who had a cg_fov of 40 would see it snapped to 90.
A player who had a cg_fov of 130 would see it snapped to 120.
:!: 1st Argument = lower limit
:!: 2nd Argument = upper limit
<hr>OUT

OUT requieres two arguments
With the OUT enforcement, cvars that are non compliant are snapped to the nearest OUT parameter.
Example: sv_cvar m_pitch OUT -0.015 0.015
A player who had a m_pitch of -0.010 would see it snapped to -0.015.
A player who had an m_pitch of 0.04 would see it snapped to 0.015.
A player who had an m_pitch of 0.00 (a value equidistant from both lower and upper bounds) would be snapped to the lower bound -0.015.
:!: 1st Argument = lower limit
:!: 2nd Argument = upper limit
<hr>INCLUDE

INCLUDE requieres two arguments
INCLUDE is used when a cvar is supposed to include a certain substring. Otherwise it will set the cvar to default.
<hr>EXCLUDE

EXCLUDE requieres two arguments
EXCLUDE is used when a cvar is supposed to not include a certain substring. Otherwise it will set the cvar to default.
<hr>
:!: If a cvar is changed that needs a vid_restart, etpro will force a vid_restart on the client after snapping them into range.
User avatar
bani
Site Admin
Posts: 2780
Joined: Sun Jul 21, 2002 3:58 am
Contact:

Post by bani »

sv_floodprotect 0
sv_fps 20

these two are forced by etpro.

sv_floodprotect 0 is forced because etpro handles flood protection inside the mod now, instead of the engine (etpro has to do this for various etpro features to work).
sv_fps 20 is forced because various elements of the game are fps-dependent and break when its > 20.

these two cvars are serverside only though, and sv_cvar doesnt apply to them.
Post Reply