Make nq-x11 work for sw.

Same state as qw-client-x11.
This commit is contained in:
Bill Currie 2012-02-26 18:45:50 +09:00
parent 97968422f8
commit a16ff08240
3 changed files with 19 additions and 15 deletions

View file

@ -60,6 +60,11 @@ static __attribute__ ((used)) const char rcsid[] =
#include "server.h"
#include "sbar.h"
CLIENT_PLUGIN_PROTOS
static plugin_list_t client_plugin_list[] = {
CLIENT_PLUGIN_LIST
};
// these two are not intended to be set directly
cvar_t *cl_name;
cvar_t *cl_color;
@ -512,7 +517,13 @@ CL_Init (cbuf_t *cbuf)
VID_Init (basepal, colormap);
IN_Init (cbuf);
R_Init ();
r_data->lightstyle = cl.lightstyle;
S_Init (&viewentity, &host_frametime);
PI_RegisterPlugins (client_plugin_list);
Con_Init ("client");
CDAudio_Init ();
Sbar_Init ();

View file

@ -705,7 +705,7 @@ V_CalcRefdef (void)
void
V_RenderView (void)
{
if (cls.state != ca_active)
if (cls.signon != SIGNONS) //FIXME need proper state
return;
// don't allow cheats in multiplayer

View file

@ -79,11 +79,6 @@ static plugin_list_t server_plugin_list[] = {
SERVER_PLUGIN_LIST
};
CLIENT_PLUGIN_PROTOS
static plugin_list_t client_plugin_list[] = {
CLIENT_PLUGIN_LIST
};
qboolean host_initialized; // true if into command execution
quakeparms_t host_parms;
@ -906,15 +901,6 @@ Host_Init (void)
if (isDedicated) {
PI_RegisterPlugins (server_plugin_list);
Con_Init ("server");
} else {
PI_RegisterPlugins (client_plugin_list);
Con_Init ("client");
}
if (con_module) {
con_module->data->console->realtime = &con_realtime;
con_module->data->console->frametime = &con_frametime;
con_module->data->console->quit = Host_Quit_f;
con_module->data->console->cbuf = host_cbuf;
}
Host_InitVCR (&host_parms);
@ -929,6 +915,13 @@ Host_Init (void)
if (cls.state != ca_dedicated)
CL_Init (host_cbuf);
if (con_module) {
con_module->data->console->realtime = &con_realtime;
con_module->data->console->frametime = &con_frametime;
con_module->data->console->quit = Host_Quit_f;
con_module->data->console->cbuf = host_cbuf;
}
CL_UpdateScreen (cl.time);
CL_UpdateScreen (cl.time);