FAKEMETA IS GONE! SO LONG AND THANKS FOR THE FISH

This commit is contained in:
David Anderson
2005-07-22 19:32:16 +00:00
parent 34e5872881
commit 29e1a5edc8
7 changed files with 175 additions and 39 deletions

View File

@@ -163,6 +163,26 @@ void CModule::clear(bool clearFilename)
m_Natives.clear();
}
bool CModule::attachMetamod(const char *mmfile, PLUG_LOADTIME now)
{
void **handle;
void *dummy = NULL;
if (!m_Handle)
handle = &dummy;
else
handle = (void **)&m_Handle;
int res = LoadMetamodPlugin(mmfile, handle, now);
if (!res)
{
m_Metamod = false;
}
return true;
}
bool CModule::attachModule()
{
// old & new
@@ -336,6 +356,12 @@ bool CModule::detachModule()
if (detachFunc_Old)
(*detachFunc_Old)();
}
#ifndef FAKEMETA
if (IsMetamod())
{
UnloadMetamodPlugin(m_Handle);
}
#endif
DLFREE(m_Handle);
clear();
return true;