diff options
-rw-r--r-- | source/mvd_client.c | 1 | ||||
-rw-r--r-- | source/mvd_game.c | 17 | ||||
-rw-r--r-- | source/mvd_local.h | 1 |
3 files changed, 19 insertions, 0 deletions
diff --git a/source/mvd_client.c b/source/mvd_client.c index 2f4690e..d80fa09 100644 --- a/source/mvd_client.c +++ b/source/mvd_client.c @@ -208,6 +208,7 @@ void MVD_ClearState( mvd_t *mvd ) { memset( mvd->configstrings, 0, sizeof( mvd->configstrings ) ); mvd->framenum = 0; + mvd->intermission = qfalse; } static void MVD_EmitGamestate( mvd_t *mvd ) { diff --git a/source/mvd_game.c b/source/mvd_game.c index 4a36cce..aac5972 100644 --- a/source/mvd_game.c +++ b/source/mvd_game.c @@ -869,6 +869,23 @@ static void MVD_GameRunFrame( void ) { FS_Write( msg_read.data, msg_read.cursize, mvd->demofile ); } + // check for intermission + if( !mvd->intermission ) { + if( mvd->dummy->ps.pmove.pm_type == PM_FREEZE ) { + mvd->intermission = qtrue; + LIST_FOR_EACH( udpClient_t, u, &mvd->udpClients, entry ) { + if( u->cl->state == cs_spawned && !u->scoreboard ) { + u->scoreboard = SBOARD_SCORES; + MVD_LayoutScores( u ); + } + } + } + } else { + if( mvd->dummy->ps.pmove.pm_type != PM_FREEZE ) { + mvd->intermission = qfalse; + } + } + update: MVD_Update( mvd ); } diff --git a/source/mvd_local.h b/source/mvd_local.h index 00fdbb7..861061e 100644 --- a/source/mvd_local.h +++ b/source/mvd_local.h @@ -143,6 +143,7 @@ typedef struct mvd_s { edict_t edicts[MAX_EDICTS]; mvd_player_t *players; // [maxclients] mvd_player_t *dummy; // &players[clientNum] + qboolean intermission; // client lists list_t udpClients; |