core/sourcemm_api.cpp
changeset 304 fa485d2f25ed
parent 289 87ad530d141b
child 370 d3a484f98f6d
     1.1 --- a/core/sourcemm_api.cpp	Tue Jan 16 20:45:13 2007 +0000
     1.2 +++ b/core/sourcemm_api.cpp	Wed Jan 17 03:01:38 2007 +0000
     1.3 @@ -7,6 +7,7 @@
     1.4  IVEngineServer *engine = NULL;
     1.5  IServerGameDLL *gamedll = NULL;
     1.6  IServerGameClients *serverClients = NULL;
     1.7 +ISmmPluginManager *g_pMMPlugins = NULL;
     1.8  
     1.9  PLUGIN_EXPOSE(SourceMod, g_SourceMod_Core);
    1.10  
    1.11 @@ -18,6 +19,15 @@
    1.12  	GET_V_IFACE_CURRENT(engineFactory, engine, IVEngineServer, INTERFACEVERSION_VENGINESERVER);
    1.13  	GET_V_IFACE_CURRENT(serverFactory, serverClients, IServerGameClients, INTERFACEVERSION_SERVERGAMECLIENTS);
    1.14  
    1.15 +	if ((g_pMMPlugins = (ISmmPluginManager *)g_SMAPI->MetaFactory(MMIFACE_PLMANAGER, NULL, NULL)) == NULL)
    1.16 +	{
    1.17 +		if (error)
    1.18 +		{
    1.19 +			snprintf(error, maxlen, "Unable to find interface %s", MMIFACE_PLMANAGER);
    1.20 +		}
    1.21 +		return false;
    1.22 +	}
    1.23 +
    1.24  	return g_SourceMod.InitializeSourceMod(error, maxlen, late);
    1.25  }
    1.26