cvar restrictions

ET Pro Documentation Project

Moderators: Forum moderators, developers, ET Pro Documentation

User avatar
bani
Site Admin
Posts: 2780
Joined: Sun Jul 21, 2002 3:58 am
Contact:

All about sv_cvar, the new etpro range enforcement mechanism

Post by bani »

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)

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.
pack
Posts: 22
Joined: Sun Dec 14, 2003 1:42 pm

Post by pack »

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?
User avatar
bani
Site Admin
Posts: 2780
Joined: Sun Jul 21, 2002 3:58 am
Contact:

Post by bani »

pack wrote:some Q:

will this be mentioned to players when a cvar is changed?
yes
pack 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?
no
*BiO*Tron
Posts: 56
Joined: Sat Dec 13, 2003 1:37 pm
Location: Germany
Contact:

Post by *BiO*Tron »

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?
User avatar
bani
Site Admin
Posts: 2780
Joined: Sun Jul 21, 2002 3:58 am
Contact:

Post by bani »

*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?
timenudge is delayed by etpro but takes effect without a vid_restart.

other cvars which require vid_restart, etpro will force a vid_restart on the client after snapping them into range.

its all automagic 8)
User avatar
gwg.Redef
Posts: 43
Joined: Sat Dec 13, 2003 4:10 am
Contact:

Post by gwg.Redef »

r_drawfoliage 0 and r_wolffog 0 are both cheat protected.
Workaround?
#rtcw.no:ET and #rtcw.no @ Qnet
User avatar
bani
Site Admin
Posts: 2780
Joined: Sun Jul 21, 2002 3:58 am
Contact:

Post by bani »

the server forces them anyway. i dont know how pb will react to r_wolffog 0 though.
User avatar
gwg.Redef
Posts: 43
Joined: Sat Dec 13, 2003 4:10 am
Contact:

Post by gwg.Redef »

bani wrote:the server forces them anyway.
This will only work with your new ETpro, and not 2.0.7?
#rtcw.no:ET and #rtcw.no @ Qnet
User avatar
bani
Site Admin
Posts: 2780
Joined: Sun Jul 21, 2002 3:58 am
Contact:

Post by bani »

you can force with forcecvar on 2.0.7 though players can always change the values back, in the next etpro youll be able to force even cheat protected cvars to specific values and the server will enforce them so players cant change the values.

again, no idea how pb will react to that though :?
User avatar
gwg.Redef
Posts: 43
Joined: Sat Dec 13, 2003 4:10 am
Contact:

Post by gwg.Redef »

I tried to email evenbalance about it. No answer yet. They prob wont know either though
#rtcw.no:ET and #rtcw.no @ Qnet
User avatar
gwg.Redef
Posts: 43
Joined: Sat Dec 13, 2003 4:10 am
Contact:

Post by gwg.Redef »

Well I tried both forcecvar r_drawfoliage 0 and forcecvar r_wolffog 0 on our server, and PB kicks me after a few warnings.

I guess PB will behave likewise under ETPro 2.1 :?
#rtcw.no:ET and #rtcw.no @ Qnet
Eutha
Posts: 5
Joined: Tue Dec 09, 2003 11:31 pm

Post by Eutha »

Would it be possible via etpro to change wolffog to be just write protected and not cheat protected? I suppose those declarations are somewhere in the code not in PB and PB just kicks if you mess with cheat protected cvars.
User avatar
bani
Site Admin
Posts: 2780
Joined: Sun Jul 21, 2002 3:58 am
Contact:

Post by bani »

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.
User avatar
=FF=im2good4u
Posts: 3821
Joined: Wed Feb 05, 2003 7:30 am
Location: The Netherlands, HOLLAND
Contact:

Post by =FF=im2good4u »

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.
dont oyu got the engine ?
User avatar
gotenks
Posts: 3465
Joined: Fri Nov 15, 2002 4:12 pm
Location: out of my mind
Contact:

Post by gotenks »

that'd be a seperate download to get that
My Website
Image
After a night of binge drinking:
=FF=im2good4u wrote:WTF wanst i on top ?
Post Reply