Coding help

Locked
ShrapnelCity
Posts: 8
Joined: Mon May 30, 2005 3:05 pm

Coding help

Post by ShrapnelCity »

Does anyone here know what happened to the coding forum?

And do you know if cl_maxpackets is sent to the server (and how to do it if not)?
^misantropia^
Posts: 4022
Joined: Sat Mar 12, 2005 6:24 pm

Re: Coding help

Post by ^misantropia^ »

ShrapnelCity wrote:Does anyone here know what happened to the coding forum?
It got nuked because nobody posted in it IIRC.
ShrapnelCity wrote:And do you know if cl_maxpackets is sent to the server (and how to do it if not)?
No. You could wrap it in a configstring. Check CG_NewClientInfo in cg_players.c for an example.

PS: most of the remnants of the Q3A coding scene can be found over at the PlanetQuake forums.
ShrapnelCity
Posts: 8
Joined: Mon May 30, 2005 3:05 pm

Post by ShrapnelCity »

Ideally, I would pput it in the USERINFO config string, but there's no way for me to actually do taht :-(

And thanks for the link.
^misantropia^
Posts: 4022
Joined: Sat Mar 12, 2005 6:24 pm

Post by ^misantropia^ »

ShrapnelCity wrote:Ideally, I would pput it in the USERINFO config string, but there's no way for me to actually do taht :-(
That's what I meant but I should've been a bit clearer about it. Here you go, add this to CG_RegisterCvars in cg_main.c.

Code: Select all

char maxpackets[MAX_CVAR_VALUE_STRING];
trap_Cvar_VariableStringBuffer( "maxpackets", maxpackets, sizeof( maxpackets ) );
trap_Cvar_Register( NULL, "maxpackets", maxpackets, CVAR_USERINFO );
And pick it up in ClientUserinfoChanged in g_client.c (store it somewhere or whatever you want to do with it).
Locked