From 88d2b393d8ee29b0dd1b584ae35921c3ef0f4683 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Fri, 3 Feb 2006 04:19:18 +0000 Subject: [PATCH] cvar queries actually run now removed old fakemeta code --- amxmodx/amxmodx.cpp | 2 + amxmodx/modules.cpp | 104 -------------------------------------------- 2 files changed, 2 insertions(+), 104 deletions(-) diff --git a/amxmodx/amxmodx.cpp b/amxmodx/amxmodx.cpp index 7548c761..b4b8392b 100755 --- a/amxmodx/amxmodx.cpp +++ b/amxmodx/amxmodx.cpp @@ -3579,6 +3579,8 @@ static cell AMX_NATIVE_CALL query_client_cvar(AMX *amx, cell *params) pPlayer->queries.push_back(queryObject); + QUERY_CLIENT_CVAR_VALUE2(pPlayer->pEdict, cvarname, queryObject->requestId); + return 1; } diff --git a/amxmodx/modules.cpp b/amxmodx/modules.cpp index 7df0d412..0291e457 100755 --- a/amxmodx/modules.cpp +++ b/amxmodx/modules.cpp @@ -878,7 +878,6 @@ int loadModules(const char* filename, PLUG_LOADTIME now) g_modules.put(cc); -#ifndef FAKEMETA if (cc->IsMetamod()) { char* mmpathname = build_pathname_addons("%s/%s", get_localinfo("amxx_modulesdir", "addons/amxmodx/modules"), line.c_str()); @@ -907,7 +906,6 @@ int loadModules(const char* filename, PLUG_LOADTIME now) break; } } -#endif } fclose(fp); @@ -932,11 +930,7 @@ void detachReloadModules() while (a) { -#ifdef FAKEMETA - if ((*a).isReloadable()) -#else if ((*a).isReloadable() && !(*a).IsMetamod()) -#endif { (*a).detachModule(); a.remove(); @@ -947,38 +941,6 @@ void detachReloadModules() } } -#ifdef FAKEMETA -void attachModules() -{ - CList::iterator a = g_modules.begin(); - - while (a) - { - bool retVal = (*a).attachModule(); - - if ((*a).isAmxx() && !retVal) - { - switch ((*a).getStatusValue()) - { - case MODULE_FUNCNOTPRESENT: - report_error(1, "[AMXX] Module requested a not exisitng function (file \"%s\")%s%s%s", (*a).getFilename(), (*a).getMissingFunc() ? " (func \"" : "", - (*a).getMissingFunc() ? (*a).getMissingFunc() : "", (*a).getMissingFunc() ? "\")" : ""); - break; - case MODULE_INTERROR: - report_error(1, "[AMXX] Internal error during module load (file \"%s\")", (*a).getFilename()); - break; - case MODULE_BADLOAD: - report_error(1, "[AMXX] Module is not a valid library (file \"%s\")", (*a).getFilename()); - break; - default: - break; - } - } - ++a; - } -} -#endif - const char* strip_name(const char* a) { const char* ret = a; @@ -996,72 +958,6 @@ const char* strip_name(const char* a) return ret; } -#ifdef FAKEMETA -void attachMetaModModules(PLUG_LOADTIME now, const char* filename) -{ - File fp(build_pathname("%s", filename), "r"); - - if (!fp) - { - AMXXLOG_Log("[AMXX] Modules list not found (file \"%s\")", filename); - return; - } - - char line[256], moduleName[256]; - String modPath, mmPath; - DLHANDLE module; - - while (fp.getline(line, 255)) - { - *moduleName = 0; - sscanf(line, "%s", moduleName); - - if (!isalnum(*moduleName)) - continue; - - char* pathname = build_pathname("%s/%s", get_localinfo("amxx_modulesdir", "addons/amxmodx/modules"), line); - char* mmpathname = build_pathname_addons("%s/%s", get_localinfo("amxx_modulesdir", "addons/amxmodx/modules"), line); - - ConvertModuleName(pathname, modPath); - ConvertModuleName(mmpathname, mmPath); - - CList::iterator iter = g_FakeMeta.m_Plugins.begin(); - - //prevent double loading - int foundFlag = 0; - - while (iter) - { - if (strcmp((*iter).GetPath(), mmPath.c_str()) == 0) - { - foundFlag = 1; - break; - } - ++iter; - } - - if (foundFlag) - continue; - - module = DLLOAD(modPath.c_str()); // link dll - - if (module) - { - int a = (int)DLPROC(module, "Meta_Attach"); - DLFREE(module); - - if (a) - { - g_FakeMeta.AddPlugin(mmPath.c_str()); - } - } - } - - g_FakeMeta.Meta_Query(gpMetaUtilFuncs); - g_FakeMeta.Meta_Attach(now, gpMetaGlobals, gpGamedllFuncs); -} -#endif - // Get the number of running modules int countModules(CountModulesMode mode) {