mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-26 13:50:53 +00:00
Spike fixed so that MVDSV does not kick us for userinfo spamming.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2656 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
0c6e751778
commit
f099ce3e58
1 changed files with 14 additions and 10 deletions
|
@ -674,18 +674,22 @@ cvar_t *Cvar_SetCore (cvar_t *var, const char *value, qboolean force)
|
|||
#ifndef SERVERONLY
|
||||
if (var->flags & CVAR_USERINFO)
|
||||
{
|
||||
Info_SetValueForKey (cls.userinfo, var->name, value, MAX_INFO_STRING);
|
||||
if (cls.state >= ca_connected)
|
||||
{
|
||||
char *old = Info_ValueForKey(cls.userinfo, var->name);
|
||||
if (strcmp(old, value)) //only spam the server if it actually changed
|
||||
{ //this helps with config execs
|
||||
Info_SetValueForKey (cls.userinfo, var->name, value, MAX_INFO_STRING);
|
||||
if (cls.state >= ca_connected)
|
||||
{
|
||||
#ifdef Q2CLIENT
|
||||
if (cls.protocol == CP_QUAKE2 || cls.protocol == CP_QUAKE3) //q2 just resends the lot. Kinda bad...
|
||||
{
|
||||
cls.resendinfo = true;
|
||||
}
|
||||
else
|
||||
if (cls.protocol == CP_QUAKE2 || cls.protocol == CP_QUAKE3) //q2 just resends the lot. Kinda bad...
|
||||
{
|
||||
cls.resendinfo = true;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
CL_SendClientCommand(true, "setinfo \"%s\" \"%s\"\n", var->name, value);
|
||||
{
|
||||
CL_SendClientCommand(true, "setinfo \"%s\" \"%s\"\n", var->name, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue