1
0
mirror of https://github.com/alliedmodders/metamod-source.git synced 2024-12-01 13:24:25 +01:00

Fixed VSP listening on core-legacy gamedll while gamedll bridged.

This commit is contained in:
David Anderson 2008-11-24 00:10:13 -06:00
parent 9066e6f509
commit 2d227710d2

View File

@ -126,6 +126,39 @@ void DoInitialPluginLoads()
LookForVDFs(full_path);
}
SMM_API void *
CreateInterface(const char *iface, int *ret)
{
void *ptr = NULL;
if (!g_bIsBridgedAsVsp && strncmp(iface, "ISERVERPLUGINCALLBACKS", 22) == 0)
{
if (g_VspListener.IsLoaded())
{
if (ret != NULL)
*ret = IFACE_FAILED;
return NULL;
}
assert(&g_VspListener == g_pRealVspCallbacks);
int vsp_version = atoi(&iface[22]);
if (vsp_version < 1 || vsp_version > 2)
{
if (ret != NULL)
*ret = IFACE_FAILED;
return NULL;
}
return g_pRealVspCallbacks;
}
if (ret)
*ret = (ptr != NULL) ? IFACE_OK : IFACE_FAILED;
return ptr;
}
bool StartupMetamod(CreateInterfaceFn engineFactory, bool bWaitForGameInit)
{
g_Engine.engine = (IVEngineServer *)((engineFactory)(INTERFACEVERSION_VENGINESERVER, NULL));