lots of updates
This commit is contained in:
@@ -1,11 +1,24 @@
|
||||
#include "sv_dll.h"
|
||||
#include "tier1/interface.h"
|
||||
#include "tier0/platform.h"
|
||||
#include "icvar.h"
|
||||
|
||||
void CServerGameDLL::Init()
|
||||
{
|
||||
#if defined(__linux__)
|
||||
void *pLib;
|
||||
|
||||
#ifdef __linux
|
||||
pLib = Plat_LoadLibrary("libserver.so");
|
||||
#endif
|
||||
if (!pLib)
|
||||
Plat_FatalErrorFunc("Failed to load server library\n");
|
||||
m_pLibrary = pLib;
|
||||
|
||||
CreateInterfaceFn pfnServerFactory = Sys_GetFactory(pLib);
|
||||
IEngineBridge *pEngineBridge = (IEngineBridge*)pfnServerFactory(ENGINE_BRIDGE_INTERFACE_VERSION, NULL);
|
||||
|
||||
pEngineBridge->Init();
|
||||
m_pBridge = pEngineBridge;
|
||||
}
|
||||
|
||||
void CServerGameDLL::Shutdown()
|
||||
@@ -13,9 +26,3 @@ void CServerGameDLL::Shutdown()
|
||||
|
||||
}
|
||||
|
||||
|
||||
CServerGameDLL *ServerGameDLL()
|
||||
{
|
||||
static CServerGameDLL s_serverdll;
|
||||
return &s_serverdll;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user