Cleaning up some logic and coding style.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2400 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
b4cb2a66b6
commit
83bcdc0cc7
2 changed files with 23 additions and 15 deletions
|
@ -498,14 +498,14 @@ void SV_DropClient (client_t *drop)
|
|||
drop->frameunion.frames = NULL;
|
||||
}
|
||||
|
||||
if (svs.gametype != GT_PROGS) //gamecode should do it all for us.
|
||||
return;
|
||||
|
||||
if (svs.gametype == GT_PROGS) //gamecode should do it all for us.
|
||||
{
|
||||
// send notification to all remaining clients
|
||||
SV_FullClientUpdate (drop, &sv.reliable_datagram, 0);
|
||||
SV_FullClientUpdate (drop, &sv.reliable_datagram, 0);
|
||||
#ifdef NQPROT
|
||||
SVNQ_FullClientUpdate (drop, &sv.nqreliable_datagram);
|
||||
SVNQ_FullClientUpdate (drop, &sv.nqreliable_datagram);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (drop->controlled)
|
||||
{
|
||||
|
@ -3594,17 +3594,21 @@ void SV_ExtractFromUserinfo (client_t *cl)
|
|||
|
||||
if (strncmp(newname, cl->name, sizeof(cl->namebuf)-1))
|
||||
{
|
||||
if (cl->ismuted)
|
||||
if (cl->ismuted && *cl->name)
|
||||
SV_ClientTPrintf (cl, PRINT_HIGH, STL_NONAMEASMUTE);
|
||||
else
|
||||
{
|
||||
|
||||
Info_SetValueForKey (cl->userinfo, "name", newname, sizeof(cl->userinfo));
|
||||
if (!sv.paused) {
|
||||
if (!cl->lastnametime || realtime - cl->lastnametime > 5) {
|
||||
if (!sv.paused && *cl->name)
|
||||
{
|
||||
if (!cl->lastnametime || realtime - cl->lastnametime > 5)
|
||||
{
|
||||
cl->lastnamecount = 0;
|
||||
cl->lastnametime = realtime;
|
||||
} else if (cl->lastnamecount++ > 4) {
|
||||
}
|
||||
else if (cl->lastnamecount++ > 4)
|
||||
{
|
||||
SV_BroadcastTPrintf (PRINT_HIGH, STL_CLIENTKICKEDNAMESPAM, cl->name);
|
||||
SV_ClientTPrintf (cl, PRINT_HIGH, STL_YOUWEREKICKEDNAMESPAM);
|
||||
SV_DropClient (cl);
|
||||
|
@ -3612,7 +3616,7 @@ void SV_ExtractFromUserinfo (client_t *cl)
|
|||
}
|
||||
}
|
||||
|
||||
if (cl->state >= cs_spawned && !cl->spectator)
|
||||
if (*cl->name && cl->state >= cs_spawned && !cl->spectator)
|
||||
{
|
||||
SV_BroadcastTPrintf (PRINT_HIGH, STL_CLIENTNAMECHANGE, cl->name, val);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue