diff options
author | Andrey Nazarov <skuller@skuller.net> | 2008-10-12 20:58:58 +0000 |
---|---|---|
committer | Andrey Nazarov <skuller@skuller.net> | 2008-10-12 20:58:58 +0000 |
commit | 9b25ad2f9f46ea731f6834a96536859e8764ab28 (patch) | |
tree | e25e2f9b15f7cfa8f5fca17f4d4095611f830cb2 /source/mvd_parse.c | |
parent | 7beb920efe71d600f73d981c08e4b049426f9394 (diff) |
Removed `mvd_chase_msgs' cvar, corresponding flag is now stored in MVD stream.
Do not initialize MVD server in active state, check for players instead.
Allow MVD/GTV client dynamically change `maxbuf' setting.
Changed MVD/GTV stream suspend semantics.
Fixed possible server crash due to an error in NET_Accept.
Updated documentation.
Diffstat (limited to 'source/mvd_parse.c')
-rw-r--r-- | source/mvd_parse.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/source/mvd_parse.c b/source/mvd_parse.c index 4b558cd..ee002e6 100644 --- a/source/mvd_parse.c +++ b/source/mvd_parse.c @@ -379,8 +379,9 @@ static void MVD_UnicastPrint( mvd_t *mvd, qboolean reliable, mvd_player_t *playe if( level == PRINT_CHAT && ( client->uf & UF_MUTE_PLAYERS ) ) { continue; } - target = mvd_chase_msgs->integer ? - client->target ? client->target : mvd->dummy : mvd->dummy; + // decide if message should be routed or not + target = ( mvd->flags & 1 ) ? mvd->dummy : + client->target ? client->target : mvd->dummy; if( target == player ) { cl->AddMessage( cl, data, length, reliable ); } @@ -960,7 +961,7 @@ static void MVD_ChangeLevel( mvd_t *mvd ) { SV_SendAsyncPackets(); } -static void MVD_ParseServerData( mvd_t *mvd ) { +static void MVD_ParseServerData( mvd_t *mvd, int extrabits ) { int protocol; size_t len, maxlen; char *string; @@ -989,6 +990,7 @@ static void MVD_ParseServerData( mvd_t *mvd ) { MVD_Destroyf( mvd, "Oversize gamedir string" ); } mvd->clientNum = MSG_ReadShort(); + mvd->flags = extrabits; // change gamedir unless playing a demo /*if( !mvd->demoplayback )*/ { @@ -1081,7 +1083,7 @@ static void MVD_ParseServerData( mvd_t *mvd ) { mvd_t *cur; // sort this one into the list of ready channels - LIST_FOR_EACH( mvd_t, cur, &mvd_channels, entry ) { + LIST_FOR_EACH( mvd_t, cur, &mvd_channel_list, entry ) { if( cur->id > mvd->id ) { break; } @@ -1130,7 +1132,7 @@ void MVD_ParseMessage( mvd_t *mvd ) { switch( cmd ) { case mvd_serverdata: - MVD_ParseServerData( mvd ); + MVD_ParseServerData( mvd, extrabits ); break; case mvd_multicast_all: case mvd_multicast_pvs: |