From 56007293d8852e100a98ac3b555e67ba1f5f4224 Mon Sep 17 00:00:00 2001 From: black Date: Sun, 29 May 2005 12:51:42 +0000 Subject: [PATCH] Quick fix for the "0 not loaded" bug (error on trying to connect to a server). git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5347 d7cf8633-e32d-0410-b094-e92efae38249 --- host.c | 2 ++ host_cmd.c | 10 +++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/host.c b/host.c index 41272a77..da431962 100644 --- a/host.c +++ b/host.c @@ -517,6 +517,8 @@ void Host_ShutdownServer(qboolean crash) memset(&sv, 0, sizeof(sv)); memset(svs.clients, 0, svs.maxclients*sizeof(client_t)); + PRVM_ResetProg(); + SV_VM_End(); } diff --git a/host_cmd.c b/host_cmd.c index ac6d821f..355ad472 100644 --- a/host_cmd.c +++ b/host_cmd.c @@ -401,9 +401,13 @@ void Host_Connect_f (void) Con_Print("connect : connect to a multiplayer game\n"); return; } - SV_VM_Begin(); - CL_EstablishConnection("local:1"); - SV_VM_End(); + if( sv.active ) { + SV_VM_Begin(); + CL_EstablishConnection(Cmd_Argv(1)); + SV_VM_End(); + } else { + CL_EstablishConnection(Cmd_Argv(1)); + } } -- 2.39.2