]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - host.c
cl_main: Disconnect when connection is established, only if we're already connected
[xonotic/darkplaces.git] / host.c
diff --git a/host.c b/host.c
index af9a7b806295f5017e0bca2599862d65e1fcbb1e..4b192c5261f718bbb4b4475033ec979eaa7c9dd1 100644 (file)
--- a/host.c
+++ b/host.c
@@ -30,7 +30,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #include "sv_demo.h"
 #include "snd_main.h"
 #include "taskqueue.h"
-#include "thread.h"
 #include "utf8lib.h"
 
 /*
@@ -66,6 +65,8 @@ cvar_t timeformat = {CF_CLIENT | CF_SERVER | CF_ARCHIVE, "timeformat", "[%Y-%m-%
 cvar_t sessionid = {CF_CLIENT | CF_SERVER | CF_READONLY, "sessionid", "", "ID of the current session (use the -sessionid parameter to set it); this is always either empty or begins with a dot (.)"};
 cvar_t locksession = {CF_CLIENT | CF_SERVER, "locksession", "0", "Lock the session? 0 = no, 1 = yes and abort on failure, 2 = yes and continue on failure"};
 
+cvar_t host_isclient = {CF_SHARED | CF_READONLY, "_host_isclient", "0", "If 1, clientside is active."};
+
 /*
 ================
 Host_AbortCurrentFrame
@@ -243,6 +244,7 @@ static void Host_InitLocal (void)
        Cvar_RegisterCallback (&host_framerate, Host_Framerate_c);
        Cvar_RegisterVariable (&host_speeds);
        Cvar_RegisterVariable (&host_maxwait);
+       Cvar_RegisterVariable (&host_isclient);
 
        Cvar_RegisterVariable (&developer);
        Cvar_RegisterVariable (&developer_extra);