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:
parent
9066e6f509
commit
2d227710d2
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user