cvar restrictions
Moderators: Forum moderators, developers, ET Pro Documentation
All about sv_cvar, the new etpro range enforcement mechanism
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
There is no sv_cvar INCLUDE, as there really is no sensible way force the value on the client. There is also no sv_cvar EXCLUDE, for the same reason.
Instead of "pb_sv_cvar cl_timenudge IN 0" you use EQ, eg "sv_cvar cl_timenudge EQ 0".
With the IN enforcement, cvars that are non compliant are snapped to the nearest IN parameter. Eg with '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.
With the OUT enforcement, cvars that are non compliant are snapped to the nearest OUT parameter. Eg with '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, eg a value equidistant from both lower and upper bounds would be snapped to the lower bound -0.015.
For both IN and OUT enforcement, the parameters must be low value first, high value second.
There are also GE and LE for 'greater than or equal' and 'less than or equal' enforcement respectively.
There is no sv_cvar INCLUDE, as there really is no sensible way force the value on the client. There is also no sv_cvar EXCLUDE, for the same reason.
Instead of "pb_sv_cvar cl_timenudge IN 0" you use EQ, eg "sv_cvar cl_timenudge EQ 0".
With the IN enforcement, cvars that are non compliant are snapped to the nearest IN parameter. Eg with '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.
With the OUT enforcement, cvars that are non compliant are snapped to the nearest OUT parameter. Eg with '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, eg a value equidistant from both lower and upper bounds would be snapped to the lower bound -0.015.
For both IN and OUT enforcement, the parameters must be low value first, high value second.
There are also GE and LE for 'greater than or equal' and 'less than or equal' enforcement respectively.
some Q:
will this be mentioned to players when a cvar is changed?
will there a changed cvar only go for the server you are playing on or will it remain for every etpro server afterwards?
eg, suppose i have gamma 2, the new system forces me to have 1.8 on one server, will the next server give me 1.8 too?
will this be mentioned to players when a cvar is changed?
will there a changed cvar only go for the server you are playing on or will it remain for every etpro server afterwards?
eg, suppose i have gamma 2, the new system forces me to have 1.8 on one server, will the next server give me 1.8 too?
yespack wrote:some Q:
will this be mentioned to players when a cvar is changed?
nopack wrote:will there a changed cvar only go for the server you are playing on or will it remain for every etpro server afterwards?
eg, suppose i have gamma 2, the new system forces me to have 1.8 on one server, will the next server give me 1.8 too?
Bani,
I have a question about enforcing cvars to certain values. There are several cvars which are really updated after changing them only after a restart of the engine (vid_restart etc.), like many r_... settings and timenudge. How will be ensured that an enforced cvar is actually in effect? Will the client then be enforced to restart the engine as well in that case?
I have a question about enforcing cvars to certain values. There are several cvars which are really updated after changing them only after a restart of the engine (vid_restart etc.), like many r_... settings and timenudge. How will be ensured that an enforced cvar is actually in effect? Will the client then be enforced to restart the engine as well in that case?
timenudge is delayed by etpro but takes effect without a vid_restart.*BiO*Tron wrote:Bani,
I have a question about enforcing cvars to certain values. There are several cvars which are really updated after changing them only after a restart of the engine (vid_restart etc.), like many r_... settings and timenudge. How will be ensured that an enforced cvar is actually in effect? Will the client then be enforced to restart the engine as well in that case?
other cvars which require vid_restart, etpro will force a vid_restart on the client after snapping them into range.
its all automagic
- =FF=im2good4u
- Posts: 3821
- Joined: Wed Feb 05, 2003 7:30 am
- Location: The Netherlands, HOLLAND
- Contact:
dont oyu got the engine ?bani wrote:r_wolffog is probably being checked by pb, it doesnt seem to care about r_drawfoliage.
we can't change wolffog as its hardcoded into the engine.
<a href="http://bunnyherolabs.com/adopt/showpet. ... dQ=="><img src="http://petimage.bunnyherolabs.com/adopt ... Q0dQ==.png" width="80" height="100" border="0"></a>