1
0
mirror of https://github.com/alliedmodders/metamod-source.git synced 2025-02-20 13:54:14 +01:00

Shim for TF2-branch games to find latest, non-shimmed engine iface.

This commit is contained in:
Nicholas Hastings 2015-09-10 20:41:27 -04:00
parent e29ff511ff
commit e4cfea7227

View File

@ -108,7 +108,16 @@ void BaseProvider::ConsolePrint(const char *str)
void BaseProvider::Notify_DLLInit_Pre(CreateInterfaceFn engineFactory,
CreateInterfaceFn serverFactory)
{
#if SOURCE_ENGINE == SE_TF2 || SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_SDK2013
// Shim to avoid hooking shims
engine = (IVEngineServer *)((engineFactory)("VEngineServer023", NULL));
if (!engine)
{
engine = (IVEngineServer *)((engineFactory)("VEngineServer022", NULL));
}
#else
engine = (IVEngineServer *)((engineFactory)(INTERFACEVERSION_VENGINESERVER, NULL));
#endif
if (!engine)
{
DisplayError("Could not find IVEngineServer! Metamod cannot load.");