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,6 +674,9 @@ cvar_t *Cvar_SetCore (cvar_t *var, const char *value, qboolean force)
|
||||||
#ifndef SERVERONLY
|
#ifndef SERVERONLY
|
||||||
if (var->flags & CVAR_USERINFO)
|
if (var->flags & CVAR_USERINFO)
|
||||||
{
|
{
|
||||||
|
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);
|
Info_SetValueForKey (cls.userinfo, var->name, value, MAX_INFO_STRING);
|
||||||
if (cls.state >= ca_connected)
|
if (cls.state >= ca_connected)
|
||||||
{
|
{
|
||||||
|
@ -689,6 +692,7 @@ cvar_t *Cvar_SetCore (cvar_t *var, const char *value, qboolean force)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
latch = var->string;//save off the old value (so cvar_set(var, var->string) works)
|
latch = var->string;//save off the old value (so cvar_set(var, var->string) works)
|
||||||
|
|
Loading…
Reference in a new issue