}
}
+static void CL_EstablishConnection_Local(void)
+{
+ CL_EstablishConnection("local:1", -2);
+}
+
/*
==============
CL_PrintEntities_f
CL_Video_Init();
+ host.hook.ConnectLocal = CL_EstablishConnection_Local;
+
#ifdef CONFIG_MENU
Cbuf_InsertText(&cmd_client,"menu_start\n");
#endif
qboolean restless; // don't sleep
qboolean paused; // global paused state, pauses both client and server
cbuf_t *cbuf;
+
+ struct
+ {
+ void (*ConnectLocal)(void);
+ } hook;
} host_t;
extern host_t host;
svs.serverflags = 0; // haven't completed an episode yet
strlcpy(level, Cmd_Argv(cmd, 1), sizeof(level));
SV_SpawnServer(level);
- if (sv.active && cls.state == ca_disconnected)
- CL_EstablishConnection("local:1", -2);
+
+ if(sv.active && host.hook.ConnectLocal != NULL)
+ host.hook.ConnectLocal();
}
/*
SV_SaveSpawnparms ();
strlcpy(level, Cmd_Argv(cmd, 1), sizeof(level));
SV_SpawnServer(level);
- if (sv.active && cls.state == ca_disconnected)
- CL_EstablishConnection("local:1", -2);
+
+ if(sv.active && host.hook.ConnectLocal != NULL)
+ host.hook.ConnectLocal();
}
/*
strlcpy(mapname, sv.name, sizeof(mapname));
SV_SpawnServer(mapname);
- if (sv.active && cls.state == ca_disconnected)
- CL_EstablishConnection("local:1", -2);
+
+ if(sv.active && host.hook.ConnectLocal != NULL)
+ host.hook.ConnectLocal();
}
//===========================================================================