From: black Date: Sun, 29 May 2005 12:51:42 +0000 (+0000) Subject: Quick fix for the "0 not loaded" bug (error on trying to connect to a server). X-Git-Tag: xonotic-v0.1.0preview~4835 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=56007293d8852e100a98ac3b555e67ba1f5f4224;p=xonotic%2Fdarkplaces.git 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 --- 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)); + } }