diff options
author | Andrey Nazarov <skuller@skuller.net> | 2008-11-13 18:58:41 +0000 |
---|---|---|
committer | Andrey Nazarov <skuller@skuller.net> | 2008-11-13 18:58:41 +0000 |
commit | bbefa87db18f5b76dc67efa00b7cc798361480f3 (patch) | |
tree | efc130fe3b4fe22f111154a8720491b756daa7bd /source/sv_mvd.c | |
parent | d65e02496cd9873f5bb0297661b19762b44ddfec (diff) |
Hacked the source to get it compile on Windows Mobile using CeGCC toolchain.
Fixed nasty memory corruption bug in UI scripts loading code.
Fixed software refresh compilation issues on Windows.
Inactive MVD channels are now completely destroyed and recreated once
they are active again, and they are no longer allowed to stay in waiting
state forever.
Fixed delay buffer overflow resulting in fatal connection error.
Preserve MVD stream flags in demos recorded on GTV server,
and handle `inuse' flag correctly on players when writing gamestate.
Updated documentation and Debian package descriptions.
Diffstat (limited to 'source/sv_mvd.c')
-rw-r--r-- | source/sv_mvd.c | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/source/sv_mvd.c b/source/sv_mvd.c index 93b9159..c63af6f 100644 --- a/source/sv_mvd.c +++ b/source/sv_mvd.c @@ -628,13 +628,14 @@ static void emit_gamestate( void ) { // send entity states for( i = 1, es = mvd.entities + 1; i < ge->num_edicts; i++, es++ ) { flags = 0; - if( i <= sv_maxclients->integer ) { - ps = &mvd.players[ i - 1 ]; - if( PPS_INUSE( ps ) && ps->pmove.pm_type == PM_NORMAL ) { - flags |= MSG_ES_FIRSTPERSON; + if( ( j = es->number ) != 0 ) { + if( i <= sv_maxclients->integer ) { + ps = &mvd.players[ i - 1 ]; + if( PPS_INUSE( ps ) && ps->pmove.pm_type == PM_NORMAL ) { + flags |= MSG_ES_FIRSTPERSON; + } } - } - if( ( j = es->number ) == 0 ) { + } else { flags |= MSG_ES_REMOVE; } es->number = i; @@ -2028,12 +2029,6 @@ static void rec_start( fileHandle_t demofile ) { } -const cmd_option_t o_mvdrecord[] = { - { "h", "help", "display this message" }, - { "z", "gzip", "compress file with gzip" }, - { NULL } -}; - static void SV_MvdRecord_c( genctx_t *ctx, int argnum ) { #if USE_MVD_CLIENT // TODO @@ -2070,12 +2065,12 @@ static void SV_MvdRecord_f( void ) { return; } - while( ( c = Cmd_ParseOptions( o_mvdrecord ) ) != -1 ) { + while( ( c = Cmd_ParseOptions( o_record ) ) != -1 ) { switch( c ) { case 'h': - Cmd_PrintUsage( o_mvdrecord, "[/]<filename>" ); + Cmd_PrintUsage( o_record, "[/]<filename>" ); Com_Printf( "Begin local MVD recording.\n" ); - Cmd_PrintHelp( o_mvdrecord ); + Cmd_PrintHelp( o_record ); return; case 'z': gzip = qtrue; |