From d6bbb765c1a851041ba8214d41a59cbe09344861 Mon Sep 17 00:00:00 2001 From: Nicholas Hastings Date: Fri, 21 Mar 2014 12:03:19 -0400 Subject: [PATCH] Add hack to not throw error on FEBC not found if not attempted to be found (nobug, r=asherkin). --- extensions/sdktools/vnatives.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/extensions/sdktools/vnatives.cpp b/extensions/sdktools/vnatives.cpp index 5e3648aa..05d7cc81 100644 --- a/extensions/sdktools/vnatives.cpp +++ b/extensions/sdktools/vnatives.cpp @@ -825,7 +825,15 @@ static cell_t FindEntityByClassname(IPluginContext *pContext, const cell_t *para if (!bProbablyNoFEBC) { bProbablyNoFEBC = true; - g_pSM->LogError(myself, "%s, falling back to IServerTools method.", error); + + // CreateBaseCall above abstracts all of the gamedata logic, but we need to know if the key was even found. + // We don't want to log an error if key isn't present (knowing falling back to native method), only throw + // error if signature/symbol was not found. + void *dummy; + if (g_pGameConf->GetMemSig("FindEntityByClassname", &dummy)) + { + g_pSM->LogError(myself, "%s, falling back to IServerTools method.", error); + } } return NativeFindEntityByClassname(pContext, params); #else