Jump to content

Home

Regarding exploits to snaps and rate...


ensiform

Recommended Posts

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 -

 

extern vmCvar_t	sv_minSnaps;
extern vmCvar_t	sv_minRate;

 

g_main.c -

 

vmCvar_t	sv_minSnaps;
vmCvar_t	sv_minRate;

 

...

 

{ &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:

 

// 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:

 

// 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 );
}

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

dont think it really helps in base but it does with Unlagged.

 

actually nvm it is affected, heres a comment from the q3 engine:

 

// 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.

Link to comment
Share on other sites

  • 3 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...