mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-26 13:50:53 +00:00
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:
parent
146e8a253f
commit
f7d90f4a0a
2 changed files with 89 additions and 68 deletions
|
@ -1599,8 +1599,12 @@ void SV_UpdateToReliableMessages (void)
|
|||
|
||||
if (host_client->entgravity != newval)
|
||||
{
|
||||
if (ISQWCLIENT(host_client))
|
||||
{
|
||||
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;
|
||||
}
|
||||
newval = ent->v->maxspeed;
|
||||
|
@ -1617,7 +1621,8 @@ void SV_UpdateToReliableMessages (void)
|
|||
#endif
|
||||
if (host_client->maxspeed != newval)
|
||||
{ //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.
|
||||
|
@ -1641,6 +1646,7 @@ void SV_UpdateToReliableMessages (void)
|
|||
ClientReliableWrite_Begin(host_client, svc_maxspeed, 5);
|
||||
ClientReliableWrite_Float(host_client, newval);
|
||||
}
|
||||
}
|
||||
host_client->maxspeed = newval;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2963,6 +2963,7 @@ ucmd_t ucmdsq2[] = {
|
|||
};
|
||||
#endif
|
||||
|
||||
extern ucmd_t nqucmds[];
|
||||
/*
|
||||
==================
|
||||
SV_ExecuteUserCommand
|
||||
|
@ -3001,6 +3002,9 @@ void SV_ExecuteUserCommand (char *s, qboolean fromQC)
|
|||
u = ucmdsq2;
|
||||
else
|
||||
#endif
|
||||
if (ISNQCLIENT(host_client))
|
||||
u = nqucmds;
|
||||
else
|
||||
u=ucmds;
|
||||
|
||||
for ( ; u->name ; u++)
|
||||
|
@ -3100,6 +3104,9 @@ void SVNQ_Spawn_f (void)
|
|||
// send all current light styles
|
||||
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,
|
||||
3 + (sv.lightstyles[i] ? strlen(sv.lightstyles[i]) : 1));
|
||||
ClientReliableWrite_Byte (host_client, (char)i);
|
||||
|
@ -3459,6 +3466,7 @@ ucmd_t nqucmds[] =
|
|||
{"ban", NULL},
|
||||
{"vote", SV_Vote_f},
|
||||
|
||||
{"setinfo", SV_SetInfo_f},
|
||||
{"playermodel", NULL},
|
||||
{"playerskin", NULL},
|
||||
{"rate", SV_Rate_f},
|
||||
|
@ -3469,7 +3477,7 @@ ucmd_t nqucmds[] =
|
|||
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
||||
/*
|
||||
void SVNQ_ExecuteUserCommand (char *s)
|
||||
{
|
||||
client_t *oldhost = host_client;
|
||||
|
@ -3484,7 +3492,7 @@ void SVNQ_ExecuteUserCommand (char *s)
|
|||
{
|
||||
if (!strcmp (Cmd_Argv(0), u->name) )
|
||||
{
|
||||
if (/*!fromQC && */!u->noqchandling)
|
||||
if (/ *!fromQC && * /!u->noqchandling)
|
||||
if (PR_UserCmd(s))
|
||||
{
|
||||
host_client = oldhost;
|
||||
|
@ -3512,6 +3520,7 @@ void SVNQ_ExecuteUserCommand (char *s)
|
|||
if (!u->name)
|
||||
Con_Printf("%s tried to \"%s\"\n", host_client->name, s);
|
||||
}
|
||||
*/
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -4677,6 +4686,9 @@ void SVQ2_ExecuteClientMessage (client_t *cl)
|
|||
s = MSG_ReadString ();
|
||||
SV_ExecuteUserCommand (s, false);
|
||||
|
||||
host_client = cl;
|
||||
sv_player = cl->edict;
|
||||
|
||||
if (cl->state == cs_zombie)
|
||||
return; // disconnect command
|
||||
break;
|
||||
|
@ -4862,7 +4874,10 @@ void SVNQ_ExecuteClientMessage (client_t *cl)
|
|||
|
||||
case clc_stringcmd:
|
||||
s = MSG_ReadString ();
|
||||
SVNQ_ExecuteUserCommand (s);
|
||||
SV_ExecuteUserCommand (s, false);
|
||||
|
||||
host_client = cl;
|
||||
sv_player = cl->edict;
|
||||
break;
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue