1.1 --- a/core/metamod.cpp Sun Nov 23 23:22:47 2008 -0600
1.2 +++ b/core/metamod.cpp Sun Nov 23 23:45:57 2008 -0600
1.3 @@ -214,6 +214,35 @@
1.4 IFACE_MACRO(gamedll_info.factory, GameDLL);
1.5 }
1.6
1.7 +SMM_API void *
1.8 +CreateInterface(const char *iface, int *ret)
1.9 +{
1.10 + void *ptr = NULL;
1.11 +
1.12 + if (!mm_IsVspBridged() && strncmp(iface, "ISERVERPLUGINCALLBACKS", 22) == 0)
1.13 + {
1.14 + if (vsp_callbacks != NULL)
1.15 + {
1.16 + if (ret != NULL)
1.17 + *ret = IFACE_FAILED;
1.18 + return NULL;
1.19 + }
1.20 +
1.21 + vsp_version = atoi(&iface[22]);
1.22 + ptr = provider->GetVSPCallbacks(vsp_version);
1.23 +
1.24 + if (ptr == NULL)
1.25 + vsp_version = 0;
1.26 +
1.27 + return ptr;
1.28 + }
1.29 +
1.30 + if (ret)
1.31 + *ret = (ptr != NULL) ? IFACE_OK : IFACE_FAILED;
1.32 +
1.33 + return ptr;
1.34 +}
1.35 +
1.36 int
1.37 mm_LoadPluginsFromFile(const char *_file)
1.38 {
1.39 @@ -500,7 +529,7 @@
1.40 "Metamod:Source Base Folder",
1.41 ConVarFlag_SpOnly);
1.42
1.43 - g_bIsVspBridged = true;
1.44 + g_bIsVspBridged = is_vsp_load;
1.45
1.46 if (!is_vsp_load)
1.47 {
1.48 @@ -1042,6 +1071,7 @@
1.49
1.50 void MetamodSource::NotifyVSPListening(IServerPluginCallbacks *callbacks)
1.51 {
1.52 + vsp_callbacks = callbacks;
1.53 ITER_EVENT(OnVSPListening, (callbacks));
1.54 }
1.55