diff options
author | Andrey Nazarov <skuller@skuller.net> | 2008-01-04 22:45:32 +0000 |
---|---|---|
committer | Andrey Nazarov <skuller@skuller.net> | 2008-01-04 22:45:32 +0000 |
commit | cfed1adf2730a07f31ccb7644f274ead21c31879 (patch) | |
tree | a24638d36c785264178203801f6945fec2ef5a9c /source/mvd_parse.c | |
parent | 0f73c3d00f54ed960cf01d0cfe30734cda26586c (diff) |
Updated revision to 177.
Updated minor MVD protocol version to 2010.
Do not wrap bprintf messages into mvd_multicast, use mvd_print instead.
Locked `sv_mvd_wait' variable until things are sorted out.
Diffstat (limited to 'source/mvd_parse.c')
-rw-r--r-- | source/mvd_parse.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/source/mvd_parse.c b/source/mvd_parse.c index 819211e..72449fb 100644 --- a/source/mvd_parse.c +++ b/source/mvd_parse.c @@ -692,6 +692,13 @@ static void MVD_ParseConfigstring( mvd_t *mvd ) { SZ_Clear( &msg_write ); } +static void MVD_ParsePrint( mvd_t *mvd ) { + int level = MSG_ReadByte(); + char *string = MSG_ReadString(); + + MVD_BroadcastPrintf( mvd, level, UF_NOGAMECHAT, "%s", string ); +} + /* Fix origin and angles on each player entity by extracting data from player state. @@ -913,9 +920,9 @@ static void MVD_ParseServerData( mvd_t *mvd ) { // parse minor protocol version protocol = MSG_ReadShort(); - if( protocol != PROTOCOL_VERSION_MVD_MINOR ) { - MVD_Destroyf( mvd, "MVD protocol version mismatch: %d instead of %d", - protocol, PROTOCOL_VERSION_MVD_MINOR ); + if( !MVD_SUPPORTED( protocol ) ) { + MVD_Destroyf( mvd, "Unsupported MVD protocol version: %d.\n" + "Current version is %d.\n", protocol, PROTOCOL_VERSION_MVD_CURRENT ); } mvd->servercount = MSG_ReadLong(); @@ -1138,6 +1145,9 @@ static qboolean MVD_ParseMessage( mvd_t *mvd, fifo_t *fifo ) { case mvd_sound: MVD_ParseSound( mvd, extrabits ); break; + case mvd_print: + MVD_ParsePrint( mvd ); + break; default: MVD_Destroyf( mvd, "Illegible command at %d: %d", msg_read.readcount - 1, cmd ); |