Fix always failing when falling back to engine v22.

This commit is contained in:
Nicholas Hastings 2015-09-11 05:38:53 -07:00
parent 82b7485001
commit 2bd91dd93b

View File

@ -76,11 +76,14 @@ bool SourceMod_Core::Load(PluginId id, ISmmAPI *ismm, char *error, size_t maxlen
if (!engine)
{
engine = (IVEngineServer *)ismm->VInterfaceMatch(ismm->GetEngineFactory(), "VEngineServer022");
if (error && maxlen)
if (!engine)
{
ismm->Format(error, maxlen, "Could not find interface: VEngineServer023 or VEngineServer022");
if (error && maxlen)
{
ismm->Format(error, maxlen, "Could not find interface: VEngineServer023 or VEngineServer022");
}
return false;
}
return false;
}
#else
GET_V_IFACE_CURRENT(GetEngineFactory, engine, IVEngineServer, INTERFACEVERSION_VENGINESERVER);