summaryrefslogtreecommitdiff
path: root/source/sv_main.c
diff options
context:
space:
mode:
authorAndrey Nazarov <skuller@skuller.net>2008-03-30 22:50:12 +0000
committerAndrey Nazarov <skuller@skuller.net>2008-03-30 22:50:12 +0000
commit25622e67c36582bfc7b10756ea5808a247b69a8a (patch)
treeb5e86156ecc5cfa0f9dcb3b746074b05388063ad /source/sv_main.c
parent599a6aba5619bea100e45b31483148d232229f91 (diff)
Added UF_MUTE_MISC flag and corresponding MVD menu entry.
Avoid spamming MVD channels with broadcasts when client is dropped. Allow referencing MVD channels by name along with numeric ID. When spectator enters a MVD channel for the first time, start following the most followed player by default. Changed default GL driver to `libGL.so.1' on Unix.
Diffstat (limited to 'source/sv_main.c')
-rw-r--r--source/sv_main.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/source/sv_main.c b/source/sv_main.c
index 5f7598f..85489e0 100644
--- a/source/sv_main.c
+++ b/source/sv_main.c
@@ -172,8 +172,13 @@ void SV_DropClient( client_t *client, const char *reason ) {
if( reason ) {
if( oldstate == cs_spawned ) {
- SV_BroadcastPrintf( PRINT_HIGH, "%s was dropped: %s\n",
- client->name, reason );
+ // announce to others
+ if( sv.state == ss_broadcast ) {
+ MVD_GameClientDrop( client->edict, reason );
+ } else {
+ SV_BroadcastPrintf( PRINT_HIGH, "%s was dropped: %s\n",
+ client->name, reason );
+ }
}
// print this to client as they will not receive broadcast
@@ -1640,9 +1645,14 @@ void SV_UserinfoChanged( client_t *cl ) {
// mask off high bit
for( i = 0; i < len; i++ )
name[i] &= 127;
- if( dedicated->integer && cl->name[0] && strcmp( cl->name, name ) ) {
- Com_Printf( "%s[%s] changed name to %s\n", cl->name,
- NET_AdrToString( &cl->netchan->remote_address ), name );
+ if( cl->name[0] && strcmp( cl->name, name ) ) {
+ if( dedicated->integer ) {
+ Com_Printf( "%s[%s] changed name to %s\n", cl->name,
+ NET_AdrToString( &cl->netchan->remote_address ), name );
+ }
+ if( sv.state == ss_broadcast ) {
+ MVD_GameClientNameChanged( cl->edict, name );
+ }
}
memcpy( cl->name, name, len + 1 );