Fixed some nq server issues

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1537 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2005-10-23 17:57:20 +00:00
parent 146e8a253f
commit f7d90f4a0a
2 changed files with 89 additions and 68 deletions

View file

@ -8,7 +8,7 @@ of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details. See the GNU General Public License for more details.
@ -142,7 +142,7 @@ void VARGS Con_Printf (const char *fmt, ...)
va_start (argptr,fmt); va_start (argptr,fmt);
_vsnprintf (msg,sizeof(msg)-1, fmt,argptr); _vsnprintf (msg,sizeof(msg)-1, fmt,argptr);
va_end (argptr); va_end (argptr);
// add to redirected message // add to redirected message
if (sv_redirected) if (sv_redirected)
{ {
@ -169,7 +169,7 @@ void Con_TPrintf (translation_t stringnum, ...)
va_start (argptr,stringnum); va_start (argptr,stringnum);
_vsnprintf (msg,sizeof(msg)-1, fmt,argptr); _vsnprintf (msg,sizeof(msg)-1, fmt,argptr);
va_end (argptr); va_end (argptr);
if (strlen (msg) + strlen(outputbuf) > sizeof(outputbuf) - 1) if (strlen (msg) + strlen(outputbuf) > sizeof(outputbuf) - 1)
SV_FlushRedirect (); SV_FlushRedirect ();
strcat (outputbuf, msg); strcat (outputbuf, msg);
@ -204,7 +204,7 @@ void Con_DPrintf (char *fmt, ...)
va_start (argptr,fmt); va_start (argptr,fmt);
_vsnprintf (msg,sizeof(msg)-1, fmt,argptr); _vsnprintf (msg,sizeof(msg)-1, fmt,argptr);
va_end (argptr); va_end (argptr);
// add to redirected message // add to redirected message
if (sv_redirected) if (sv_redirected)
{ {
@ -274,10 +274,10 @@ void VARGS SV_ClientPrintf (client_t *cl, int level, char *fmt, ...)
{ {
va_list argptr; va_list argptr;
char string[1024]; char string[1024];
if (level < cl->messagelevel) if (level < cl->messagelevel)
return; return;
va_start (argptr,fmt); va_start (argptr,fmt);
_vsnprintf (string,sizeof(string)-1, fmt,argptr); _vsnprintf (string,sizeof(string)-1, fmt,argptr);
va_end (argptr); va_end (argptr);
@ -304,10 +304,10 @@ void VARGS SV_ClientTPrintf (client_t *cl, int level, translation_t stringnum, .
va_list argptr; va_list argptr;
char string[1024]; char string[1024];
char *fmt = languagetext[stringnum][cl->language]; char *fmt = languagetext[stringnum][cl->language];
if (level < cl->messagelevel) if (level < cl->messagelevel)
return; return;
va_start (argptr,stringnum); va_start (argptr,stringnum);
_vsnprintf (string,sizeof(string)-1, fmt,argptr); _vsnprintf (string,sizeof(string)-1, fmt,argptr);
va_end (argptr); va_end (argptr);
@ -389,7 +389,7 @@ void VARGS SV_BroadcastTPrintf (int level, translation_t stringnum, ...)
if(strlen(string) >= sizeof(string)) if(strlen(string) >= sizeof(string))
Sys_Error("SV_BroadcastPrintf: Buffer stomped\n"); Sys_Error("SV_BroadcastPrintf: Buffer stomped\n");
Sys_Printf ("%s", string); // print to the console Sys_Printf ("%s", string); // print to the console
for (i=0, cl = svs.clients ; i<MAX_CLIENTS ; i++, cl++) for (i=0, cl = svs.clients ; i<MAX_CLIENTS ; i++, cl++)
@ -431,7 +431,7 @@ void VARGS SV_BroadcastCommand (char *fmt, ...)
char string[1024]; char string[1024];
int i; int i;
client_t *cl; client_t *cl;
if (!sv.state) if (!sv.state)
return; return;
va_start (argptr,fmt); va_start (argptr,fmt);
@ -717,7 +717,7 @@ void SV_MulticastProtExt(vec3_t origin, multicast_t to, int dimension_mask, int
{ {
MVDWrite_Begin(dem_all, 0, sv.multicast.cursize); MVDWrite_Begin(dem_all, 0, sv.multicast.cursize);
SZ_Write((sizebuf_t*)demo.dbuf, sv.multicast.data, sv.multicast.cursize); SZ_Write((sizebuf_t*)demo.dbuf, sv.multicast.data, sv.multicast.cursize);
} else } else
SZ_Write(&demo.datagram, sv.multicast.data, sv.multicast.cursize); SZ_Write(&demo.datagram, sv.multicast.data, sv.multicast.cursize);
} }
@ -736,7 +736,7 @@ void VARGS SV_Multicast (vec3_t origin, multicast_t to)
SV_MulticastProtExt(origin, to, FULLDIMENSIONMASK, 0, 0); SV_MulticastProtExt(origin, to, FULLDIMENSIONMASK, 0, 0);
} }
/* /*
================== ==================
SV_StartSound SV_StartSound
@ -750,10 +750,10 @@ An attenuation of 0 will play full volume everywhere in the level.
Larger attenuations will drop off. (max 4 attenuation) Larger attenuations will drop off. (max 4 attenuation)
================== ==================
*/ */
void SV_StartSound (edict_t *entity, int channel, char *sample, int volume, void SV_StartSound (edict_t *entity, int channel, char *sample, int volume,
float attenuation) float attenuation)
{ {
#define NQSND_VOLUME (1<<0) // a qbyte #define NQSND_VOLUME (1<<0) // a qbyte
#define NQSND_ATTENUATION (1<<1) // a qbyte #define NQSND_ATTENUATION (1<<1) // a qbyte
@ -792,13 +792,13 @@ void SV_StartSound (edict_t *entity, int channel, char *sample, int volume,
&& sv.sound_precache[sound_num] ; sound_num++) && sv.sound_precache[sound_num] ; sound_num++)
if (!strcmp(sample, sv.sound_precache[sound_num])) if (!strcmp(sample, sv.sound_precache[sound_num]))
break; break;
if ( sound_num == MAX_SOUNDS || !sv.sound_precache[sound_num] ) if ( sound_num == MAX_SOUNDS || !sv.sound_precache[sound_num] )
{ {
Con_DPrintf ("SV_StartSound: %s not precacheed\n", sample); Con_DPrintf ("SV_StartSound: %s not precacheed\n", sample);
return; return;
} }
ent = NUM_FOR_EDICT(svprogfuncs, entity); ent = NUM_FOR_EDICT(svprogfuncs, entity);
if ((channel & 8) || !sv_phs.value) // no PHS flag if ((channel & 8) || !sv_phs.value) // no PHS flag
@ -815,7 +815,7 @@ void SV_StartSound (edict_t *entity, int channel, char *sample, int volume,
// reliable = true; // reliable = true;
channel = (ent<<3) | channel; channel = (ent<<3) | channel;
#ifdef NQPROT #ifdef NQPROT
field_mask = 0; field_mask = 0;
if (volume != DEFAULT_SOUND_PACKET_VOLUME) if (volume != DEFAULT_SOUND_PACKET_VOLUME)
@ -897,7 +897,7 @@ void SV_FindModelNumbers (void)
#ifdef PEXT_LIGHTUPDATES #ifdef PEXT_LIGHTUPDATES
sv_lightningmodel = -1; sv_lightningmodel = -1;
#endif #endif
for (i=0 ; i<MAX_MODELS ; i++) for (i=0 ; i<MAX_MODELS ; i++)
{ {
if (!sv.model_precache[i]) if (!sv.model_precache[i])
@ -937,7 +937,7 @@ void SV_WriteEntityDataToMessage (client_t *client, sizebuf_t *msg, int pnum)
MSG_WriteByte (msg, ent->v->dmg_take); MSG_WriteByte (msg, ent->v->dmg_take);
for (i=0 ; i<3 ; i++) for (i=0 ; i<3 ; i++)
MSG_WriteCoord (msg, other->v->origin[i] + 0.5*(other->v->mins[i] + other->v->maxs[i])); MSG_WriteCoord (msg, other->v->origin[i] + 0.5*(other->v->mins[i] + other->v->maxs[i]));
ent->v->dmg_take = 0; ent->v->dmg_take = 0;
ent->v->dmg_save = 0; ent->v->dmg_save = 0;
} }
@ -1037,7 +1037,7 @@ void SV_WriteClientdataToMessage (client_t *client, sizebuf_t *msg)
if (ent->v->view_ofs[2] != DEFAULT_VIEWHEIGHT) if (ent->v->view_ofs[2] != DEFAULT_VIEWHEIGHT)
bits |= SU_VIEWHEIGHT; bits |= SU_VIEWHEIGHT;
// if (ent->v->idealpitch) // if (ent->v->idealpitch)
// bits |= SU_IDEALPITCH; // bits |= SU_IDEALPITCH;
@ -1049,16 +1049,16 @@ void SV_WriteClientdataToMessage (client_t *client, sizebuf_t *msg)
// items = (int)ent->v->items | ((int)val->_float << 23); // items = (int)ent->v->items | ((int)val->_float << 23);
// else // else
items = (int)ent->v->items | ((int)pr_global_struct->serverflags << 28); items = (int)ent->v->items | ((int)pr_global_struct->serverflags << 28);
bits |= SU_ITEMS; bits |= SU_ITEMS;
if ( (int)ent->v->flags & FL_ONGROUND) if ( (int)ent->v->flags & FL_ONGROUND)
bits |= SU_ONGROUND; bits |= SU_ONGROUND;
if ( ent->v->waterlevel >= 2) if ( ent->v->waterlevel >= 2)
bits |= SU_INWATER; bits |= SU_INWATER;
for (i=0 ; i<3 ; i++) for (i=0 ; i<3 ; i++)
{ {
// if (ent->v->punchangle[i]) // if (ent->v->punchangle[i])
@ -1066,7 +1066,7 @@ void SV_WriteClientdataToMessage (client_t *client, sizebuf_t *msg)
if (ent->v->velocity[i]) if (ent->v->velocity[i])
bits |= (SU_VELOCITY1<<i); bits |= (SU_VELOCITY1<<i);
} }
if (ent->v->weaponframe) if (ent->v->weaponframe)
bits |= SU_WEAPONFRAME; bits |= SU_WEAPONFRAME;
@ -1120,15 +1120,15 @@ void SV_WriteClientdataToMessage (client_t *client, sizebuf_t *msg)
} }
if (bits & SU_WEAPON) if (bits & SU_WEAPON)
MSG_WriteByte (msg, SV_ModelIndex(ent->v->weaponmodel + svprogfuncs->stringtable)); MSG_WriteByte (msg, SV_ModelIndex(ent->v->weaponmodel + svprogfuncs->stringtable));
MSG_WriteShort (msg, ent->v->health); MSG_WriteShort (msg, ent->v->health);
MSG_WriteByte (msg, ent->v->currentammo); MSG_WriteByte (msg, ent->v->currentammo);
MSG_WriteByte (msg, ent->v->ammo_shells); MSG_WriteByte (msg, ent->v->ammo_shells);
MSG_WriteByte (msg, ent->v->ammo_nails); MSG_WriteByte (msg, ent->v->ammo_nails);
MSG_WriteByte (msg, ent->v->ammo_rockets); MSG_WriteByte (msg, ent->v->ammo_rockets);
MSG_WriteByte (msg, ent->v->ammo_cells); MSG_WriteByte (msg, ent->v->ammo_cells);
//if (other && other->v->weapon) //if (other && other->v->weapon)
//MSG_WriteByte (msg, other->v->weapon); //MSG_WriteByte (msg, other->v->weapon);
//else //else
//{ //{
@ -1238,7 +1238,7 @@ void SV_UpdateClientStats (client_t *client, int pnum)
ent = client->edict; ent = client->edict;
memset (stats, 0, sizeof(stats)); memset (stats, 0, sizeof(stats));
// if we are a spectator and we are tracking a player, we get his stats // if we are a spectator and we are tracking a player, we get his stats
// so our status bar reflects his // so our status bar reflects his
if (client->spectator && client->spec_track > 0) if (client->spectator && client->spec_track > 0)
@ -1276,7 +1276,7 @@ void SV_UpdateClientStats (client_t *client, int pnum)
stats[STAT_ITEMS] = (int)ent->v->items | ((int)pr_global_struct->serverflags << 28); stats[STAT_ITEMS] = (int)ent->v->items | ((int)pr_global_struct->serverflags << 28);
stats[STAT_VIEWHEIGHT] = ent->v->view_ofs[2]; stats[STAT_VIEWHEIGHT] = ent->v->view_ofs[2];
#ifdef PEXT_VIEW2 #ifdef PEXT_VIEW2
if (ent->v->view2) if (ent->v->view2)
stats[STAT_VIEW2] = NUM_FOR_EDICT(svprogfuncs, PROG_TO_EDICT(svprogfuncs, ent->v->view2)); stats[STAT_VIEW2] = NUM_FOR_EDICT(svprogfuncs, PROG_TO_EDICT(svprogfuncs, ent->v->view2));
else else
@ -1336,7 +1336,7 @@ void SV_UpdateClientStats (client_t *client, int pnum)
} }
else else
#endif #endif
if (pnum) if (pnum)
{ {
if (stats[i] >=0 && stats[i] <= 255) if (stats[i] >=0 && stats[i] <= 255)
@ -1467,7 +1467,7 @@ client_t *SV_SplitClientDest(client_t *client, qbyte first, int size)
ClientReliableWrite_Begin (client, first, size); ClientReliableWrite_Begin (client, first, size);
return client; return client;
} }
} }
/* /*
======================= =======================
SV_UpdateToReliableMessages SV_UpdateToReliableMessages
@ -1498,7 +1498,7 @@ void SV_UpdateToReliableMessages (void)
MSG_WriteByte (&sv.reliable_datagram, i); MSG_WriteByte (&sv.reliable_datagram, i);
MSG_WriteString (&sv.reliable_datagram, "topcolor"); MSG_WriteString (&sv.reliable_datagram, "topcolor");
MSG_WriteString (&sv.reliable_datagram, Info_ValueForKey(host_client->userinfo, "topcolor")); MSG_WriteString (&sv.reliable_datagram, Info_ValueForKey(host_client->userinfo, "topcolor"));
MSG_WriteByte (&sv.reliable_datagram, svc_setinfo); MSG_WriteByte (&sv.reliable_datagram, svc_setinfo);
MSG_WriteByte (&sv.reliable_datagram, i); MSG_WriteByte (&sv.reliable_datagram, i);
MSG_WriteString (&sv.reliable_datagram, "bottomcolor"); MSG_WriteString (&sv.reliable_datagram, "bottomcolor");
@ -1589,7 +1589,7 @@ void SV_UpdateToReliableMessages (void)
extern cvar_t sv_gravity; extern cvar_t sv_gravity;
// maxspeed/entgravity changes // maxspeed/entgravity changes
ent = host_client->edict; ent = host_client->edict;
newval = ent->v->gravity*sv_gravity.value; newval = ent->v->gravity*sv_gravity.value;
if (progstype != PROG_QW) if (progstype != PROG_QW)
{ {
@ -1599,8 +1599,12 @@ void SV_UpdateToReliableMessages (void)
if (host_client->entgravity != newval) if (host_client->entgravity != newval)
{ {
sp = SV_SplitClientDest(host_client, svc_entgravity, 5); if (ISQWCLIENT(host_client))
ClientReliableWrite_Float(sp, newval/movevars.gravity); //lie to the client in a cunning way {
Con_Printf("svc_entgravity\n");
sp = SV_SplitClientDest(host_client, svc_entgravity, 5);
ClientReliableWrite_Float(sp, newval/movevars.gravity); //lie to the client in a cunning way
}
host_client->entgravity = newval; host_client->entgravity = newval;
} }
newval = ent->v->maxspeed; newval = ent->v->maxspeed;
@ -1617,29 +1621,31 @@ void SV_UpdateToReliableMessages (void)
#endif #endif
if (host_client->maxspeed != newval) if (host_client->maxspeed != newval)
{ //MSVC can really suck at times (optimiser bug) { //MSVC can really suck at times (optimiser bug)
if (ISQWCLIENT(host_client))
if (host_client->controller)
{ //this is a slave client.
//find the right number and send.
int pnum = 0;
client_t *sp;
for (sp = host_client->controller; sp; sp = sp->controlled)
{
if (sp == host_client)
break;
pnum++;
}
sp = host_client->controller;
ClientReliableWrite_Begin (sp, svc_choosesplitclient, 7);
ClientReliableWrite_Byte (sp, pnum);
ClientReliableWrite_Byte (sp, svc_maxspeed);
ClientReliableWrite_Float(sp, newval);
}
else
{ {
ClientReliableWrite_Begin(host_client, svc_maxspeed, 5); if (host_client->controller)
ClientReliableWrite_Float(host_client, newval); { //this is a slave client.
//find the right number and send.
int pnum = 0;
client_t *sp;
for (sp = host_client->controller; sp; sp = sp->controlled)
{
if (sp == host_client)
break;
pnum++;
}
sp = host_client->controller;
ClientReliableWrite_Begin (sp, svc_choosesplitclient, 7);
ClientReliableWrite_Byte (sp, pnum);
ClientReliableWrite_Byte (sp, svc_maxspeed);
ClientReliableWrite_Float(sp, newval);
}
else
{
ClientReliableWrite_Begin(host_client, svc_maxspeed, 5);
ClientReliableWrite_Float(host_client, newval);
}
} }
host_client->maxspeed = newval; host_client->maxspeed = newval;
} }
@ -1716,13 +1722,13 @@ void SV_UpdateToReliableMessages (void)
} }
} }
SZ_Clear (&sv.reliable_datagram); SZ_Clear (&sv.reliable_datagram);
SZ_Clear (&sv.datagram); SZ_Clear (&sv.datagram);
#ifdef NQPROT #ifdef NQPROT
SZ_Clear (&sv.nqreliable_datagram); SZ_Clear (&sv.nqreliable_datagram);
SZ_Clear (&sv.nqdatagram); SZ_Clear (&sv.nqdatagram);
#endif #endif
SZ_Clear (&sv.q2reliable_datagram); SZ_Clear (&sv.q2reliable_datagram);
SZ_Clear (&sv.q2datagram); SZ_Clear (&sv.q2datagram);
} }
@ -1818,7 +1824,7 @@ void SV_SendClientMessages (void)
// it'll fit // it'll fit
SZ_Write(&c->netchan.message, c->backbuf_data[0], SZ_Write(&c->netchan.message, c->backbuf_data[0],
c->backbuf_size[0]); c->backbuf_size[0]);
//move along, move along //move along, move along
for (j = 1; j < c->num_backbuf; j++) for (j = 1; j < c->num_backbuf; j++)
{ {
@ -1880,7 +1886,7 @@ void SV_SendClientMessages (void)
SV_SendClientDatagram (c); SV_SendClientDatagram (c);
else else
Netchan_Transmit (&c->netchan, 0, NULL, SV_RateForClient(c)); // just update reliable Netchan_Transmit (&c->netchan, 0, NULL, SV_RateForClient(c)); // just update reliable
} }
SV_CleanupEnts(); SV_CleanupEnts();
@ -1946,7 +1952,7 @@ void SV_SendMVDMessage(void)
msg.cursize = 0; msg.cursize = 0;
msg.allowoverflow = true; msg.allowoverflow = true;
msg.overflowed = false; msg.overflowed = false;
for (i=0, c = svs.clients ; i<MAX_CLIENTS ; i++, c++) for (i=0, c = svs.clients ; i<MAX_CLIENTS ; i++, c++)
{ {
if (c->state != cs_spawned) if (c->state != cs_spawned)
@ -1967,7 +1973,7 @@ void SV_SendMVDMessage(void)
stats[STAT_ROCKETS] = ent->v->ammo_rockets; stats[STAT_ROCKETS] = ent->v->ammo_rockets;
stats[STAT_CELLS] = ent->v->ammo_cells; stats[STAT_CELLS] = ent->v->ammo_cells;
stats[STAT_ACTIVEWEAPON] = ent->v->weapon; stats[STAT_ACTIVEWEAPON] = ent->v->weapon;
// stuff the sigil bits into the high bits of items for sbar // stuff the sigil bits into the high bits of items for sbar
stats[STAT_ITEMS] = (int)ent->v->items | ((int)pr_global_struct->serverflags << 28); stats[STAT_ITEMS] = (int)ent->v->items | ((int)pr_global_struct->serverflags << 28);
@ -2040,7 +2046,7 @@ void SV_SendMessagesToAll (void)
for (i=0, c = svs.clients ; i<MAX_CLIENTS ; i++, c++) for (i=0, c = svs.clients ; i<MAX_CLIENTS ; i++, c++)
if (c->state) // FIXME: should this only send to active? if (c->state) // FIXME: should this only send to active?
c->send_message = true; c->send_message = true;
SV_SendClientMessages (); SV_SendClientMessages ();
} }

View file

@ -2963,6 +2963,7 @@ ucmd_t ucmdsq2[] = {
}; };
#endif #endif
extern ucmd_t nqucmds[];
/* /*
================== ==================
SV_ExecuteUserCommand SV_ExecuteUserCommand
@ -3001,6 +3002,9 @@ void SV_ExecuteUserCommand (char *s, qboolean fromQC)
u = ucmdsq2; u = ucmdsq2;
else else
#endif #endif
if (ISNQCLIENT(host_client))
u = nqucmds;
else
u=ucmds; u=ucmds;
for ( ; u->name ; u++) for ( ; u->name ; u++)
@ -3100,6 +3104,9 @@ void SVNQ_Spawn_f (void)
// send all current light styles // send all current light styles
for (i=0 ; i<MAX_LIGHTSTYLES ; i++) for (i=0 ; i<MAX_LIGHTSTYLES ; i++)
{ {
if (i >= MAX_STANDARDLIGHTSTYLES && host_client->protocol != SCP_DARKPLACES7)
break; //dp7 clients support more lightstyles.
ClientReliableWrite_Begin (host_client, svc_lightstyle, ClientReliableWrite_Begin (host_client, svc_lightstyle,
3 + (sv.lightstyles[i] ? strlen(sv.lightstyles[i]) : 1)); 3 + (sv.lightstyles[i] ? strlen(sv.lightstyles[i]) : 1));
ClientReliableWrite_Byte (host_client, (char)i); ClientReliableWrite_Byte (host_client, (char)i);
@ -3459,6 +3466,7 @@ ucmd_t nqucmds[] =
{"ban", NULL}, {"ban", NULL},
{"vote", SV_Vote_f}, {"vote", SV_Vote_f},
{"setinfo", SV_SetInfo_f},
{"playermodel", NULL}, {"playermodel", NULL},
{"playerskin", NULL}, {"playerskin", NULL},
{"rate", SV_Rate_f}, {"rate", SV_Rate_f},
@ -3469,7 +3477,7 @@ ucmd_t nqucmds[] =
{NULL, NULL} {NULL, NULL}
}; };
/*
void SVNQ_ExecuteUserCommand (char *s) void SVNQ_ExecuteUserCommand (char *s)
{ {
client_t *oldhost = host_client; client_t *oldhost = host_client;
@ -3484,7 +3492,7 @@ void SVNQ_ExecuteUserCommand (char *s)
{ {
if (!strcmp (Cmd_Argv(0), u->name) ) if (!strcmp (Cmd_Argv(0), u->name) )
{ {
if (/*!fromQC && */!u->noqchandling) if (/ *!fromQC && * /!u->noqchandling)
if (PR_UserCmd(s)) if (PR_UserCmd(s))
{ {
host_client = oldhost; host_client = oldhost;
@ -3512,6 +3520,7 @@ void SVNQ_ExecuteUserCommand (char *s)
if (!u->name) if (!u->name)
Con_Printf("%s tried to \"%s\"\n", host_client->name, s); Con_Printf("%s tried to \"%s\"\n", host_client->name, s);
} }
*/
#endif #endif
@ -4677,6 +4686,9 @@ void SVQ2_ExecuteClientMessage (client_t *cl)
s = MSG_ReadString (); s = MSG_ReadString ();
SV_ExecuteUserCommand (s, false); SV_ExecuteUserCommand (s, false);
host_client = cl;
sv_player = cl->edict;
if (cl->state == cs_zombie) if (cl->state == cs_zombie)
return; // disconnect command return; // disconnect command
break; break;
@ -4862,7 +4874,10 @@ void SVNQ_ExecuteClientMessage (client_t *cl)
case clc_stringcmd: case clc_stringcmd:
s = MSG_ReadString (); s = MSG_ReadString ();
SVNQ_ExecuteUserCommand (s); SV_ExecuteUserCommand (s, false);
host_client = cl;
sv_player = cl->edict;
break; break;
} }