diff --git a/engine/client/cl_game.c b/engine/client/cl_game.c index acf932a8..4fda55cb 100644 --- a/engine/client/cl_game.c +++ b/engine/client/cl_game.c @@ -3772,7 +3772,7 @@ static demo_api_t gDemoApi = Demo_WriteBuffer, }; -static net_api_t gNetApi = +net_api_t gNetApi = { NetAPI_InitNetworking, NetAPI_Status, diff --git a/engine/client/cl_gameui.c b/engine/client/cl_gameui.c index e35c958a..6539b355 100644 --- a/engine/client/cl_gameui.c +++ b/engine/client/cl_gameui.c @@ -1237,6 +1237,7 @@ static ui_extendedfuncs_t gExtendedfuncs = NET_AdrToString, NET_CompareAdrSort, Sys_GetNativeObject, + &gNetApi, }; void UI_UnloadProgs( void ) diff --git a/engine/client/client.h b/engine/client/client.h index 6d818988..36d9926f 100644 --- a/engine/client/client.h +++ b/engine/client/client.h @@ -1164,5 +1164,7 @@ int Key_ToUpper( int key ); void OSK_Draw( void ); extern rgba_t g_color_table[8]; +extern triangleapi_t gTriApi; +extern net_api_t gNetApi; #endif//CLIENT_H diff --git a/engine/client/ref_common.c b/engine/client/ref_common.c index 12397327..5861735a 100644 --- a/engine/client/ref_common.c +++ b/engine/client/ref_common.c @@ -467,7 +467,6 @@ static void CL_FillTriAPIFromRef( triangleapi_t *dst, const ref_interface_t *src static qboolean R_LoadProgs( const char *name ) { - extern triangleapi_t gTriApi; static ref_api_t gpEngfuncs; REFAPI GetRefAPI; // single export diff --git a/engine/client/ref_common.h b/engine/client/ref_common.h index cbed5bc4..4701e671 100644 --- a/engine/client/ref_common.h +++ b/engine/client/ref_common.h @@ -54,6 +54,4 @@ extern convar_t gl_clear; qboolean R_Init( void ); void R_Shutdown( void ); -extern triangleapi_t gTriApi; - #endif // REF_COMMON_H diff --git a/engine/menu_int.h b/engine/menu_int.h index 2a076cc1..e15c1503 100644 --- a/engine/menu_int.h +++ b/engine/menu_int.h @@ -19,6 +19,7 @@ GNU General Public License for more details. #include "cvardef.h" #include "gameinfo.h" #include "wrect.h" +#include "net_api.h" // a macro for mainui_cpp, indicating that mainui should be compiled for // Xash3D 1.0 interface @@ -216,6 +217,7 @@ typedef struct ui_extendedfuncs_s { const char *(*pfnAdrToString)( const struct netadr_s a ); int (*pfnCompareAdr)( const void *a, const void *b ); // netadr_t void *(*pfnGetNativeObject)( const char *name ); + struct net_api_s *pNetAPI; } ui_extendedfuncs_t; // deprecated export from old engine