]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Quick fix for the "0 not loaded" bug (error on trying to connect to a server).
authorblack <black@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 29 May 2005 12:51:42 +0000 (12:51 +0000)
committerblack <black@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 29 May 2005 12:51:42 +0000 (12:51 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5347 d7cf8633-e32d-0410-b094-e92efae38249

host.c
host_cmd.c

diff --git a/host.c b/host.c
index 41272a7739614ae8b8a64f1716dc03d276c3a137..da431962c29e18bea7ce6890a0b2604c3fe6d768 100644 (file)
--- 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();
 }
 
index ac6d821fb6900c6b0f7c76fbebfe076d92d242fc..355ad472a0968a1cea0aef33ccd25b94eb2ca7d3 100644 (file)
@@ -401,9 +401,13 @@ void Host_Connect_f (void)
                Con_Print("connect <serveraddress> : 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));
+       }
 }