diff --git a/common/cl_main.c b/common/cl_main.c index dbcade1..814141a 100644 --- a/common/cl_main.c +++ b/common/cl_main.c @@ -248,12 +248,13 @@ dlight_t *CL_AllocDlight (int key) return dl; } #endif - +#ifdef QUAKEWORLD void CL_BeginServerConnect(void) { connect_time = 0; CL_CheckForResend(); } +#endif /* ================= @@ -276,6 +277,7 @@ void CL_Changing_f (void) Con_Printf ("\nChanging map...\n"); } +#ifdef QUAKEWORLD /* ================= CL_CheckForResend @@ -298,14 +300,12 @@ void CL_CheckForResend (void) return; t1 = Sys_DoubleTime (); -#ifdef QUAKEWORLD if (!NET_StringToAdr (cls.servername, &adr)) { Con_Printf ("Bad server address\n"); connect_time = -1; return; } -#endif if (!NET_IsClientLegal(&adr)) { Con_Printf ("Illegal server address\n"); @@ -319,12 +319,11 @@ void CL_CheckForResend (void) connect_time = realtime+t2-t1; // for retransmit requests -#ifdef QUAKEWORLD Con_Printf ("Connecting to %s...\n", cls.servername); -#endif snprintf(data, sizeof(data), "%c%c%c%cgetchallenge\n", 255, 255, 255, 255); NET_SendPacket (strlen(data), data, adr); } +#endif /* ===================== @@ -935,6 +934,7 @@ void CL_NextDemo (void) cls.demonum++; } +#ifdef QUAKEWORLD /* ==================== CL_Packet_f @@ -982,6 +982,7 @@ void CL_Packet_f (void) NET_SendPacket (out-send, send, adr); } +#endif #ifdef UQUAKE /* @@ -1026,6 +1027,7 @@ void CL_Quit_f (void) Sys_Quit (); } +#ifdef QUAKEWORLD /* ===================== CL_Rcon_f @@ -1082,6 +1084,7 @@ void CL_Rcon_f (void) NET_SendPacket (strlen(message)+1, message , to); } +#endif #ifdef UQUAKE /* @@ -1212,7 +1215,9 @@ void CL_Reconnect_f (void) #endif CL_Disconnect(); +#ifdef QUAKEWORLD CL_BeginServerConnect(); +#endif } #ifdef UQUAKE @@ -1406,6 +1411,7 @@ void CL_RelinkEntities (void) } #endif +#ifdef QUAKEWORLD /* ======================= CL_SendConnectPacket @@ -1426,14 +1432,12 @@ void CL_SendConnectPacket (void) return; t1 = Sys_DoubleTime (); -#ifdef QUAKEWORLD if (!NET_StringToAdr (cls.servername, &adr)) { Con_Printf ("Bad server address\n"); connect_time = -1; return; } -#endif if (!NET_IsClientLegal(&adr)) { Con_Printf ("Illegal server address\n"); @@ -1446,7 +1450,6 @@ void CL_SendConnectPacket (void) t2 = Sys_DoubleTime (); connect_time = realtime+t2-t1; // for retransmit requests -#ifdef QUAKEWORLD cls.qport = Cvar_VariableValue("qport"); // Arrgh, this was not in the old binary only release, and eats up @@ -1458,9 +1461,9 @@ void CL_SendConnectPacket (void) // Con_Printf ("Connecting to %s...\n", cls.servername); snprintf(data, sizeof(data), "%c%c%c%cconnect %i %i %i \"%s\"\n", 255, 255, 255, 255, PROTOCOL_VERSION, cls.qport, cls.challenge, cls.userinfo); -#endif NET_SendPacket (strlen(data), data, adr); } +#endif #ifdef UQUAKE /* @@ -1729,8 +1732,10 @@ CL_Init */ void CL_Init (void) { +#ifdef QUAKEWORLD extern cvar_t baseskin; extern cvar_t noskins; +#endif #ifdef UQUAKE SZ_Alloc (&cls.netchan.message, 1024); @@ -1801,8 +1806,10 @@ void CL_Init (void) Cvar_RegisterVariable (&localid); +#ifdef QUAKEWORLD Cvar_RegisterVariable (&baseskin); Cvar_RegisterVariable (&noskins); +#endif // // info mirrors @@ -1847,9 +1854,9 @@ void CL_Init (void) #endif Cmd_AddCommand ("reconnect", CL_Reconnect_f); +#ifdef QUAKEWORLD Cmd_AddCommand ("rcon", CL_Rcon_f); Cmd_AddCommand ("packet", CL_Packet_f); -#ifdef QUAKEWORLD Cmd_AddCommand ("user", CL_User_f); Cmd_AddCommand ("users", CL_Users_f); diff --git a/common/client.h b/common/client.h index a7488d9..bd2a2cc 100644 --- a/common/client.h +++ b/common/client.h @@ -402,8 +402,8 @@ extern cvar_t _windowed_mouse; extern entity_state_t cl_baselines[MAX_EDICTS]; #endif // QUAKEWORLD #ifdef UQUAKE -extern entity_t cl_entities[MAX_EDICTS]; -extern entity_t cl_temp_entities[MAX_TEMP_ENTITIES]; +entity_t cl_entities[MAX_EDICTS]; +entity_t cl_temp_entities[MAX_TEMP_ENTITIES]; #endif // UQUAKE extern efrag_t cl_efrags[MAX_EFRAGS]; extern entity_t cl_static_entities[MAX_STATIC_ENTITIES]; diff --git a/uquake/host.c b/uquake/host.c index 02a05b5..3c918aa 100644 --- a/uquake/host.c +++ b/uquake/host.c @@ -73,7 +73,9 @@ client_t *host_client; // current client jmp_buf host_abortserver; -cvar_t show_fps = {"show_fps","0"}; // set for running times +//cvar_t show_fps = {"show_fps","0"}; // set for running times +extern cvar_t show_fps; + int fps_count; @@ -81,7 +83,8 @@ byte *host_basepal; byte *host_colormap; cvar_t host_framerate = {"host_framerate","0"}; // set for slow motion -cvar_t host_speeds = {"host_speeds","0"}; // set for running times +//cvar_t host_speeds = {"host_speeds","0"}; // set for running times +extern cvar_t host_speeds; cvar_t sys_ticrate = {"sys_ticrate","0.05"}; cvar_t serverprofile = {"serverprofile","0"}; @@ -96,7 +99,7 @@ cvar_t noexit = {"noexit","0",false,true}; #ifdef QUAKE2 cvar_t developer = {"developer","1"}; // should be 0 for release! #else -cvar_t developer = {"developer","0"}; +extern cvar_t developer;// = {"developer","0"}; #endif cvar_t skill = {"skill","1"}; // 0 - 3