summaryrefslogtreecommitdiff
path: root/source/sv_game.c
diff options
context:
space:
mode:
authorAndrey Nazarov <skuller@skuller.net>2008-10-11 15:05:50 +0000
committerAndrey Nazarov <skuller@skuller.net>2008-10-11 15:05:50 +0000
commitd02633af4e780c4b6f6d938c67d84d2c968adb79 (patch)
tree3379b9615e285346ad6b1f87639912e01ecd44c7 /source/sv_game.c
parentf8abe42a0d1a42653b39f6cf320d3fbdd1279bb3 (diff)
Major redesign of GTV protocol: added support for persistent GTV connections,
bidirectional pinging, low traffic (`suspended') modes. HTTP server is now gone (remote console logging is temporary gone too), custom binary protocol is used for GTV connections now. MVD client no longer serves other MVD clients, only regular spectators. Changed FIFO buffers to be regular circular buffers, not BIP-buffers. Removed `sv_http_*', `sv_console_auth' variables. Added `sv_mvd_maxclients' variable, `addgtvhost', `delgtvhost' and `listgtvhosts' commands. Renamed `sv_mvd_max*' cvars for consistency. Reset `sv_ghostime' default value back to 6, but changed semantics: it now waits for any packet from client, not just `begin' packet. Added `--disable-mvd-server' and `--disable-mvd-client' options to configure script. FS_Restart() no longer chokes on real files opened for reading. Fixed client chat prompt length. Stubbed out more debugging stuff from dedicated server builds.
Diffstat (limited to 'source/sv_game.c')
-rw-r--r--source/sv_game.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/source/sv_game.c b/source/sv_game.c
index 9051e7a..fe211a9 100644
--- a/source/sv_game.c
+++ b/source/sv_game.c
@@ -99,10 +99,13 @@ static void PF_Unicast( edict_t *ent, qboolean reliable ) {
if( msg_write.data[0] == svc_disconnect ) {
// fix anti-kicking exploit for broken mods
client->flags |= CF_DROP;
- } else {
- SV_MvdUnicast( ent, clientNum, reliable );
+ goto clear;
}
+#if USE_MVD_SERVER
+ SV_MvdUnicast( ent, clientNum, reliable );
+#endif
+
clear:
SZ_Clear( &msg_write );
}
@@ -131,7 +134,9 @@ static void PF_bprintf( int level, const char *fmt, ... ) {
return;
}
+#if USE_MVD_SERVER
SV_MvdBroadcastPrint( level, string );
+#endif
MSG_WriteByte( svc_print );
MSG_WriteByte( level );
@@ -224,7 +229,9 @@ static void PF_cprintf( edict_t *ent, int level, const char *fmt, ... ) {
SV_ClientAddMessage( client, MSG_RELIABLE );
}
+#if USE_MVD_SERVER
SV_MvdUnicast( ent, clientNum, qtrue );
+#endif
SZ_Clear( &msg_write );
}
@@ -354,7 +361,9 @@ void PF_Configstring( int index, const char *val ) {
return;
}
+#if USE_MVD_SERVER
SV_MvdConfigstring( index, val );
+#endif
// send the update to everyone
MSG_WriteByte( svc_configstring );
@@ -586,8 +595,10 @@ static void PF_StartSound( edict_t *edict, int channel,
client->msg_bytes += MAX_SOUND_PACKET;
}
+#if USE_MVD_SERVER
SV_MvdStartSound( ent, channel, flags, soundindex,
volume * 255, attenuation * 64, timeofs * 1000 );
+#endif
}
static void PF_PositionedSound( vec3_t origin, edict_t *entity, int channel,