simplified "connect local" a bit
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 20 Feb 2003 09:13:31 +0000 (09:13 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 20 Feb 2003 09:13:31 +0000 (09:13 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2767 d7cf8633-e32d-0410-b094-e92efae38249

net_main.c

index 6e05570..836d2d0 100644 (file)
@@ -517,7 +517,6 @@ qsocket_t *NET_Connect (char *host)
 {
        qsocket_t               *ret;
        int                             n;
-       int                             numdrivers = net_numdrivers;
 
        SetNetTime();
 
@@ -528,8 +527,8 @@ qsocket_t *NET_Connect (char *host)
        {
                if (Q_strcasecmp (host, "local") == 0)
                {
-                       numdrivers = 1;
-                       goto JustDoIt;
+                       net_driverlevel = 0;
+                       return dfunc.Connect (host);
                }
 
                if (hostCacheCount)
@@ -568,7 +567,7 @@ qsocket_t *NET_Connect (char *host)
                        }
 
 JustDoIt:
-       for (net_driverlevel=0 ; net_driverlevel<numdrivers; net_driverlevel++)
+       for (net_driverlevel = 0;net_driverlevel < net_numdrivers;net_driverlevel++)
        {
                if (net_drivers[net_driverlevel].initialized == false)
                        continue;
@@ -584,7 +583,7 @@ JustDoIt:
                PrintSlist();
                PrintSlistTrailer();
        }
-       
+
        return NULL;
 }