From 8a51bc6dbf5b260e43bc9af1605e0ff1b928491a 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 065591c65..5a8ca7983 100644 --- a/extensions/sdktools/vnatives.cpp +++ b/extensions/sdktools/vnatives.cpp @@ -778,7 +778,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