summaryrefslogtreecommitdiff
path: root/source/mvd_client.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/mvd_client.c')
-rw-r--r--source/mvd_client.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/source/mvd_client.c b/source/mvd_client.c
index 964a511..ba45235 100644
--- a/source/mvd_client.c
+++ b/source/mvd_client.c
@@ -982,6 +982,27 @@ void MVD_Play_f( void ) {
strcpy( mvd->demopath, buffer );
}
+
+void MVD_Shutdown( void ) {
+ mvd_t *mvd, *next;
+
+ LIST_FOR_EACH_SAFE( mvd_t, mvd, next, &mvd_channels, entry ) {
+ MVD_Disconnect( mvd );
+ MVD_ClearState( mvd );
+ MVD_Free( mvd );
+ }
+
+ List_Init( &mvd_channels );
+ List_Init( &mvd_ready );
+
+ if( mvd_clients ) {
+ Z_Free( mvd_clients );
+ mvd_clients = NULL;
+ }
+
+ Z_LeakTest( TAG_MVD );
+}
+
static const cmdreg_t c_mvd[] = {
{ "mvdplay", MVD_Play_f, MVD_Play_g },
{ "mvdconnect", MVD_Connect_f },