oh I forgot to commit this, basic-master-san

This commit is contained in:
David Anderson 2006-05-10 12:40:44 +00:00
parent b2aff10e46
commit afe19411b2
3 changed files with 31 additions and 1 deletions

View File

@ -452,6 +452,24 @@ int CheckModules(AMX *amx, char error[128])
found = FindLibrary(buffer, expect);
/* for binary compat */
if (!found)
{
CList<CModule, const char *>::iterator a = g_modules.begin();
while (a)
{
CModule &cm = (*a);
if (cm.getInfoNew() &&
cm.getInfoNew()->logtag &&
!strcasecmp(cm.getInfoNew()->logtag, buffer))
{
found = true;
break;
}
++a;
}
}
if (!found)
{
if (pHandler->HandleModule(buffer))
@ -1641,6 +1659,11 @@ int MNF_SetPlayerTeamInfo(int player, int teamid, const char *teamname)
return 1;
}
const char *MNF_GetLocalInfo(char *name, const char *def)
{
return get_localinfo(name, def);
}
void *MNF_PlayerPropAddr(int id, int prop)
{
if (id < 1 || id > gpGlobals->maxClients)
@ -1786,6 +1809,7 @@ void Module_CacheFunctions()
REGISTER_FUNC("AddLibraries", MFN_AddLibraries);
REGISTER_FUNC("RemoveLibraries", MNF_RemoveLibraries);
REGISTER_FUNC("OverrideNatives", MNF_OverrideNatives);
REGISTER_FUNC("GetLocalInfo", MNF_GetLocalInfo);
#ifdef MEMORY_TEST
REGISTER_FUNC("Allocator", m_allocator)

View File

@ -2512,6 +2512,7 @@ PFN_FINDLIBRARY g_fn_FindLibrary;
PFN_ADDLIBRARIES g_fn_AddLibraries;
PFN_REMOVELIBRARIES g_fn_RemoveLibraries;
PFN_OVERRIDENATIVES g_fn_OverrideNatives;
PFN_GETLOCALINFO g_fn_GetLocalInfo;
// *** Exports ***
C_DLLEXPORT int AMXX_Query(int *interfaceVersion, amxx_module_info_s *moduleInfo)
@ -2630,6 +2631,7 @@ C_DLLEXPORT int AMXX_Attach(PFN_REQ_FNPTR reqFnptrFunc)
REQFUNC("AddLibraries", g_fn_AddLibraries, PFN_ADDLIBRARIES);
REQFUNC("RemoveLibraries", g_fn_RemoveLibraries, PFN_REMOVELIBRARIES);
REQFUNC("OverrideNatives", g_fn_OverrideNatives, PFN_OVERRIDENATIVES);
REQFUNC("GetLocalInfo", g_fn_GetLocalInfo, PFN_GETLOCALINFO);
#ifdef MEMORY_TEST
// Memory

View File

@ -2180,6 +2180,7 @@ typedef int (*PFN_FINDLIBRARY) (const char * /*name*/, LibType /*type*/);
typedef size_t (*PFN_ADDLIBRARIES) (const char * /*name*/, LibType /*type*/, void * /*parent*/);
typedef size_t (*PFN_REMOVELIBRARIES) (void * /*parent*/);
typedef void (*PFN_OVERRIDENATIVES) (AMX_NATIVE_INFO * /*natives*/);
typedef const char * (*PFN_GETLOCALINFO) (const char * /*name*/, const char * /*def*/);
extern PFN_ADD_NATIVES g_fn_AddNatives;
extern PFN_BUILD_PATHNAME g_fn_BuildPathname;
@ -2251,6 +2252,7 @@ extern PFN_FINDLIBRARY g_fn_FindLibrary;
extern PFN_ADDLIBRARIES g_fn_AddLibraries;
extern PFN_REMOVELIBRARIES g_fn_RemoveLibraries;
extern PFN_OVERRIDENATIVES g_fn_OverrideNatives;
extern PFN_GETLOCALINFO g_fn_GetLocalInfo;
#ifdef MAY_NEVER_BE_DEFINED
// Function prototypes for intellisense and similar systems
@ -2319,6 +2321,7 @@ int MF_FindLibrary (const char *name, LibType type) { }
size_t MF_AddLibraries (const char *name, LibType type, void *parent) { }
size_t MF_RemoveLibraries (void *parent) { }
void MF_OverrideNatives (AMX_NATIVE_INFO *natives) { }
const char * MF_GetLocalInfo (const char *name, const char *def) { }
#endif // MAY_NEVER_BE_DEFINED
#define MF_AddNatives g_fn_AddNatives
@ -2392,6 +2395,7 @@ void MF_LogError(AMX *amx, int err, const char *fmt, ...);
#define MF_AddLibraries g_fn_AddLibraries
#define MF_RemoveLibraries g_fn_RemoveLibraries
#define MF_OverrideNatives g_fn_OverrideNatives
#define MF_GetLocalInfo g_fn_GetLocalInfo
#ifdef MEMORY_TEST
/*** Memory ***/