|
|
 |
05-18-2006, 07:34 PM
|
#1
|
|
The Stig
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,242
Current Game: Borderlands 2
|
Regarding exploits to snaps and rate...
I would strongly urge all JKA coders to create a cvar and limit how low snaps and rate can go. default minsnaps to 10 and minrate to 1500. I've recently seen many people on JA+ betaServer abusing snaps 1 to make them "lag". It might also be wise to put a lower and upper limit on com_maxFPS of 30 and 130 because setting that below 30 is a cheat, and anything above 130 doesnt really matter hell, above 30 doesnt really either and anything above 200 can actually cause you to get connection interupted even if you dont have net lag.
Here's what i did:
g_local.h -
Code:
extern vmCvar_t sv_minSnaps;
extern vmCvar_t sv_minRate;
g_main.c -
Code:
vmCvar_t sv_minSnaps;
vmCvar_t sv_minRate;
...
Code:
{ &sv_minSnaps, "sv_minSnaps", "10", 0, 0, qfalse },
{ &sv_minRate, "sv_minRate", "1500", 0, 0, qfalse },
g_client.c -
ClientConnect below the ban check statement:
Code:
// check snaps
value = Info_ValueForKey( userinfo, "snaps" );
if ( sv_minSnaps.integer > 0 && atoi(value) < sv_minSnaps.integer ) {
return va("Your snaps is too low (%d). Minimum: %d.", atoi(value), sv_minSnaps.integer );
}
// check rate
value = Info_ValueForKey( userinfo, "rate" );
if ( sv_minRate.integer > 0 && atoi(value) < sv_minRate.integer ) {
return va("Your rate is too low (%d). Minimum: %d.", atoi(value), sv_minRate.integer );
}
ClientUserInfoChanged above the set name part:
Code:
// check snaps
s = Info_ValueForKey( userinfo, "snaps" );
if ( sv_minSnaps.integer > 0 && atoi(s) < sv_minSnaps.integer ) {
Info_SetValueForKey( userinfo, "snaps", va("%d", sv_minSnaps.integer) );
trap_SetUserinfo( clientNum, userinfo );
}
// check rate
s = Info_ValueForKey( userinfo, "rate" );
if ( sv_minRate.integer > 0 && atoi(s) < sv_minRate.integer ) {
Info_SetValueForKey( userinfo, "rate", va("%d", sv_minRate.integer) );
trap_SetUserinfo( clientNum, userinfo );
}
|
|
you may:
quote & reply,
|
05-18-2006, 09:57 PM
|
#2
|
Join Date: Apr 2002
Posts: 1,187
|
Alrighty, thanks for the heads up bro.
|
|
you may:
quote & reply,
|
05-19-2006, 01:50 PM
|
#3
|
|
The Stig
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,242
Current Game: Borderlands 2
|
no problem 
|
|
you may:
quote & reply,
|
05-20-2006, 09:22 AM
|
#4
|
|
Junior Member
Join Date: Dec 2003
Location: France
Posts: 260
|
what snaps does and what rate does?
rate is the number of frame per second?
or is it snaps?
also what this lags produced by changing their value gives to the player as advantages?
******************************
Slider
JA+ MOD Author for Jedi Academy
the lastest version on
http://www.japlus.net/
******************************
|
|
you may:
quote & reply,
|
05-20-2006, 12:57 PM
|
#5
|
|
Rookie
Join Date: Apr 2006
Posts: 52
|
snaps - specifies the ammount of packets that server sends to you
rate - specifies the number of bytes that the server can send to the you per second, you can thing of this like your maximum connection speed.
|
|
you may:
quote & reply,
|
05-20-2006, 01:01 PM
|
#6
|
|
Rookie
Join Date: Apr 2006
Posts: 52
|
btw the exploits you reffer iis just to get lagged and skip a lot of frames maybe to avoid contact?
|
|
you may:
quote & reply,
|
05-20-2006, 04:43 PM
|
#7
|
|
The Stig
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,242
Current Game: Borderlands 2
|
indeed.
rate is bits per second actually.
|
|
you may:
quote & reply,
|
05-21-2006, 10:30 AM
|
#8
|
|
Rookie
Join Date: Apr 2006
Posts: 52
|
oops lol you're right xD
|
|
you may:
quote & reply,
|
05-21-2006, 01:37 PM
|
#9
|
|
Rookie
Join Date: Feb 2006
Location: Trinidad
Posts: 201
|
Or if you want you can set it in your cfg
/snaps 40
/rate 25000
and heres another one that lowers ur ping by lowering ur packets
/cl_maxpackets 15
|
|
you may:
quote & reply,
|
05-21-2006, 03:41 PM
|
#10
|
|
The Stig
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,242
Current Game: Borderlands 2
|
15? the default is 30... try /cl_maxpackets 100.
|
|
you may:
quote & reply,
|
05-22-2006, 07:27 AM
|
#11
|
|
Rookie
Join Date: Feb 2006
Location: Trinidad
Posts: 201
|
Exactly. That's why you go to 15 so its lower, and 15 is the lowest you can go. 100 is ridiculous ur just having the opposite effect.
|
|
you may:
quote & reply,
|
05-22-2006, 01:22 PM
|
#12
|
|
The Stig
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,242
Current Game: Borderlands 2
|
no, you want it higher to allow more packets. i ping 18-25 on wild jedi with my connection settings. i live in minnesota and the server is in dallas, texas.
rate 25000
cl_maxpackets 100
cl_timenudge -40
snaps 40
|
|
you may:
quote & reply,
|
05-22-2006, 02:59 PM
|
#13
|
|
Rookie
Join Date: Feb 2006
Location: Trinidad
Posts: 201
|
When mine was at 30 I hada certain ping when I dropped it to 15 my ping became lower. I'll test out 100 and get back to you. 
|
|
you may:
quote & reply,
|
05-22-2006, 10:11 PM
|
#14
|
|
Rookie
Join Date: Sep 2003
Posts: 159
|
maybe this is a n00b question, but what is cl_timenudge?
|
|
you may:
quote & reply,
|
05-22-2006, 10:48 PM
|
#15
|
|
The Stig
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,242
Current Game: Borderlands 2
|
dont think it really helps in base but it does with Unlagged.
actually nvm it is affected, heres a comment from the q3 engine:
Code:
// cl_timeNudge is a user adjustable cvar that allows more
// or less latency to be added in the interest of better
// smoothness or better responsiveness.
|
|
you may:
quote & reply,
|
06-08-2006, 04:01 PM
|
#16
|
|
Impressive, Terran!
Join Date: May 2002
Posts: 9,153
|
If I read this correctly, doesn't this fix block users from connecting if their setting is weird? Wouldn't it be better to just correct the value and allow users to connect?
---Jedi Guardian of the Newbie Questions
---Masters of the Force Team Leader / Creator
---Open Jedi Project Lead Moderator / Co-Founder

|
|
you may:
quote & reply,
|
06-08-2006, 05:42 PM
|
#17
|
|
The Stig
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,242
Current Game: Borderlands 2
|
well i dunno, it seems as though it doesnt actually set it for some reason when i actually tested it 100% on a live server, maybe update wasnt called or smth i dunno.
|
|
you may:
quote & reply,
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Forum Jump
|
|
|
|
|
|