mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-10 07:12:07 +00:00
game: fix configstring convert before connection creation
This commit is contained in:
parent
eb566c3b70
commit
d87b1b512d
1 changed files with 11 additions and 6 deletions
|
@ -196,18 +196,23 @@ PF_setmodel(edict_t *ent, const char *name)
|
|||
static void
|
||||
PF_Configstring(int index, const char *val)
|
||||
{
|
||||
if ((index < 0) || (index >= MAX_CONFIGSTRINGS))
|
||||
{
|
||||
Com_Error(ERR_DROP, "configstring: bad index %i\n", index);
|
||||
}
|
||||
|
||||
if (!val)
|
||||
{
|
||||
val = "";
|
||||
}
|
||||
|
||||
if (sv_client)
|
||||
{
|
||||
index = P_ConvertConfigStringFrom(index, sv_client->protocol);
|
||||
}
|
||||
|
||||
if ((index < 0) || (index >= MAX_CONFIGSTRINGS))
|
||||
{
|
||||
Com_Error(ERR_DROP, "configstring: bad index %i\n", index);
|
||||
}
|
||||
|
||||
/* change the string in sv */
|
||||
strcpy(sv.configstrings[P_ConvertConfigStringFrom(index, sv_client->protocol)], val);
|
||||
strcpy(sv.configstrings[index], val);
|
||||
|
||||
if (sv.state != ss_loading)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue