Add hack to not throw error on FEBC not found if not attempted to be found (nobug, r=asherkin).

This commit is contained in:
Nicholas Hastings 2014-03-21 12:03:19 -04:00
parent b411b60ed7
commit d6bbb765c1

View File

@ -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