1
0
mirror of https://github.com/alliedmodders/metamod-source.git synced 2025-02-20 13:54:14 +01:00

Don't use engine specific IFACE status enum in MM:S.

This commit is contained in:
Kyle Sanderson 2015-01-20 16:30:13 -08:00
parent 37b6268cff
commit d3bfaa302d
4 changed files with 23 additions and 23 deletions

View File

@ -186,13 +186,13 @@ void *CSmmAPI::MetaFactory(const char *iface, int *_ret, PluginId *id)
{
if (_ret)
{
*_ret = IFACE_OK;
*_ret = META_IFACE_OK;
}
return static_cast<void *>(static_cast<SourceHook::ISourceHook *>(&g_SourceHook));
} else if (strcmp(iface, MMIFACE_PLMANAGER) == 0) {
if (_ret)
{
*_ret = IFACE_OK;
*_ret = META_IFACE_OK;
}
return static_cast<void *>(static_cast<ISmmPluginManager *>(&g_PluginMngr));
}
@ -209,7 +209,7 @@ void *CSmmAPI::MetaFactory(const char *iface, int *_ret, PluginId *id)
for (event=pl->m_Events.begin(); event!=pl->m_Events.end(); event++)
{
api = (*event).event;
ret = IFACE_FAILED;
ret = META_IFACE_FAILED;
if ( (val=api->OnMetamodQuery(iface, &ret)) != NULL )
{
if (_ret)
@ -222,7 +222,7 @@ void *CSmmAPI::MetaFactory(const char *iface, int *_ret, PluginId *id)
}
if (_ret)
*_ret = IFACE_FAILED;
*_ret = META_IFACE_FAILED;
return NULL;
}
@ -371,7 +371,7 @@ void *CSmmAPI::InterfaceSearch(CreateInterfaceFn fn, const char *iface, int max,
{
if (ret)
{
*ret = IFACE_FAILED;
*ret = META_IFACE_FAILED;
}
return NULL;
}

View File

@ -208,7 +208,7 @@ public:
* @brief Called when engineFactory() is used through Metamod:Source's wrapper.
* This can be used to provide interfaces to other plugins or the GameDLL.
*
* If ret is passed, you should fill it with IFACE_OK or IFACE_FAILED.
* If ret is passed, you should fill it with META_IFACE_OK or META_IFACE_FAILED.
*
* @param iface Interface string.
* @param ret Optional pointer to store return code.
@ -218,7 +218,7 @@ public:
{
if (ret)
{
*ret = IFACE_FAILED;
*ret = META_IFACE_FAILED;
}
return NULL;
@ -228,7 +228,7 @@ public:
* @brief Called when the physics factory is used through Metamod:Source's wrapper.
* This can be used to provide interfaces to other plugins.
*
* If ret is passed, you should fill it with IFACE_OK or IFACE_FAILED.
* If ret is passed, you should fill it with META_IFACE_OK or META_IFACE_FAILED.
*
* @param iface Interface string.
* @param ret Optional pointer to store return code.
@ -238,7 +238,7 @@ public:
{
if (ret)
{
*ret = IFACE_FAILED;
*ret = META_IFACE_FAILED;
}
return NULL;
@ -248,7 +248,7 @@ public:
* @brief Called when the filesystem factory is used through Metamod:Source's wrapper.
* This can be used to provide interfaces to other plugins.
*
* If ret is passed, you should fill it with IFACE_OK or IFACE_FAILED.
* If ret is passed, you should fill it with META_IFACE_OK or META_IFACE_FAILED.
*
* @param iface Interface string.
* @param ret Optional pointer to store return code.
@ -258,7 +258,7 @@ public:
{
if (ret)
{
*ret = IFACE_FAILED;
*ret = META_IFACE_FAILED;
}
return NULL;
@ -268,7 +268,7 @@ public:
* @brief Called when the server DLL's factory is used through Metamod:Source's wrapper.
* This can be used to provide interfaces to other plugins.
*
* If ret is passed, you should fill it with IFACE_OK or IFACE_FAILED.
* If ret is passed, you should fill it with META_IFACE_OK or META_IFACE_FAILED.
*
* @param iface Interface string.
* @param ret Optional pointer to store return code.
@ -278,7 +278,7 @@ public:
{
if (ret)
{
*ret = IFACE_FAILED;
*ret = META_IFACE_FAILED;
}
return NULL;
@ -288,7 +288,7 @@ public:
* @brief Called when Metamod's own factory is invoked.
* This can be used to provide interfaces to other plugins.
*
* If ret is passed, you should fill it with IFACE_OK or IFACE_FAILED.
* If ret is passed, you should fill it with META_IFACE_OK or META_IFACE_FAILED.
*
* @param iface Interface string.
* @param ret Optional pointer to store return code.
@ -298,7 +298,7 @@ public:
{
if (ret)
{
*ret = IFACE_FAILED;
*ret = META_IFACE_FAILED;
}
return NULL;

View File

@ -42,7 +42,7 @@ using namespace SourceMM;
pl = (*iter); \
for (event=pl->m_Events.begin(); event!=pl->m_Events.end(); event++) { \
api = (*event).event; \
mret = IFACE_FAILED; \
mret = META_IFACE_FAILED; \
if ( (val=api->On##nam##Query(iface, &mret)) != NULL ) { \
if (ret) *ret = mret; \
return val; \

View File

@ -122,7 +122,7 @@ SourceMM::ISmmAPI *g_pMetamod = &g_Metamod;
pl = (*iter); \
for (event=pl->m_Events.begin(); event!=pl->m_Events.end(); event++) { \
api = (*event); \
mret = IFACE_FAILED; \
mret = META_IFACE_FAILED; \
if ( (val=api->On##nam##Query(iface, &mret)) != NULL ) { \
if (ret) *ret = mret; \
return val; \
@ -688,7 +688,7 @@ void *MetamodSource::InterfaceSearch(CreateInterfaceFn fn, const char *iface, in
{
if (ret)
{
*ret = IFACE_FAILED;
*ret = META_IFACE_FAILED;
}
return NULL;
}
@ -841,7 +841,7 @@ void *MetamodSource::MetaFactory(const char *iface, int *ret, PluginId *id)
{
if (ret)
{
*ret = IFACE_OK;
*ret = META_IFACE_OK;
}
return static_cast<void *>(static_cast<SourceHook::ISourceHook *>(&g_SourceHook));
}
@ -849,7 +849,7 @@ void *MetamodSource::MetaFactory(const char *iface, int *ret, PluginId *id)
{
if (ret)
{
*ret = IFACE_OK;
*ret = META_IFACE_OK;
}
return static_cast<void *>(static_cast<ISmmPluginManager *>(&g_PluginMngr));
}
@ -857,7 +857,7 @@ void *MetamodSource::MetaFactory(const char *iface, int *ret, PluginId *id)
{
if (ret)
{
*ret = IFACE_OK;
*ret = META_IFACE_OK;
}
return static_cast<void *>(static_cast<SourceHook::IHookManagerAutoGen *>(&g_SH_HookManagerAutoGen));
}
@ -876,7 +876,7 @@ void *MetamodSource::MetaFactory(const char *iface, int *ret, PluginId *id)
for (event = pl->m_Events.begin(); event != pl->m_Events.end(); event++)
{
api = (*event);
subret = IFACE_FAILED;
subret = META_IFACE_FAILED;
if ((value = api->OnMetamodQuery(iface, &subret)) != NULL)
{
if (ret)
@ -894,7 +894,7 @@ void *MetamodSource::MetaFactory(const char *iface, int *ret, PluginId *id)
if (ret)
{
*ret = IFACE_FAILED;
*ret = META_IFACE_FAILED;
}
return NULL;